PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
UIManager Class Reference

Private Member Functions

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)
 

Member Function Documentation

◆ Back()

◆ CloseAll()

◆ CloseAllSubmenus()

bool CloseAllSubmenus ( )
inlineprivate

Close all opened menus except first menu.

References UIMenuPanel::Close(), GetMenu(), and UIMenuPanel::GetParentMenu().

Referenced by CGame::DisconnectSessionEx().

◆ CloseDialog()

proto native void CloseDialog ( )
private

◆ CloseMenu()

◆ CloseSpecificDialog()

proto native void CloseSpecificDialog ( int  id)
private

◆ CloseWindow()

◆ CreateScriptedMenu()

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

◆ DeleteWindow()

void DeleteWindow ( UIScriptedWindow  window)
inlineprivate

Referenced by CloseWindow().

◆ EnterScriptedMenu()

◆ EnterServerBrowser()

proto native void EnterServerBrowser ( UIMenuPanel  parentMenu)
private

◆ FindMenu()

◆ GetLoginQueuePosition()

proto native int GetLoginQueuePosition ( )
private

Referenced by CGame::UpdateLoginQueue().

◆ GetMenu()

◆ GetWidgetUnderCursor()

proto native Widget GetWidgetUnderCursor ( )
private

◆ HideDialog()

proto native void HideDialog ( )
private

◆ HideMenu()

bool HideMenu ( int  id)
inlineprivate

References GetMenu(), and HideScriptedMenu().

◆ HideScriptedMenu()

proto native void HideScriptedMenu ( UIScriptedMenu  menu)
private

◆ 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

Referenced by Back(), and MissionBase::OnUpdate().

◆ IsMenuOpen()

bool IsMenuOpen ( int  id)
inlineprivate

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

References FindMenu().

Referenced by MissionBase::HandleMapToggleByKeyboardShortcut(), MissionBase::IsPaused(), Update(), and ActionManagerClient::Update().

◆ IsModalVisible()

proto native bool IsModalVisible ( )
private

◆ IsScaledMode()

proto native bool IsScaledMode ( )
private

◆ IsWindowOpened()

bool IsWindowOpened ( int  id)
inlineprivate

◆ OpenWindow()

◆ ScreenFadeIn()

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

◆ ScreenFadeOut()

◆ 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

Referenced by CGame::RefreshMouseCursorVisibility().

◆ ShowDialog()

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

Shows message dialog.

Parameters
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
proto native UIManager GetUIManager()
proto native void ShowDialog(string caption, string text, int id, int butts, int def, int type, UIScriptedMenu handler)
Shows message dialog.
Definition EnWidgets.c:190
proto native CGame GetGame()

Referenced by UIScriptedMenu::Exit(), HandleError(), UIScriptedMenu::Init(), OnlineServices::OnAutoConnectToEmptyServer(), UIScriptedMenu::OnClick(), ScriptedWidgetEventHandler::OnClick(), UIScriptedMenu::OnClick_Respawn(), and UIScriptedMenu::Play().

◆ ShowQueuedDialog()

proto native bool ShowQueuedDialog ( )
private

Referenced by CGame::CheckDialogs().

◆ ShowScriptedMenu()

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

◆ ShowUICursor()


The documentation for this class was generated from the following file: