3 private EditBoxWidget m_edit_box;
4 private TextWidget m_channel_text;
6 private ref
Timer m_close_timer;
10 m_close_timer =
new Timer();
13 override Widget
Init()
15 m_BackInputWrapper =
GetUApi().GetInputByID(UAUIBack).GetPersistentWrapper();
16 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/day_z_chat_input.layout");
17 m_edit_box = EditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"InputEditBoxWidget"));
18 m_channel_text = TextWidget.Cast(layoutRoot.FindAnyWidget(
"ChannelText"));
24 override bool UseKeyboard()
29 override bool OnChange(Widget w,
int x,
int y,
bool finished)
31 super.OnChange(w,
x,
y, finished);
33 if (!finished)
return false;
35 string text = m_edit_box.GetText();
45 MissionGameplay.Cast(
GetGame().GetMission()).m_Chat.Add(chat_params);
49 m_close_timer.Run(0.1,
this,
"Close");
51 GetUApi().GetInputByID(UAPersonView).Supress();
64 GetGame().GetMission().HideChat();
66 if (!
GetGame().GetMission().IsVoNActive())
67 GetGame().GetMission().HideVoiceLevelWidgets();
74 override void Update(
float timeslice)
76 if (m_BackInputWrapper.InputP().LocalPress())
84 m_channel_text.SetText(GetChannelName(0));
101 case CCPublicAddressSystem:
PlayerSpawnPresetDiscreteItemSetSlotData name
one set for cargo
Param4< int, string, string, string > ChatMessageEventParams
channel, from, text, color config class
proto native CGame GetGame()
override bool OnChange(Widget w, int x, int y, bool finished)