Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
plugincameratools.c
Go to the documentation of this file.
1class PluginCameraTools extends PluginBase
2{
3 protected static PluginCameraTools m_Instance;
4 protected static bool m_IsOpen;
5
6 override void OnInit()
7 {
8 m_Instance = this;
9 }
10
11 static PluginCameraTools GetInstance()
12 {
13 return m_Instance;
14 }
15
16 //===========================================
17 // ToggleCameraTools
18 //===========================================
20 {
21 if( !m_IsOpen )
22 {
23 GetGame().GetUIManager().EnterScriptedMenu( MENU_CAMERA_TOOLS, null );
24 }
25 else
26 {
27 GetGame().GetUIManager().Back();
28 }
29 m_IsOpen = !m_IsOpen;
30 }
31
32 //===========================================
33 // CursorHide
34 //===========================================
36 {
37 if( GetGame().GetUIManager().GetMenu() )
38 GetGame().GetUIManager().GetMenu().OnHide();
39 }
40
41 //===========================================
42 // CursorShow
43 //===========================================
45 {
46 if( GetGame().GetUIManager().GetMenu() )
47 GetGame().GetUIManager().GetMenu().OnShow();
48 }
49
50 void Save()
51 {
52 if( GetGame().GetUIManager().GetMenu() )
53 GetGame().GetUIManager().GetMenu().OnKeyPress( null, 0, 0, KeyCode.KC_S );
54 }
55
56 void PlayPause()
57 {
58 if( GetGame().GetUIManager().GetMenu() )
59 GetGame().GetUIManager().GetMenu().OnKeyPress( null, 0, 0, KeyCode.KC_P );
60 }
61
63 {
64 if( GetGame().GetUIManager().GetMenu() )
65 GetGame().GetUIManager().GetMenu().OnKeyPress( null, 0, 0, KeyCode.KC_Q );
66 }
67
69 {
70 if( GetGame().GetUIManager().GetMenu() )
71 GetGame().GetUIManager().GetMenu().OnKeyPress( null, 0, 0, KeyCode.KC_E );
72 }
73}
Plugin interface for controlling of agent pool system.
Definition pluginbase.c:2
static bool m_IsOpen
override void OnInit()
static PluginCameraTools GetInstance()
void ToggleCameraTools()
static PluginCameraTools m_Instance
void DeleteKeyframe()
override void OnShow()
override bool OnKeyPress(Widget w, int x, int y, int key)
override void OnHide()
proto native CGame GetGame()
KeyCode
Definition ensystem.c:157
const int MENU_CAMERA_TOOLS
Definition constants.c:201