RigsofRods
Soft-body Physics Simulation
Data Structures | Public Types | Public Member Functions | Data Fields | Private Member Functions | Private Attributes
RoR::GUIManager Class Reference

#include <GUIManager.h>

+ Collaboration diagram for RoR::GUIManager:

Data Structures

struct  GuiTheme
 

Public Types

enum  MouseCursorVisibility { MouseCursorVisibility::VISIBLE, MouseCursorVisibility::HIDDEN, MouseCursorVisibility::SUPRESSED }
 

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)
 Pass true during frame to prevent input passing to application. More...
 
bool IsGuiCaptureKeyboardRequested () const
 
void ApplyGuiCaptureKeyboard ()
 Call after rendered frame to apply queued value. More...
 
bool AreStaticMenusAllowed ()
 i.e. top menubar / vehicle UI buttons More...
 
void ApplyUiPreset ()
 reads cvar 'ui_preset' More...
 
void NewImGuiFrame (float dt)
 
void DrawMainMenuGui ()
 
void DrawSimulationGui (float dt)
 Touches live data; must be called in sync with sim. thread. More...
 
void DrawSimGuiBuffered (GfxActor *player_gfx_actor)
 Reads data from simbuffer. More...
 
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 ()
 
OgreImGuiGetImGui ()
 
GuiThemeGetTheme ()
 
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 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
 
bool m_gui_kb_capture_queued = false
 Resets and accumulates every frame. More...
 
bool m_gui_kb_capture_requested = false
 Effective value, persistent. More...
 
Ogre::Timer m_last_mousemove_time
 
bool m_is_cursor_supressed = false
 True if cursor was manually hidden. More...
 

Detailed Description

Definition at line 75 of file GUIManager.h.

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 103 of file GUIManager.h.

Constructor & Destructor Documentation

◆ GUIManager()

GUIManager::GUIManager ( )

Definition at line 64 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ ~GUIManager()

GUIManager::~GUIManager ( )

Definition at line 101 of file GUIManager.cpp.

Member Function Documentation

◆ ApplyGuiCaptureKeyboard()

void GUIManager::ApplyGuiCaptureKeyboard ( )

Call after rendered frame to apply queued value.

Definition at line 122 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ ApplyUiPreset()

void GUIManager::ApplyUiPreset ( )

reads cvar 'ui_preset'

Definition at line 141 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AreStaticMenusAllowed()

bool GUIManager::AreStaticMenusAllowed ( )

i.e. top menubar / vehicle UI buttons

Definition at line 127 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ DrawCommonGui()

void GUIManager::DrawCommonGui ( )

Definition at line 391 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawMainMenuGui()

void GUIManager::DrawMainMenuGui ( )

Definition at line 414 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawSimGuiBuffered()

void GUIManager::DrawSimGuiBuffered ( GfxActor player_gfx_actor)

Reads data from simbuffer.

Definition at line 187 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DrawSimulationGui()

void GUIManager::DrawSimulationGui ( float  dt)

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

Definition at line 154 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ eventRequestTag()

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

Definition at line 232 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ GetImGui()

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

Definition at line 165 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ GetTheme()

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

Definition at line 166 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiCaptureKeyboardRequested()

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

Definition at line 142 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiHidden()

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

Definition at line 154 of file GUIManager.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ NewImGuiFrame()

void GUIManager::NewImGuiFrame ( float  dt)

Definition at line 318 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RequestGuiCaptureKeyboard()

void GUIManager::RequestGuiCaptureKeyboard ( bool  val)

Pass true during frame to prevent input passing to application.

Definition at line 464 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ SetGuiHidden()

void GUIManager::SetGuiHidden ( bool  visible)

Definition at line 279 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetMouseCursorVisibility()

void GUIManager::SetMouseCursorVisibility ( MouseCursorVisibility  visi)

Definition at line 290 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetSceneManagerForGuiRendering()

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

Definition at line 274 of file GUIManager.cpp.

◆ SetupImGui()

void GUIManager::SetupImGui ( )
private

Definition at line 338 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetUpMenuWallpaper()

void GUIManager::SetUpMenuWallpaper ( )

Definition at line 237 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ 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 454 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowMessageBox() [2/2]

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

Definition at line 459 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ ShutdownMyGUI()

void GUIManager::ShutdownMyGUI ( )

Definition at line 105 of file GUIManager.cpp.

