Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Data Structures | Public Types | Public Member Functions | Data Fields | Private Member Functions | Private Attributes
RoR::GUIManager Class Reference

Description

Definition at line 75 of file GUIManager.h.

Data Structures

struct  GuiTheme
 

Public Types

enum class  MouseCursorVisibility
 

Public Member Functions

 GUIManager ()
 
 ~GUIManager ()
 
void ShowMessageBox (const char *title, const char *text, bool allow_close=true, const char *btn1_text="OK", const char *btn2_text=nullptr)
 
void ShowMessageBox (GUI::MessageBoxConfig const &conf)
 
void RequestGuiCaptureKeyboard (bool val)
 
bool IsGuiCaptureKeyboardRequested () const
 
void ApplyGuiCaptureKeyboard ()
 
bool AreStaticMenusAllowed ()
 
void ApplyUiPreset ()
 
void ReinitUI ()
 
float GetUiScaleFactor () const
 
void NewImGuiFrame (float dt)
 
void DrawMainMenuGui ()
 
void DrawSimulationGui (float dt)
 
void DrawSimGuiBuffered (GfxActor *player_gfx_actor)
 
void DrawCommonGui ()
 
void SetGuiHidden (bool visible)
 
bool IsGuiHidden () const
 
void SetSceneManagerForGuiRendering (Ogre::SceneManager *scene_manager)
 
void ShutdownMyGUI ()
 
void SetMouseCursorVisibility (MouseCursorVisibility visi)
 
void UpdateMouseCursorVisibility ()
 
void SupressCursor (bool do_supress)
 
void SetUpMenuWallpaper ()
 
OgreImGui & GetImGui ()
 
GuiTheme & GetTheme ()
 
RTTLayerManager & GetRttLayerManager ()
 
void WakeUpGUI ()
 
void UpdateInputEvents (float dt)
 

Data Fields

GUI::CollisionsDebug CollisionsDebug
 
GUI::GameMainMenu GameMainMenu
 
GUI::GameAbout GameAbout
 
GUI::GameSettings GameSettings
 
GUI::VehicleInfoTPanel VehicleInfoTPanel
 
GUI::SimPerfStats SimPerfStats
 
GUI::MessageBoxDialog MessageBoxDialog
 
GUI::MultiplayerSelector MultiplayerSelector
 
GUI::MainSelector MainSelector
 
GUI::GameChatBox ChatBox
 
GUI::MpClientList MpClientList
 
GUI::FrictionSettings FrictionSettings
 
GUI::TextureToolWindow TextureToolWindow
 
GUI::GameControls GameControls
 
GUI::RepositorySelector RepositorySelector
 
GUI::NodeBeamUtils NodeBeamUtils
 
GUI::LoadingWindow LoadingWindow
 
GUI::TopMenubar TopMenubar
 
GUI::ConsoleWindow ConsoleWindow
 
GUI::SurveyMap SurveyMap
 
GUI::DirectionArrow DirectionArrow
 
GUI::FlexbodyDebug FlexbodyDebug
 
Ogre::Overlay * MenuWallpaper = nullptr
 

Private Member Functions

void SetupImGui ()
 
void ApplyImGuiStyle ()
 
void eventRequestTag (const MyGUI::UString &_tag, MyGUI::UString &_result)
 

Private Attributes

MyGUI::Gui * m_mygui = nullptr
 
MyGUI::OgrePlatform * m_mygui_platform = nullptr
 
OgreImGui m_imgui
 
GuiTheme m_theme
 
RTTLayerManager m_rtt_layer_manager
 
bool m_gui_kb_capture_queued = false
 
bool m_gui_kb_capture_requested = false
 
Ogre::Timer m_last_mousemove_time
 
bool m_is_cursor_supressed = false
 
float m_active_ui_scale_factor = 1.f
 

Member Enumeration Documentation

◆ MouseCursorVisibility

Enumerator
VISIBLE 

Visible, will be auto-hidden if not moving for a while.

HIDDEN 

Hidden as inactive, will re-appear the moment user moves mouse.

SUPRESSED 

Hidden manually, will not re-appear until explicitly set VISIBLE.

Definition at line 106 of file GUIManager.h.

Constructor & Destructor Documentation

◆ GUIManager()

GUIManager::GUIManager ( )

Definition at line 66 of file GUIManager.cpp.

◆ ~GUIManager()

GUIManager::~GUIManager ( )

Definition at line 107 of file GUIManager.cpp.

Member Function Documentation

◆ ApplyGuiCaptureKeyboard()

void GUIManager::ApplyGuiCaptureKeyboard ( )

Call after rendered frame to apply queued value.

Definition at line 128 of file GUIManager.cpp.

◆ ApplyImGuiStyle()

void GUIManager::ApplyImGuiStyle ( )
private

Resets style to defaults, applies RoR theme and scales by 'ui_scale_factor'.

Definition at line 377 of file GUIManager.cpp.

◆ ApplyUiPreset()

void GUIManager::ApplyUiPreset ( )

reads cvar 'ui_preset'

