DayZ 1.24
Loading...
Searching...
No Matches
ScriptConsoleTabBase.c
Go to the documentation of this file.
2{
3 protected int m_Id;
4 protected bool m_IsSelected;
6 protected Widget m_Root;
7 protected Widget m_Button;
8 protected ScriptConsole m_ScriptConsole;
9 protected ScriptConsoleTabBase m_Parent;//for subtabs
11 protected PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed;
12
14 {
17 m_Root = root;
18 if (parent)
19 m_ParentRoot = parent.GetRoot();
20 else
21 m_ParentRoot = console.layoutRoot;
23 m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(GetPlugin(PluginConfigDebugProfileFixed));
24 }
25
26 void Init(int id)
27 {
28 m_Id = id;
29 }
30
31 int GetID()
32 {
33 return m_Id;
34 }
35
37 {
38 return m_Root;
39 }
40
42 {
43 return m_IsSelected;
44 }
45
47 {
49 if (m_Root)
50 {
53 if (btn)
54 btn.SetState(select);
55 }
56 if (select)
57 OnSelected();
58 }
59
60 void OnSelected();
61
63 {
64 m_Root.Show(show);
65 m_Root.Enable(show);
66 }
67
69 {
70 return m_Button;
71 }
72
73 void Update(float timeslice);
74
75 bool OnChange(Widget w, int x, int y, bool finished);
76 bool OnClick(Widget w, int x, int y, int button);
77 bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn);
78 bool OnKeyDown(Widget w, int x, int y, int key);
79 bool OnDoubleClick(Widget w, int x, int y, int button);
81 bool OnMouseButtonDown(Widget w, int x, int y, int button);
82 bool OnKeyPress(Widget w, int x, int y, int key);
83
85 {
86 int selected_row_index = text_listbox_widget.GetSelectedRow();
87 if (selected_row_index != -1)
88 {
89 string item_name;
91 GetGame().CopyToClipboard(item_name);
92 }
93 }
94}
void Show()
Definition DayZGame.c:155
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)
bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
bool OnKeyDown(Widget w, int x, int y, int key)
PluginConfigDebugProfile m_ConfigDebugProfile
void ScriptConsoleTabBase(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
bool OnDoubleClick(Widget w, int x, int y, int button)
bool OnMouseButtonDown(Widget w, int x, int y, int button)
void AddItemToClipboard(TextListboxWidget text_listbox_widget)
bool OnKeyPress(Widget w, int x, int y, int key)
void Select(bool select, ScriptConsoleTabBase selectedHandler)
ScriptConsoleTabBase m_Parent
void OnRPCEx(int rpc_type, ParamsReadContext ctx)
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
bool OnChange(Widget w, int x, int y, bool finished)
bool OnClick(Widget w, int x, int y, int button)
void Show(bool show, ScriptConsoleTabBase selectedHandler)
void Update(float timeslice)
Serialization general interface. Serializer API works with:
Definition Serializer.c:56
proto native CGame GetGame()