3 protected TextListboxWidget m_ClientLogListbox;
4 protected ButtonWidget m_ClientLogClearButton;
5 protected CheckBoxWidget m_ClientLogScrollCheckbox;
9 m_ClientLogListbox = TextListboxWidget.Cast(root.FindAnyWidget(
"TextListbox"));
10 m_ClientLogClearButton = ButtonWidget.Cast(root.FindAnyWidget(
"ButtonClear"));
11 m_ClientLogScrollCheckbox = CheckBoxWidget.Cast(root.FindAnyWidget(
"CheckBoxAutoScroll"));
19 override bool OnClick(
Widget w,
int x,
int y,
int button)
21 super.OnClick(w,
x,
y,button);
23 if (w == m_ClientLogClearButton)
31 override bool OnChange(
Widget w,
int x,
int y,
bool finished)
33 super.OnChange(w,
x,
y, finished);
38 protected void Clear(
bool clearFile =
false)
42 m_ClientLogListbox.ClearItems();
45 protected void Add(
string message,
bool isReload =
false)
47 if (m_ClientLogListbox)
49 m_ClientLogListbox.AddItem(
String(message), NULL, 0);
51 if (m_ClientLogScrollCheckbox.IsChecked())
53 m_ClientLogListbox.EnsureVisible(m_ClientLogListbox.GetNumItems());
58 protected void ReloadOutput()
66 while (
FGets( file_index, line_content ) != -1 )
68 Add(line_content,
true);