DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ScriptConsoleTabBase.c
См. документацию.
2{
3 protected int m_Id;
4 protected bool m_IsSelected;
5 protected bool m_IsShiftDown;
7 protected Widget m_Root;
8 protected Widget m_Button;
9 protected ScriptConsole m_ScriptConsole;
10 protected ScriptConsoleTabBase m_Parent;//for subtabs
12 protected PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed;
13
14 void ScriptConsoleTabBase(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent = null)
15 {
16 m_Button = button;
17 m_ScriptConsole = console;
18 m_Root = root;
19 if (parent)
20 m_ParentRoot = parent.GetRoot();
21 else
22 m_ParentRoot = console.layoutRoot;
24 m_ConfigDebugProfileFixed = PluginConfigDebugProfileFixed.Cast(GetPlugin(PluginConfigDebugProfileFixed));
25 }
26
27 void Init(int id)
28 {
29 m_Id = id;
30 }
31
32 int GetID()
33 {
34 return m_Id;
35 }
36
38 {
39 return m_Root;
40 }
41
43 {
44 return m_IsSelected;
45 }
46
47 void Select(bool select, ScriptConsoleTabBase selectedHandler)
48 {
49 m_IsSelected = select;
50 if (m_Root)
51 {
52 Show(select, selectedHandler);
53 ButtonWidget btn = ButtonWidget.Cast(m_Button);
54 if (btn)
55 btn.SetState(select);
56 }
57 if (select)
58 OnSelected();
59 }
60
61 void OnSelected();
62
63 void Show(bool show, ScriptConsoleTabBase selectedHandler)
64 {
65 m_Root.Show(show);
66 m_Root.Enable(show);
67 }
68
70 {
71 return m_Button;
72 }
73
74 void Update(float timeslice)
75 {
76 m_IsShiftDown = KeyState(KeyCode.KC_LSHIFT) || KeyState(KeyCode.KC_RSHIFT);
77 }
78
79 bool OnChange(Widget w, int x, int y, bool finished);
80 bool OnClick(Widget w, int x, int y, int button);
81 bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn);
82 bool OnKeyDown(Widget w, int x, int y, int key);
83 bool OnDoubleClick(Widget w, int x, int y, int button);
84 void OnRPCEx(int rpc_type, ParamsReadContext ctx);
85 bool OnMouseButtonDown(Widget w, int x, int y, int button);
86 bool OnKeyPress(Widget w, int x, int y, int key);
87 bool OnMouseEnter(Widget w, int x, int y);
88 bool OnMouseLeave(Widget w, Widget enterW, int x, int y);
89
90 protected void AddItemToClipboard(TextListboxWidget text_listbox_widget)
91 {
92 int selected_row_index = text_listbox_widget.GetSelectedRow();
93 if (selected_row_index != -1)
94 {
95 string item_name;
96 text_listbox_widget.GetItemText(selected_row_index, 0, item_name);
97 GetGame().CopyToClipboard(item_name);
98 }
99 }
100}
void Show()
Определения DayZGame.c:162
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:316
proto native void CopyToClipboard(string text)
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
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)
bool m_IsShiftDown
Определения ScriptConsoleTabBase.c:5
bool m_IsSelected
Определения ScriptConsoleTabBase.c:4
PluginConfigDebugProfile m_ConfigDebugProfile
Определения ScriptConsoleTabBase.c:11
void ScriptConsoleTabBase(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleTabBase.c:14
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)
Определения ScriptConsoleTabBase.c:90
ScriptConsole m_ScriptConsole
Определения ScriptConsoleTabBase.c:9
bool OnMouseEnter(Widget w, int x, int y)
Widget m_Button
Определения ScriptConsoleTabBase.c:8
bool OnKeyPress(Widget w, int x, int y, int key)
void Select(bool select, ScriptConsoleTabBase selectedHandler)
Определения ScriptConsoleTabBase.c:47
ScriptConsoleTabBase m_Parent
Определения ScriptConsoleTabBase.c:10
void Init(int id)
Определения ScriptConsoleTabBase.c:27
void OnRPCEx(int rpc_type, ParamsReadContext ctx)
PluginConfigDebugProfileFixed m_ConfigDebugProfileFixed
Определения ScriptConsoleTabBase.c:12
Widget GetRoot()
Определения ScriptConsoleTabBase.c:37
Widget m_ParentRoot
Определения ScriptConsoleTabBase.c:6
bool OnChange(Widget w, int x, int y, bool finished)
Widget GetButton()
Определения ScriptConsoleTabBase.c:69
bool OnClick(Widget w, int x, int y, int button)
Widget m_Root
Определения ScriptConsoleTabBase.c:7
void Show(bool show, ScriptConsoleTabBase selectedHandler)
Определения ScriptConsoleTabBase.c:63
bool IsSelected()
Определения ScriptConsoleTabBase.c:42
void Update(float timeslice)
Определения ScriptConsoleTabBase.c:74
Определения EnWidgets.c:190
Serializer ParamsReadContext
Определения gameplay.c:15
proto native CGame GetGame()
KeyCode
Определения EnSystem.c:157
proto native int KeyState(KeyCode key)