DayZ 1.24
Loading...
Searching...
No Matches
HelpScreen.c
Go to the documentation of this file.
1class HelpScreen extends UIScriptedMenu
2{
5
7
8 void HelpScreen()
9 {
10
11 }
12
14 {
15 }
16
17 override Widget Init()
18 {
19 PluginKeyBinding module_keybinding = PluginKeyBinding.Cast(GetPlugin(PluginKeyBinding));
20
21 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/help_screen.layout");
22 m_KeyBindingsTextListboxWidget = TextListboxWidget.Cast(layoutRoot.FindAnyWidget("KeyBindingsTextListboxWidget"));
23 m_MouseBindingsTextListboxWidget = TextListboxWidget.Cast(layoutRoot.FindAnyWidget("MouseBindingsTextListboxWidget"));
24
26 for (int i = 0; i < keybindings.Count(); i++)
27 {
28 m_KeyBindingsTextListboxWidget.AddItem(keybindings.Get(i).GetInfoBind(), NULL, 0);
29 m_KeyBindingsTextListboxWidget.SetItem(i, keybindings.Get(i).GetInfoDescription(), NULL, 1);
30 }
31
33 for (i = 0; i < mousebindings.Count(); i++)
34 {
35 m_MouseBindingsTextListboxWidget.AddItem(mousebindings.Get(i).GetInfoBind(), NULL, 0);
36 m_MouseBindingsTextListboxWidget.SetItem(i, mousebindings.Get(i).GetInfoDescription(), NULL, 1);
37 }
38
39 m_CloseConsoleButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("CloseButtonWidget"));
40
41 return layoutRoot;
42 }
43
44 override bool OnClick(Widget w, int x, int y, int button)
45 {
46 super.OnClick(w, x, y, button);
47
48 if (w == m_CloseConsoleButton)
49 {
50 Close();
51 return true;
52 }
53
54 return false;
55 }
56}
Icon x
Icon y
void Close()
PluginBase GetPlugin(typename plugin_type)
void HelpScreen()
Definition HelpScreen.c:8
TextListboxWidget m_MouseBindingsTextListboxWidget
Definition HelpScreen.c:4
void ~HelpScreen()
Definition HelpScreen.c:13
override Widget Init()
Definition HelpScreen.c:17
ButtonWidget m_CloseConsoleButton
Definition HelpScreen.c:6
override bool OnClick(Widget w, int x, int y, int button)
Definition HelpScreen.c:44
TextListboxWidget m_KeyBindingsTextListboxWidget
Definition HelpScreen.c:3
proto native CGame GetGame()