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 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
 
bool m_hide_gui = false
 
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 64 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 92 of file GUIManager.h.

Constructor & Destructor Documentation

◆ GUIManager()

RoR::GUIManager::GUIManager ( )

Definition at line 52 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ ~GUIManager()

RoR::GUIManager::~GUIManager ( )

Definition at line 89 of file GUIManager.cpp.

Member Function Documentation

◆ ApplyGuiCaptureKeyboard()

void RoR::GUIManager::ApplyGuiCaptureKeyboard ( )

Call after rendered frame to apply queued value.

Definition at line 110 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ AreStaticMenusAllowed()

bool RoR::GUIManager::AreStaticMenusAllowed ( )

i.e. top menubar / vehicle UI buttons

Definition at line 115 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ DrawCommonGui()

void RoR::GUIManager::DrawCommonGui ( )

Definition at line 366 of file GUIManager.cpp.

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

◆ DrawMainMenuGui()

void RoR::GUIManager::DrawMainMenuGui ( )

Definition at line 389 of file GUIManager.cpp.

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

◆ DrawSimGuiBuffered()

void RoR::GUIManager::DrawSimGuiBuffered ( GfxActor player_gfx_actor)

Reads data from simbuffer.

Definition at line 162 of file GUIManager.cpp.

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

◆ DrawSimulationGui()

void RoR::GUIManager::DrawSimulationGui ( float  dt)

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

Definition at line 129 of file GUIManager.cpp.

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

◆ eventRequestTag()

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

Definition at line 207 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ GetImGui()

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

Definition at line 153 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ GetTheme()

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

Definition at line 154 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiCaptureKeyboardRequested()

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

Definition at line 131 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiHidden()

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

Definition at line 142 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ NewImGuiFrame()

void RoR::GUIManager::NewImGuiFrame ( float  dt)

Definition at line 293 of file GUIManager.cpp.

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

◆ RequestGuiCaptureKeyboard()

void RoR::GUIManager::RequestGuiCaptureKeyboard ( bool  val)

Pass true during frame to prevent input passing to application.

Definition at line 439 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ SetGuiHidden()

void RoR::GUIManager::SetGuiHidden ( bool  visible)

Definition at line 254 of file GUIManager.cpp.

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

◆ SetMouseCursorVisibility()

void RoR::GUIManager::SetMouseCursorVisibility ( MouseCursorVisibility  visi)

Definition at line 265 of file GUIManager.cpp.

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

◆ SetSceneManagerForGuiRendering()

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

Definition at line 249 of file GUIManager.cpp.

◆ SetupImGui()

void RoR::GUIManager::SetupImGui ( )
private

Definition at line 313 of file GUIManager.cpp.

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

◆ SetUpMenuWallpaper()

void RoR::GUIManager::SetUpMenuWallpaper ( )

Definition at line 212 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ ShowMessageBox() [1/2]

void RoR::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 429 of file GUIManager.cpp.

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

◆ ShowMessageBox() [2/2]

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

Definition at line 434 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ ShutdownMyGUI()

void RoR::GUIManager::ShutdownMyGUI ( )

Definition at line 93 of file GUIManager.cpp.

◆ SupressCursor()

void RoR::GUIManager::SupressCursor ( bool  do_supress)

Definition at line 453 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ UpdateInputEvents()

void RoR::GUIManager::UpdateInputEvents ( float  dt)

Definition at line 458 of file GUIManager.cpp.

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

◆ UpdateMouseCursorVisibility()

void RoR::GUIManager::UpdateMouseCursorVisibility ( )

Definition at line 285 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ WakeUpGUI()

void RoR::GUIManager::WakeUpGUI ( )

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

◆ CollisionsDebug

GUI::CollisionsDebug RoR::GUIManager::CollisionsDebug

Definition at line 103 of file GUIManager.h.

◆ ConsoleWindow

GUI::ConsoleWindow RoR::GUIManager::ConsoleWindow

Definition at line 121 of file GUIManager.h.

◆ DirectionArrow

GUI::DirectionArrow RoR::GUIManager::DirectionArrow

Definition at line 123 of file GUIManager.h.

◆ FlexbodyDebug

GUI::FlexbodyDebug RoR::GUIManager::FlexbodyDebug

Definition at line 124 of file GUIManager.h.

◆ FrictionSettings

GUI::FrictionSettings RoR::GUIManager::FrictionSettings

Definition at line 114 of file GUIManager.h.

◆ GameAbout

GUI::GameAbout RoR::GUIManager::GameAbout

Definition at line 105 of file GUIManager.h.

◆ GameControls

GUI::GameControls RoR::GUIManager::GameControls

Definition at line 116 of file GUIManager.h.

◆ GameMainMenu

GUI::GameMainMenu RoR::GUIManager::GameMainMenu

Definition at line 104 of file GUIManager.h.

◆ GameSettings

GUI::GameSettings RoR::GUIManager::GameSettings

Definition at line 106 of file GUIManager.h.

◆ LoadingWindow

GUI::LoadingWindow RoR::GUIManager::LoadingWindow

Definition at line 119 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 170 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 171 of file GUIManager.h.

◆ m_hide_gui

bool RoR::GUIManager::m_hide_gui = false
private

Definition at line 167 of file GUIManager.h.

◆ m_imgui

OgreImGui RoR::GUIManager::m_imgui
private

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

◆ m_last_mousemove_time

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

Definition at line 172 of file GUIManager.h.

◆ m_mygui

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

Definition at line 165 of file GUIManager.h.

◆ m_mygui_platform

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

Definition at line 166 of file GUIManager.h.

◆ m_theme

GuiTheme RoR::GUIManager::m_theme
private

Definition at line 169 of file GUIManager.h.

◆ MainSelector

GUI::MainSelector RoR::GUIManager::MainSelector

Definition at line 111 of file GUIManager.h.

◆ MenuWallpaper

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

Definition at line 125 of file GUIManager.h.

◆ MessageBoxDialog

GUI::MessageBoxDialog RoR::GUIManager::MessageBoxDialog

Definition at line 109 of file GUIManager.h.

◆ MpClientList

GUI::MpClientList RoR::GUIManager::MpClientList

Definition at line 113 of file GUIManager.h.

◆ MultiplayerSelector

GUI::MultiplayerSelector RoR::GUIManager::MultiplayerSelector

Definition at line 110 of file GUIManager.h.

◆ NodeBeamUtils

GUI::NodeBeamUtils RoR::GUIManager::NodeBeamUtils

Definition at line 118 of file GUIManager.h.

◆ RepositorySelector

GUI::RepositorySelector RoR::GUIManager::RepositorySelector

Definition at line 117 of file GUIManager.h.

◆ SimPerfStats

GUI::SimPerfStats RoR::GUIManager::SimPerfStats

Definition at line 108 of file GUIManager.h.

◆ SurveyMap

GUI::SurveyMap RoR::GUIManager::SurveyMap

Definition at line 122 of file GUIManager.h.

◆ TextureToolWindow

GUI::TextureToolWindow RoR::GUIManager::TextureToolWindow

Definition at line 115 of file GUIManager.h.

◆ TopMenubar

GUI::TopMenubar RoR::GUIManager::TopMenubar

Definition at line 120 of file GUIManager.h.

◆ VehicleInfoTPanel

GUI::VehicleInfoTPanel RoR::GUIManager::VehicleInfoTPanel

Definition at line 107 of file GUIManager.h.


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