Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
uipopupscriptscenedelete.c
Go to the documentation of this file.
1class UIPopupScriptSceneDelete extends UIPopupScript
2{
3 private ButtonWidget m_BtnYes;
4 private ButtonWidget m_BtnNo;
5 private string m_DeleteScene;
6
7 //================================================
8 // UIPopupScriptSceneDelete
9 //================================================
10 void UIPopupScriptSceneDelete(Widget wgt)
11 {
12 m_BtnYes = ButtonWidget.Cast( wgt.FindAnyWidget("btn_ppp_sn_dlt_yes") );
13 m_BtnNo = ButtonWidget.Cast( wgt.FindAnyWidget("btn_ppp_sn_dlt_no") );
14 }
15
16 //================================================
17 // OnClick
18 //================================================
19 override bool OnClick(Widget w, int x, int y, int button)
20 {
21 super.OnClick(w, x, y, button);
22
23 if ( w == m_BtnYes )
24 {
25 PluginSceneManager editor = PluginSceneManager.Cast( GetPlugin(PluginSceneManager) );
26
27 editor.SceneDelete(m_DeleteScene);
28
29 PopupBack();
30
31 return true;
32 }
33 else if ( w == m_BtnNo )
34 {
35 m_DeleteScene = STRING_EMPTY;
36 PopupBack();
37 return true;
38 }
39
40 return false;
41 }
42
43 void SetDeleteName(string scene_name)
44 {
45 m_DeleteScene = scene_name;
46 }
47}
UIPopupScript PopupBack()
override bool OnClick(Widget w, int x, int y, int button)
buttons clicks
Definition dayzgame.c:151
const string STRING_EMPTY
Definition constants.c:54
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)