3 protected MultilineEditBoxWidget m_edit;
4 protected HtmlWidget m_html;
5 protected ButtonWidget m_confirm_button;
8 protected bool m_IsWriting;
10 protected int m_SymbolCount;
11 protected string m_PenColor;
15 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission());
18 IngameHud hud = IngameHud.Cast(
mission.GetHud());
28 MissionGameplay
mission = MissionGameplay.Cast(
GetGame().GetMission());
31 IngameHud hud = IngameHud.Cast(
mission.GetHud());
39 override void InitNoteRead(
string text =
"")
55 m_SymbolCount = text.Length();
59 m_confirm_button.Show(
false);
70 m_PenColor = m_Pen.ConfigGetString(
"writingColor");
73 m_PenColor =
"#000000";
85 m_confirm_button.Show(
true);
90 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/day_z_inventory_note.layout");
91 m_edit = MultilineEditBoxWidget.Cast(layoutRoot.FindAnyWidget(
"EditWidget"));
92 m_html = HtmlWidget.Cast(layoutRoot.FindAnyWidget(
"HtmlWidget"));
93 m_confirm_button = ButtonWidget.Cast(layoutRoot.FindAnyWidgetById(
IDC_OK));
100 super.OnClick(w,
x,
y, button);
108 switch (w.GetUserID())
114 if (m_Paper && m_Pen && m_IsWriting)
117 m_edit.GetText(edit_text);
118 edit_text = MiscGameplayFunctions.SanitizeString(edit_text);
120 Param1<string> text =
new Param1<string>(edit_text);
121 m_Paper.RPCSingleParam(
ERPCs.RPC_WRITE_NOTE_CLIENT, text,
true);
130 override void Update(
float timeslice)
132 super.Update(timeslice);