◆ SupressCursor()

void GUIManager::SupressCursor ( bool  do_supress)

Definition at line 478 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ UpdateInputEvents()

void GUIManager::UpdateInputEvents ( float  dt)

Definition at line 483 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateMouseCursorVisibility()

void GUIManager::UpdateMouseCursorVisibility ( )

Definition at line 310 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ WakeUpGUI()

void GUIManager::WakeUpGUI ( )

Definition at line 469 of file GUIManager.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ ChatBox

GUI::GameChatBox RoR::GUIManager::ChatBox

Definition at line 123 of file GUIManager.h.

◆ CollisionsDebug

GUI::CollisionsDebug RoR::GUIManager::CollisionsDebug

Definition at line 114 of file GUIManager.h.

◆ ConsoleWindow

GUI::ConsoleWindow RoR::GUIManager::ConsoleWindow

Definition at line 132 of file GUIManager.h.

◆ DirectionArrow

GUI::DirectionArrow RoR::GUIManager::DirectionArrow

Definition at line 134 of file GUIManager.h.

◆ FlexbodyDebug

GUI::FlexbodyDebug RoR::GUIManager::FlexbodyDebug

Definition at line 135 of file GUIManager.h.

◆ FrictionSettings

GUI::FrictionSettings RoR::GUIManager::FrictionSettings

Definition at line 125 of file GUIManager.h.

◆ GameAbout

GUI::GameAbout RoR::GUIManager::GameAbout

Definition at line 116 of file GUIManager.h.

◆ GameControls

GUI::GameControls RoR::GUIManager::GameControls

Definition at line 127 of file GUIManager.h.

◆ GameMainMenu

GUI::GameMainMenu RoR::GUIManager::GameMainMenu

Definition at line 115 of file GUIManager.h.

◆ GameSettings

GUI::GameSettings RoR::GUIManager::GameSettings

Definition at line 117 of file GUIManager.h.

◆ LoadingWindow

GUI::LoadingWindow RoR::GUIManager::LoadingWindow

Definition at line 130 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 181 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 182 of file GUIManager.h.

◆ m_imgui

OgreImGui RoR::GUIManager::m_imgui
private

Definition at line 179 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 184 of file GUIManager.h.

◆ m_last_mousemove_time

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

Definition at line 183 of file GUIManager.h.

◆ m_mygui

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

Definition at line 177 of file GUIManager.h.

◆ m_mygui_platform

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

Definition at line 178 of file GUIManager.h.

◆ m_theme

GuiTheme RoR::GUIManager::m_theme
private

Definition at line 180 of file GUIManager.h.

◆ MainSelector

GUI::MainSelector RoR::GUIManager::MainSelector

Definition at line 122 of file GUIManager.h.

◆ MenuWallpaper

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

Definition at line 136 of file GUIManager.h.

◆ MessageBoxDialog

GUI::MessageBoxDialog RoR::GUIManager::MessageBoxDialog

Definition at line 120 of file GUIManager.h.

◆ MpClientList

GUI::MpClientList RoR::GUIManager::MpClientList

Definition at line 124 of file GUIManager.h.

◆ MultiplayerSelector

GUI::MultiplayerSelector RoR::GUIManager::MultiplayerSelector

Definition at line 121 of file GUIManager.h.

◆ NodeBeamUtils

GUI::NodeBeamUtils RoR::GUIManager::NodeBeamUtils

Definition at line 129 of file GUIManager.h.

◆ RepositorySelector

GUI::RepositorySelector RoR::GUIManager::RepositorySelector

Definition at line 128 of file GUIManager.h.

◆ SimPerfStats

GUI::SimPerfStats RoR::GUIManager::SimPerfStats

Definition at line 119 of file GUIManager.h.

◆ SurveyMap

GUI::SurveyMap RoR::GUIManager::SurveyMap

Definition at line 133 of file GUIManager.h.

◆ TextureToolWindow

GUI::TextureToolWindow RoR::GUIManager::TextureToolWindow

Definition at line 126 of file GUIManager.h.

◆ TopMenubar

GUI::TopMenubar RoR::GUIManager::TopMenubar

Definition at line 131 of file GUIManager.h.

◆ VehicleInfoTPanel

GUI::VehicleInfoTPanel RoR::GUIManager::VehicleInfoTPanel

Definition at line 118 of file GUIManager.h.


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