#[repr(C)]pub struct UI {Show 24 fields
pub __base: [u8; 8],
pub __base1: BSTEventSource<MenuOpenCloseEvent>,
pub __base2: BSTEventSource<MenuModeChangeEvent>,
pub __base3: BSTEventSource<*mut c_void>,
pub menuStack: BSTArray<GPtr<IMenu>>,
pub menuMap: BSTHashMap<BSFixedString, UIMenuEntry>,
pub processMessagesLock: BSSpinLock,
pub numPausesGame: u32,
pub numItemMenus: u32,
pub numDisablePauseMenu: u32,
pub numAllowSaving: u32,
pub numDontHideCursorWhenTopmost: u32,
pub numCustomRendering: u32,
pub numApplicationMenus: u32,
pub modal: bool,
pub pad17D: u8,
pub pad17E: u16,
pub uiTimer: BSTimer,
pub menuSystemVisible: bool,
pub closingAllMenus: bool,
pub pad1C2: u16,
pub pad1C4: u32,
pub unk1C8: u32,
pub unk1CA: u32,
}
Fields§
§__base: [u8; 8]
§__base1: BSTEventSource<MenuOpenCloseEvent>
§__base2: BSTEventSource<MenuModeChangeEvent>
§__base3: BSTEventSource<*mut c_void>
§processMessagesLock: BSSpinLock
§numPausesGame: u32
§numItemMenus: u32
§numDisablePauseMenu: u32
§numAllowSaving: u32
§numDontHideCursorWhenTopmost: u32
§numCustomRendering: u32
§numApplicationMenus: u32
§modal: bool
§pad17D: u8
§pad17E: u16
§uiTimer: BSTimer
§closingAllMenus: bool
§pad1C2: u16
§pad1C4: u32
§unk1C8: u32
§unk1CA: u32
Implementations§
Source§impl UI
impl UI
Sourcepub fn get_singleton() -> Option<&'static UI>
pub fn get_singleton() -> Option<&'static UI>
Returns a reference to the singleton instance of UI
, if available.
Sourcepub fn get_singleton_mut() -> Option<&'static mut UI>
pub fn get_singleton_mut() -> Option<&'static mut UI>
Returns a mutable reference to the singleton instance of UI
, if available.
Sourcepub const fn game_is_paused(&self) -> bool
pub const fn game_is_paused(&self) -> bool
Returns true if the game is currently paused.
Gets a pointer to the specified menu if it is currently registered.
Sourcepub fn get_movie_view(&self, menu_name: &CStr) -> Option<GPtr<GFxMovieView>>
pub fn get_movie_view(&self, menu_name: &CStr) -> Option<GPtr<GFxMovieView>>
Gets the GFxMovieView
associated with the specified menu.
Returns true if the cursor should be hidden when this UI is the topmost.
Returns true if an inventory/item menu is currently open.
Checks whether a given menu is currently open and on the stack.
Returns true if any modal menu is currently open.
Returns true if the pause menu is currently disabled.
Sourcepub const fn is_saving_allowed(&self) -> bool
pub const fn is_saving_allowed(&self) -> bool
Returns true if saving the game is currently allowed.
Returns true if the menu system is currently being displayed.
Sourcepub const fn is_using_custom_rendering(&self) -> bool
pub const fn is_using_custom_rendering(&self) -> bool
Returns true if custom rendering is being used for menus.
Sourcepub fn register(&mut self, menu_name: &CStr, creator: fn() -> *mut IMenu)
pub fn register(&mut self, menu_name: &CStr, creator: fn() -> *mut IMenu)
Registers a new menu with the UI system.
Sets whether the UI system should be visible.