DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс UIManager

Закрытые члены

proto native UIScriptedMenu EnterScriptedMenu (int id, UIMenuPanel parent)
 Create & open menu with specific id (see MenuID) and set its parent.
 
proto native UIScriptedMenu CreateScriptedMenu (int id, UIMenuPanel parent)
 
proto native void EnterServerBrowser (UIMenuPanel parentMenu)
 
proto native UIScriptedMenu ShowScriptedMenu (UIScriptedMenu menu, UIMenuPanel parent)
 
proto native void HideScriptedMenu (UIScriptedMenu menu)
 
proto native Widget GetWidgetUnderCursor ()
 
proto native bool IsDialogVisible ()
 
proto native bool IsDialogHiding ()
 Returns true for a single frame whenever a dialog is hidden.
 
proto native bool IsModalVisible ()
 
proto native void CloseSpecificDialog (int id)
 
proto native void CloseDialog ()
 
proto native void HideDialog ()
 
proto native void ShowDialog (string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
 Shows message dialog.
 
proto native bool ShowCursor (bool visible)
 natively checks game focus on cursor hiding
 
proto native bool IsCursorVisible ()
 
proto native bool IsDialogQueued ()
 
proto native bool ShowQueuedDialog ()
 
proto native int GetLoginQueuePosition ()
 
proto native bool ScreenFadeVisible ()
 
proto native void ScreenFadeIn (float duration, string text, int backgroundColor, int textColor)
 
proto native void ScreenFadeOut (float duration)
 
proto native bool IsScaledMode ()
 
proto native void SetScaledMode (bool enabled)
 
proto native UIScriptedMenu GetMenu ()
 Returns most-top open menu.
 
bool Back ()
 Close top window on windows stack, returns true when any window is closed.
 
bool CloseAll ()
 Close all opened menus.
 
bool CloseAllSubmenus ()
 Close all opened menus except first menu.
 
bool CloseMenu (int id)
 Close menu with specific ID (see MenuID)
 
bool HideMenu (int id)
 
bool IsMenuOpen (int id)
 Returns true if menu with specific ID is opened (see MenuID)
 
UIScriptedMenu FindMenu (int id)
 Returns menu with specific ID if it is open (see MenuID)
 
void OpenWindow (int id)
 
void CloseWindow (int id)
 
void DeleteWindow (UIScriptedWindow window)
 
bool IsWindowOpened (int id)
 
void ShowUICursor (bool visible)
 

Подробное описание

Методы

◆ Back()

bool Back ( )
inlineprivate

Close top window on windows stack, returns true when any window is closed.

63 {
64 if (IsDialogVisible() == false)
65 {
67 if (menu)
68 {
69 menu.Close();
70 return true;
71 }
72 }
73
74 return false;
75 }
Definition EntityAI.c:95
proto native bool IsDialogVisible()
proto native UIScriptedMenu GetMenu()
Returns most-top open menu.
Part of main menu hierarchy to create custom menus from script.
Definition UIScriptedMenu.c:3

Перекрестные ссылки GetMenu() и IsDialogVisible().

◆ CloseAll()

bool CloseAll ( )
inlineprivate

Close all opened menus.

79 {
81 while (menu)
82 {
83 if (menu.GetParentMenu())
84 {
85 menu = menu.GetParentMenu();
86 }
87 else
88 {
89 menu.Close();
90 return true;
91 }
92 }
93
94 return false;
95 }

Перекрестные ссылки GetMenu().

Используется в MissionBase::CloseAllMenus(), MissionBase::DestroyAllMenus() и ActionUnfoldMapCB::PerformMapChange().

◆ CloseAllSubmenus()

bool CloseAllSubmenus ( )
inlineprivate

Close all opened menus except first menu.

99 {
101
102 while (menu && menu.GetParentMenu() && menu.GetParentMenu().GetParentMenu())
103 {
104 menu = menu.GetParentMenu();
105 }
106
107 if (menu && menu.GetParentMenu())
108 {
109 menu.Close();
110 return true;
111 }
112
113 return false;
114 }

Перекрестные ссылки GetMenu().

◆ CloseDialog()

proto native void CloseDialog ( )
private

◆ CloseMenu()

bool CloseMenu ( int id)
inlineprivate

Close menu with specific ID (see MenuID)

118 {
120
121 while (menu)
122 {
123 if (menu.GetID() == id)
124 {
125 menu.Close();
126 return true;
127 }
128
129 menu = menu.GetParentMenu();
130 }
131
132 return false;
133 }

Перекрестные ссылки GetMenu().

Используется в MissionBase::Continue().

◆ CloseSpecificDialog()

proto native void CloseSpecificDialog ( int id)
private

◆ CloseWindow()

void CloseWindow ( int id)
inlineprivate
210 {
212
213 if ( window )
214 {
216 window.HideWindow();
217
218 //delete window;
219 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(this.DeleteWindow, window );
220 /*
221 wtf? leak
222 Timer delete_timer = new Timer ( CALL_CATEGORY_SYSTEM );
223 Param1<UIScriptedWindow> params = new Param1<UIScriptedWindow>( window );
224 delete_timer.Run( 0.5, this, "DeleteWindow", params, false );*/
225
226 }
227 }
void DeleteWindow(UIScriptedWindow window)
Definition UIManager.c:229
Definition UIScriptedWindow.c:2
static UIScriptedWindow GetWindow(int id)
Definition UIScriptedWindow.c:27
static void RemoveFromActiveWindows(int id)
Definition UIScriptedWindow.c:19
proto native CGame GetGame()
const int CALL_CATEGORY_SYSTEM
Definition tools.c:8

Перекрестные ссылки CALL_CATEGORY_SYSTEM, DeleteWindow(), GetGame(), UIScriptedWindow::GetWindow() и UIScriptedWindow::RemoveFromActiveWindows().

Используется в OpenWindow().

◆ CreateScriptedMenu()

proto native UIScriptedMenu CreateScriptedMenu ( int id,
UIMenuPanel parent )
private

◆ DeleteWindow()

void DeleteWindow ( UIScriptedWindow window)
inlineprivate
230 {
231 delete window;
232 }

Используется в CloseWindow().

◆ EnterScriptedMenu()

proto native UIScriptedMenu EnterScriptedMenu ( int id,
UIMenuPanel parent )
private

Create & open menu with specific id (see MenuID) and set its parent.

Используется в MissionBase::Pause(), ActionUnfoldMapCB::PerformMapChange() и MissionBase::ShowChat().

◆ EnterServerBrowser()

proto native void EnterServerBrowser ( UIMenuPanel parentMenu)
private

◆ FindMenu()

UIScriptedMenu FindMenu ( int id)
inlineprivate

Returns menu with specific ID if it is open (see MenuID)

161 {
163
164 while (menu)
165 {
166 if (menu.GetID() == id)
167 {
168 return menu;
169 }
170
171 menu = UIScriptedMenu.Cast( menu.GetParentMenu() );
172 }
173
174 return NULL;
175 }
Definition DayZGame.c:64

Перекрестные ссылки GetMenu().

Используется в IsMenuOpen() и MissionBase::OnUpdate().

◆ GetLoginQueuePosition()

proto native int GetLoginQueuePosition ( )
private

◆ GetMenu()

proto native UIScriptedMenu GetMenu ( )
private

◆ GetWidgetUnderCursor()

proto native Widget GetWidgetUnderCursor ( )
private

◆ HideDialog()

proto native void HideDialog ( )
private

◆ HideMenu()

bool HideMenu ( int id)
inlineprivate
136 {
138
139 while (menu)
140 {
141 if (menu.GetID() == id)
142 {
144 return true;
145 }
146
147 menu = UIScriptedMenu.Cast( menu.GetParentMenu() );
148 }
149
150 return false;
151 }
proto native void HideScriptedMenu(UIScriptedMenu menu)

Перекрестные ссылки GetMenu() и HideScriptedMenu().

◆ HideScriptedMenu()

proto native void HideScriptedMenu ( UIScriptedMenu menu)
private

Используется в MissionBase::HideInventory() и HideMenu().

◆ IsCursorVisible()

proto native bool IsCursorVisible ( )
private

◆ IsDialogHiding()

proto native bool IsDialogHiding ( )
private

Returns true for a single frame whenever a dialog is hidden.

◆ IsDialogQueued()

proto native bool IsDialogQueued ( )
private

◆ IsDialogVisible()

proto native bool IsDialogVisible ( )
private

Используется в Back() и MissionBase::OnUpdate().

◆ IsMenuOpen()

bool IsMenuOpen ( int id)
inlineprivate

Returns true if menu with specific ID is opened (see MenuID)

155 {
156 return FindMenu(id) != null;
157 }
UIScriptedMenu FindMenu(int id)
Returns menu with specific ID if it is open (see MenuID)
Definition UIManager.c:160

Перекрестные ссылки FindMenu().

◆ IsModalVisible()

proto native bool IsModalVisible ( )
private

◆ IsScaledMode()

proto native bool IsScaledMode ( )
private

◆ IsWindowOpened()

bool IsWindowOpened ( int id)
inlineprivate
235 {
236 if ( UIScriptedWindow.GetWindow( id ) )
237 {
238 return true;
239 }
240
241 return false;
242 }

Перекрестные ссылки UIScriptedWindow::GetWindow().

◆ OpenWindow()

void OpenWindow ( int id)
inlineprivate
179 {
181
182 //if window is already opened, close it
183 if ( window )
184 {
185 CloseWindow( id );
186
187 return;
188 }
189
190 //create new window
191 switch( id )
192 {
194 window = GetGame().GetMission().CreateScriptedWindow( id );
195 break;
196
197 default: {};
198 }
199
200 if ( window )
201 {
202 window.Init();
203
204 //add to active windows
206 }
207 }
void CloseWindow(int id)
Definition UIManager.c:209
static void AddToActiveWindows(int id, UIScriptedWindow window)
Definition UIScriptedWindow.c:9
const int GUI_WINDOW_MISSION_LOADER
Definition constants.c:215

Перекрестные ссылки UIScriptedWindow::AddToActiveWindows(), CloseWindow(), GetGame(), UIScriptedWindow::GetWindow() и GUI_WINDOW_MISSION_LOADER.

◆ ScreenFadeIn()

proto native void ScreenFadeIn ( float duration,
string text,
int backgroundColor,
int textColor )
private

◆ ScreenFadeOut()

proto native void ScreenFadeOut ( float duration)
private

Используется в MissionBase::OnUpdate().

◆ ScreenFadeVisible()

proto native bool ScreenFadeVisible ( )
private

◆ SetScaledMode()

proto native void SetScaledMode ( bool enabled)
private

◆ ShowCursor()

proto native bool ShowCursor ( bool visible)
private

natively checks game focus on cursor hiding

◆ ShowDialog()

proto native void ShowDialog ( string caption,
string text,
int id,
int butts,
int def,
int type,
UIScriptedMenu handler )
private

Shows message dialog.

Аргументы
caption
text
idcustom user id
buttsDialogBoxType
defDialogBoxButton
typeDialogMessageType
handler
usage :
const int QUIT_DIALOG_ID = 76;
GetGame().GetUIManager().ShowDialog("Quit", "Do You really want to quit?", QUIT_DIALOG_ID, DBT_YESNO, DBB_YES, DMT_QUESTION, this);
...
// after user pass dialog, callback on menu/event handler is called
ScriptedWidgetEventHandler::OnModalResult( Widget w, int x, int y, int code, int result )
{
if (code == QUIT_DIALOG_ID && result == DBB_YES) // yes this is callback for dialog we show earlier and user press YES button
{
Quit();
}
}
Icon x
Icon y
Definition EnWidgets.c:190

◆ ShowQueuedDialog()

proto native bool ShowQueuedDialog ( )
private

◆ ShowScriptedMenu()

proto native UIScriptedMenu ShowScriptedMenu ( UIScriptedMenu menu,
UIMenuPanel parent )
private

Используется в MissionBase::ShowInventory().

◆ ShowUICursor()

void ShowUICursor ( bool visible)
inlineprivate
245 {
246 g_Game.SetMouseCursorDesiredVisibility(visible);
247 }
DayZGame g_Game
Definition DayZGame.c:3815

Перекрестные ссылки g_Game.

Используется в MissionBase::OnMissionStart() и MissionBase::OnUpdate().


Объявления и описания членов класса находятся в файле: