3 private EditBoxWidget m_edit_box;
4 private TextWidget m_channel_text;
5 private UAIDWrapper m_BackInputWrapper;
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 =
g_Game.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();
40 if (!
g_Game.IsMultiplayer())
45 MissionGameplay.Cast(
g_Game.GetMission()).m_Chat.Add(chat_params);
49 m_close_timer.Run(0.1,
this,
"Close");
51 GetUApi().GetInputByID(UAPersonView).Supress();
64 g_Game.GetMission().HideChat();
66 if (!
g_Game.GetMission().IsVoNActive())
67 g_Game.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
override bool OnChange(Widget w, int x, int y, bool finished)