Definition at line 147 of file GUIManager.cpp.

◆ AreStaticMenusAllowed()

bool GUIManager::AreStaticMenusAllowed ( )

i.e. top menubar / vehicle UI buttons

Definition at line 133 of file GUIManager.cpp.

◆ DrawCommonGui()

void GUIManager::DrawCommonGui ( )

Definition at line 436 of file GUIManager.cpp.

◆ DrawMainMenuGui()

void GUIManager::DrawMainMenuGui ( )

Definition at line 469 of file GUIManager.cpp.

◆ DrawSimGuiBuffered()

void GUIManager::DrawSimGuiBuffered ( GfxActor *  player_gfx_actor)

Reads data from simbuffer.

Definition at line 195 of file GUIManager.cpp.

◆ DrawSimulationGui()

void GUIManager::DrawSimulationGui ( float  dt)

Touches live data; must be called in sync with sim. thread.

Definition at line 160 of file GUIManager.cpp.

◆ eventRequestTag()

void GUIManager::eventRequestTag ( const MyGUI::UString &  _tag,
MyGUI::UString &  _result 
)
private

Definition at line 240 of file GUIManager.cpp.

◆ GetImGui()

OgreImGui & RoR::GUIManager::GetImGui ( )
inline

Definition at line 170 of file GUIManager.h.

◆ GetRttLayerManager()

RTTLayerManager & RoR::GUIManager::GetRttLayerManager ( )
inline

Definition at line 172 of file GUIManager.h.

◆ GetTheme()

GuiTheme & RoR::GUIManager::GetTheme ( )
inline

Definition at line 171 of file GUIManager.h.

◆ GetUiScaleFactor()

float GUIManager::GetUiScaleFactor ( ) const

Reads cvar 'ui_scale_factor', clamped to sane range.

Definition at line 372 of file GUIManager.cpp.

◆ IsGuiCaptureKeyboardRequested()

bool RoR::GUIManager::IsGuiCaptureKeyboardRequested ( ) const
inline

Definition at line 145 of file GUIManager.h.

◆ IsGuiHidden()

bool RoR::GUIManager::IsGuiHidden ( ) const
inline

Definition at line 159 of file GUIManager.h.

◆ NewImGuiFrame()

void GUIManager::NewImGuiFrame ( float  dt)

Definition at line 326 of file GUIManager.cpp.

◆ ReinitUI()

void GUIManager::ReinitUI ( )

Reloads fonts and re-applies style; reads cvar 'ui_scale_factor'. Must be called outside ImGui frame (processing MSG_APP_REINIT_UI_REQUESTED).

Definition at line 354 of file GUIManager.cpp.

◆ RequestGuiCaptureKeyboard()

void GUIManager::RequestGuiCaptureKeyboard ( bool  val)

Pass true during frame to prevent input passing to application.

Definition at line 514 of file GUIManager.cpp.

◆ SetGuiHidden()

void GUIManager::SetGuiHidden ( bool  visible)

Definition at line 287 of file GUIManager.cpp.

◆ SetMouseCursorVisibility()

void GUIManager::SetMouseCursorVisibility ( MouseCursorVisibility  visi)

Definition at line 298 of file GUIManager.cpp.

◆ SetSceneManagerForGuiRendering()

void GUIManager::SetSceneManagerForGuiRendering ( Ogre::SceneManager *  scene_manager)

Definition at line 282 of file GUIManager.cpp.

◆ SetupImGui()

void GUIManager::SetupImGui ( )
private

Definition at line 346 of file GUIManager.cpp.

◆ SetUpMenuWallpaper()

void GUIManager::SetUpMenuWallpaper ( )

Definition at line 245 of file GUIManager.cpp.

◆ ShowMessageBox() [1/2]

void GUIManager::ShowMessageBox ( const char *  title,
const char *  text,
bool  allow_close = true,
const char *  btn1_text = "OK",
const char *  btn2_text = nullptr 
)

Definition at line 504 of file GUIManager.cpp.

◆ ShowMessageBox() [2/2]

void GUIManager::ShowMessageBox ( GUI::MessageBoxConfig const &  conf)

Definition at line 509 of file GUIManager.cpp.

◆ ShutdownMyGUI()

void GUIManager::ShutdownMyGUI ( )

Definition at line 111 of file GUIManager.cpp.

◆ SupressCursor()

void GUIManager::SupressCursor ( bool  do_supress)

Definition at line 528 of file GUIManager.cpp.

◆ UpdateInputEvents()

void GUIManager::UpdateInputEvents ( float  dt)

Definition at line 533 of file GUIManager.cpp.

◆ UpdateMouseCursorVisibility()

void GUIManager::UpdateMouseCursorVisibility ( )

Definition at line 318 of file GUIManager.cpp.

◆ WakeUpGUI()

void GUIManager::WakeUpGUI ( )

Definition at line 519 of file GUIManager.cpp.

Field Documentation

◆ ChatBox

GUI::GameChatBox RoR::GUIManager::ChatBox

Definition at line 126 of file GUIManager.h.

◆ CollisionsDebug

GUI::CollisionsDebug RoR::GUIManager::CollisionsDebug

Definition at line 117 of file GUIManager.h.

◆ ConsoleWindow

GUI::ConsoleWindow RoR::GUIManager::ConsoleWindow

Definition at line 135 of file GUIManager.h.

◆ DirectionArrow

GUI::DirectionArrow RoR::GUIManager::DirectionArrow

Definition at line 137 of file GUIManager.h.

◆ FlexbodyDebug

GUI::FlexbodyDebug RoR::GUIManager::FlexbodyDebug

Definition at line 138 of file GUIManager.h.

◆ FrictionSettings

GUI::FrictionSettings RoR::GUIManager::FrictionSettings

Definition at line 128 of file GUIManager.h.

◆ GameAbout

GUI::GameAbout RoR::GUIManager::GameAbout

Definition at line 119 of file GUIManager.h.

◆ GameControls

GUI::GameControls RoR::GUIManager::GameControls

Definition at line 130 of file GUIManager.h.

◆ GameMainMenu

GUI::GameMainMenu RoR::GUIManager::GameMainMenu

Definition at line 118 of file GUIManager.h.

◆ GameSettings

GUI::GameSettings RoR::GUIManager::GameSettings

Definition at line 120 of file GUIManager.h.

◆ LoadingWindow

GUI::LoadingWindow RoR::GUIManager::LoadingWindow

Definition at line 133 of file GUIManager.h.

◆ m_active_ui_scale_factor

float RoR::GUIManager::m_active_ui_scale_factor = 1.f
private

Last applied value of cvar 'ui_scale_factor', clamped to sane range.

Definition at line 193 of file GUIManager.h.

◆ m_gui_kb_capture_queued

bool RoR::GUIManager::m_gui_kb_capture_queued = false
private

Resets and accumulates every frame.

Definition at line 189 of file GUIManager.h.

◆ m_gui_kb_capture_requested

bool RoR::GUIManager::m_gui_kb_capture_requested = false
private

Effective value, persistent.

Definition at line 190 of file GUIManager.h.

◆ m_imgui

OgreImGui RoR::GUIManager::m_imgui
private

Definition at line 186 of file GUIManager.h.

◆ m_is_cursor_supressed

bool RoR::GUIManager::m_is_cursor_supressed = false
private

True if cursor was manually hidden.

Definition at line 192 of file GUIManager.h.

◆ m_last_mousemove_time

Ogre::Timer RoR::GUIManager::m_last_mousemove_time
private

Definition at line 191 of file GUIManager.h.

◆ m_mygui

MyGUI::Gui* RoR::GUIManager::m_mygui = nullptr
private

Definition at line 184 of file GUIManager.h.

◆ m_mygui_platform

MyGUI::OgrePlatform* RoR::GUIManager::m_mygui_platform = nullptr
private

Definition at line 185 of file GUIManager.h.

◆ m_rtt_layer_manager

RTTLayerManager RoR::GUIManager::m_rtt_layer_manager
private

Manages dashboard RTT layers (reusable).

Definition at line 188 of file GUIManager.h.

◆ m_theme

GuiTheme RoR::GUIManager::m_theme
private

Definition at line 187 of file GUIManager.h.

◆ MainSelector

GUI::MainSelector RoR::GUIManager::MainSelector

Definition at line 125 of file GUIManager.h.

◆ MenuWallpaper

Ogre::Overlay* RoR::GUIManager::MenuWallpaper = nullptr

Definition at line 139 of file GUIManager.h.

◆ MessageBoxDialog

GUI::MessageBoxDialog RoR::GUIManager::MessageBoxDialog

Definition at line 123 of file GUIManager.h.

◆ MpClientList

GUI::MpClientList RoR::GUIManager::MpClientList

Definition at line 127 of file GUIManager.h.

◆ MultiplayerSelector

GUI::MultiplayerSelector RoR::GUIManager::MultiplayerSelector

Definition at line 124 of file GUIManager.h.

◆ NodeBeamUtils

GUI::NodeBeamUtils RoR::GUIManager::NodeBeamUtils

Definition at line 132 of file GUIManager.h.

◆ RepositorySelector

GUI::RepositorySelector RoR::GUIManager::RepositorySelector

Definition at line 131 of file GUIManager.h.

◆ SimPerfStats

GUI::SimPerfStats RoR::GUIManager::SimPerfStats

Definition at line 122 of file GUIManager.h.

◆ SurveyMap

GUI::SurveyMap RoR::GUIManager::SurveyMap

Definition at line 136 of file GUIManager.h.

◆ TextureToolWindow

GUI::TextureToolWindow RoR::GUIManager::TextureToolWindow

Definition at line 129 of file GUIManager.h.

◆ TopMenubar

GUI::TopMenubar RoR::GUIManager::TopMenubar

Definition at line 134 of file GUIManager.h.

◆ VehicleInfoTPanel

GUI::VehicleInfoTPanel RoR::GUIManager::VehicleInfoTPanel

Definition at line 121 of file GUIManager.h.


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