DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
HelpScreen.c
См. документацию.
1class HelpScreen extends UIScriptedMenu
2{
5
6 ButtonWidget m_CloseConsoleButton;
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
25 array<ref KeyBinding> keybindings = module_keybinding.GetKeyBindings();
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
32 array<ref MouseBinding> mousebindings = module_keybinding.GetMouseBindings();
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)
Определения PluginManager.c:316
proto native WorkspaceWidget GetWorkspace()
void HelpScreen()
Определения HelpScreen.c:8
TextListboxWidget m_MouseBindingsTextListboxWidget
Определения HelpScreen.c:4
void ~HelpScreen()
Определения HelpScreen.c:13
override Widget Init()
Определения HelpScreen.c:17
ButtonWidget m_CloseConsoleButton
Определения HelpScreen.c:6
override bool OnClick(Widget w, int x, int y, int button)
Определения HelpScreen.c:44
TextListboxWidget m_KeyBindingsTextListboxWidget
Определения HelpScreen.c:3
Определения DayZGame.c:64
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.