Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
uipopupscripteditorsettings.c
Go to the documentation of this file.
1class UIPopupScriptEditorSettings extends UIPopupScript
2{
3 private CheckBoxWidget m_WgtTglSeleHighlight;
4 private CheckBoxWidget m_WgtTglSavePlayerPos;
6
7 private ButtonWidget m_BtnCancel;
8
9 private PluginSceneManager m_ModuleSceneManager;
10
11 //================================================
12 // UIPopupScriptEditorSettings
13 //================================================
15 {
16 m_ModuleSceneManager = PluginSceneManager.Cast( GetPlugin(PluginSceneManager) );
17
18 m_WgtTglSeleHighlight = CheckBoxWidget.Cast( wgt.FindAnyWidget("cbx_ppp_est_flag_selection") );
19 m_WgtTglSavePlayerPos = CheckBoxWidget.Cast( wgt.FindAnyWidget("cbx_ppp_est_flag_load_player_pos") );
20 m_EdxRotationDelta = EditBoxWidget.Cast( wgt.FindAnyWidget("ebx_ppp_est_rotation_delta_value") );
21
22 m_BtnCancel = ButtonWidget.Cast( wgt.FindAnyWidget("btn_ppp_est_cancel") );
23 }
24
25 //================================================
26 // OnOpen
27 //================================================
28 override void OnOpen(Param param)
29 {
30 m_WgtTglSeleHighlight.SetChecked( m_ModuleSceneManager.GetDrawSelection() );
31 m_WgtTglSavePlayerPos.SetChecked( m_ModuleSceneManager.GetLoadPlayerPos() );
32 m_EdxRotationDelta.SetText( m_ModuleSceneManager.GetRotationAngle().ToString() );
33 }
34
35 //================================================
36 // OnClick
37 //================================================
38 override bool OnClick(Widget w, int x, int y, int button)
39 {
40 super.OnClick(w, x, y, button);
41
42 if ( w == m_WgtTglSeleHighlight )
43 {
44 m_ModuleSceneManager.SetDrawSelection(m_WgtTglSeleHighlight.IsChecked());
45 }
46 else if ( w == m_WgtTglSavePlayerPos )
47 {
48 m_ModuleSceneManager.SetLoadPlayerPos(m_WgtTglSavePlayerPos.IsChecked());
49 }
50 else if ( w == m_BtnCancel )
51 {
52 PopupBack();
53
54 return true;
55 }
56
57 return false;
58 }
59
60 //============================================
61 // OnChange
62 //============================================
63 override bool OnChange(Widget w, int x, int y, bool finished)
64 {
65 if ( w == m_EdxRotationDelta )
66 {
67 int angle = m_EdxRotationDelta.GetText().ToInt();
68
69 if ( angle > 0 )
70 {
71 m_ModuleSceneManager.SetRotationAngle( angle );
72 }
73
74 return true;
75 }
76
77 return false;
78 }
79}
Base Param Class with no parameters.
Definition param.c:12
override bool OnChange(Widget w, int x, int y, bool finished)
CheckBoxWidget m_WgtTglSeleHighlight
override void OnOpen(Param param)
EditBoxWidget m_EdxRotationDelta
void UIPopupScriptEditorSettings(Widget wgt)
CheckBoxWidget m_WgtTglSavePlayerPos
ButtonWidget m_BtnCancel
override bool OnClick(Widget w, int x, int y, int button)
UIPopupScript PopupBack()
PluginSceneManager m_ModuleSceneManager
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)