DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
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 {
24 }
25 else
26 {
28 }
29 m_IsOpen = !m_IsOpen;
30 }
31
32 //===========================================
33 // CursorHide
34 //===========================================
36 {
37 if( GetGame().GetUIManager().GetMenu() )
39 }
40
41 //===========================================
42 // CursorShow
43 //===========================================
45 {
46 if( GetGame().GetUIManager().GetMenu() )
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}
static ref RadialMenu m_Instance
Definition RadialMenu.c:55
proto native UIManager GetUIManager()
override void OnInit()
static PluginCameraTools GetInstance()
static protected bool m_IsOpen
void ToggleCameraTools()
static protected PluginCameraTools m_Instance
void DeleteKeyframe()
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
proto native UIScriptedMenu EnterScriptedMenu(int id, UIMenuPanel parent)
Create & open menu with specific id (see MenuID) and set its parent.
bool Back()
Close top window on windows stack, returns true when any window is closed.
Definition UIManager.c:64
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:179