11 [
Attribute(
desc:
"Default state set every time other state is finished.", uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(
EEditorState))]
15 private bool m_bIsWaiting;
16 private ref ScriptInvoker Event_OnStateChange =
new ScriptInvoker;
17 private ref ScriptInvoker Event_OnIsWaitingChange =
new ScriptInvoker;
18 protected MenuBase m_MenuUponWaiting;
19 protected bool m_bIsSafeDialog;
27 return m_State == m_DefaultState;
43 if (state ==
m_State)
return true;
49 Event_OnStateChange.Invoke(state, statePrev);
60 if (
m_State == state) SetState(m_DefaultState);
68 if (state == m_DefaultState)
return true;
93 bool SetIsWaiting(
bool isWaiting)
95 if (isWaiting == m_bIsWaiting)
101 m_MenuUponWaiting =
GetGame().GetMenuManager().GetTopMenu();
105 result = (m_bIsSafeDialog || !
GetGame().GetMenuManager().IsAnyDialogOpen()) && m_MenuUponWaiting ==
GetGame().GetMenuManager().GetTopMenu();
106 m_MenuUponWaiting =
null;
109 m_bIsWaiting = isWaiting;
110 Event_OnIsWaitingChange.Invoke(isWaiting);
126 void SetSafeDialog(
bool value)
128 m_bIsSafeDialog = value
135 ScriptInvoker GetOnStateChange()
137 return Event_OnStateChange;
143 ScriptInvoker GetOnIsWaitingChange()
145 return Event_OnIsWaitingChange;
148 override void EOnEditorDebug(array<string> debugTexts)
151 debugTexts.Insert(
string.Format(
"Editor State: %1", Type().EnumToString(
EEditorState,
m_State)));