DayZ 1.24
Loading...
Searching...
No Matches
UIPopupScriptSceneDelete.c
Go to the documentation of this file.
1class UIPopupScriptSceneDelete extends UIPopupScript
2{
5 private string m_DeleteScene;
6
7 //================================================
8 // UIPopupScriptSceneDelete
9 //================================================
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
44 {
45 m_DeleteScene = scene_name;
46 }
47}
Icon x
Icon y
PluginBase GetPlugin(typename plugin_type)
override bool OnClick(Widget w, int x, int y, int button)
UIPopupScript PopupBack()
void UIPopupScriptSceneDelete(Widget wgt)
void SetDeleteName(string scene_name)
const string STRING_EMPTY
Definition constants.c:54