Dayz 1.25
Dayz Code 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 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.

61 {
62 if (IsDialogVisible() == false)
63 {
65 if (menu)
66 {
67 menu.Close();
68 return true;
69 }
70 }
71
72 return false;
73 }
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.

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

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

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

◆ CloseAllSubmenus()

bool CloseAllSubmenus ( )
inlineprivate

Close all opened menus except first menu.

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

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

◆ CloseDialog()

proto native void CloseDialog ( )
private

◆ CloseMenu()

bool CloseMenu ( int id)
inlineprivate

Close menu with specific ID (see MenuID)

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

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

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

◆ CloseSpecificDialog()

proto native void CloseSpecificDialog ( int id)
private

◆ CloseWindow()

void CloseWindow ( int id)
inlineprivate
208 {
210
211 if ( window )
212 {
214 window.HideWindow();
215
216 //delete window;
217 GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).Call(this.DeleteWindow, window );
218 /*
219 wtf? leak
220 Timer delete_timer = new Timer ( CALL_CATEGORY_SYSTEM );
221 Param1<UIScriptedWindow> params = new Param1<UIScriptedWindow>( window );
222 delete_timer.Run( 0.5, this, "DeleteWindow", params, false );*/
223
224 }
225 }
void DeleteWindow(UIScriptedWindow window)
Definition UIManager.c:227
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
228 {
229 delete window;
230 }

Используется в 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)

159 {
161
162 while (menu)
163 {
164 if (menu.GetID() == id)
165 {
166 return menu;
167 }
168
169 menu = UIScriptedMenu.Cast( menu.GetParentMenu() );
170 }
171
172 return NULL;
173 }
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
134 {
136
137 while (menu)
138 {
139 if (menu.GetID() == id)
140 {
142 return true;
143 }
144
145 menu = UIScriptedMenu.Cast( menu.GetParentMenu() );
146 }
147
148 return false;
149 }
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

◆ 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)

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

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

◆ IsModalVisible()

proto native bool IsModalVisible ( )
private

◆ IsScaledMode()

proto native bool IsScaledMode ( )
private

◆ IsWindowOpened()

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

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

◆ OpenWindow()

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

Перекрестные ссылки 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
243 {
244 g_Game.SetMouseCursorDesiredVisibility(visible);
245 }
DayZGame g_Game
Definition DayZGame.c:3746

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

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


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