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::SimActorStats SimActorStats
 
GUI::SimPerfStats SimPerfStats
 
GUI::MessageBoxDialog MessageBoxDialog
 
GUI::MultiplayerSelector MultiplayerSelector
 
GUI::MainSelector MainSelector
 
GUI::GameChatBox ChatBox
 
GUI::VehicleDescription VehicleDescription
 
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::VehicleButtons VehicleButtons
 
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 66 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 94 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 377 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 400 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 218 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ GetImGui()

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

Definition at line 157 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ GetTheme()

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

Definition at line 158 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiCaptureKeyboardRequested()

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

Definition at line 135 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ IsGuiHidden()

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

Definition at line 146 of file GUIManager.h.

+ Here is the caller graph for this function:

◆ NewImGuiFrame()

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

Definition at line 304 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 450 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ SetGuiHidden()

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

Definition at line 265 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 276 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 260 of file GUIManager.cpp.

◆ SetupImGui()

void RoR::GUIManager::SetupImGui ( )
private

Definition at line 324 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 223 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 440 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 445 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 464 of file GUIManager.cpp.

+ Here is the caller graph for this function:

◆ UpdateInputEvents()

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

Definition at line 469 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 296 of file GUIManager.cpp.

+ Here is the call graph for this function:

◆ WakeUpGUI()

void RoR::GUIManager::WakeUpGUI ( )

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

◆ CollisionsDebug

GUI::CollisionsDebug RoR::GUIManager::CollisionsDebug

Definition at line 105 of file GUIManager.h.

◆ ConsoleWindow

GUI::ConsoleWindow RoR::GUIManager::ConsoleWindow

Definition at line 124 of file GUIManager.h.

◆ DirectionArrow

GUI::DirectionArrow RoR::GUIManager::DirectionArrow

Definition at line 126 of file GUIManager.h.

◆ FlexbodyDebug

GUI::FlexbodyDebug RoR::GUIManager::FlexbodyDebug

Definition at line 128 of file GUIManager.h.

◆ FrictionSettings

GUI::FrictionSettings RoR::GUIManager::FrictionSettings

Definition at line 117 of file GUIManager.h.

◆ GameAbout

GUI::GameAbout RoR::GUIManager::GameAbout

Definition at line 107 of file GUIManager.h.

◆ GameControls

GUI::GameControls RoR::GUIManager::GameControls

Definition at line 119 of file GUIManager.h.

◆ GameMainMenu

GUI::GameMainMenu RoR::GUIManager::GameMainMenu

Definition at line 106 of file GUIManager.h.

◆ GameSettings

GUI::GameSettings RoR::GUIManager::GameSettings

Definition at line 108 of file GUIManager.h.

◆ LoadingWindow

GUI::LoadingWindow RoR::GUIManager::LoadingWindow

Definition at line 122 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 174 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 175 of file GUIManager.h.

◆ m_hide_gui

bool RoR::GUIManager::m_hide_gui = false
private

Definition at line 171 of file GUIManager.h.

◆ m_imgui

OgreImGui RoR::GUIManager::m_imgui
private

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

◆ m_last_mousemove_time

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

Definition at line 176 of file GUIManager.h.

◆ m_mygui

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

Definition at line 169 of file GUIManager.h.

◆ m_mygui_platform

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

Definition at line 170 of file GUIManager.h.

◆ m_theme

GuiTheme RoR::GUIManager::m_theme
private

Definition at line 173 of file GUIManager.h.

◆ MainSelector

GUI::MainSelector RoR::GUIManager::MainSelector

Definition at line 113 of file GUIManager.h.

◆ MenuWallpaper

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

Definition at line 129 of file GUIManager.h.

◆ MessageBoxDialog

GUI::MessageBoxDialog RoR::GUIManager::MessageBoxDialog

Definition at line 111 of file GUIManager.h.

◆ MpClientList

GUI::MpClientList RoR::GUIManager::MpClientList

Definition at line 116 of file GUIManager.h.

◆ MultiplayerSelector

GUI::MultiplayerSelector RoR::GUIManager::MultiplayerSelector

Definition at line 112 of file GUIManager.h.

◆ NodeBeamUtils

GUI::NodeBeamUtils RoR::GUIManager::NodeBeamUtils

Definition at line 121 of file GUIManager.h.

◆ RepositorySelector

GUI::RepositorySelector RoR::GUIManager::RepositorySelector

Definition at line 120 of file GUIManager.h.

◆ SimActorStats

GUI::SimActorStats RoR::GUIManager::SimActorStats

Definition at line 109 of file GUIManager.h.

◆ SimPerfStats

GUI::SimPerfStats RoR::GUIManager::SimPerfStats

Definition at line 110 of file GUIManager.h.

◆ SurveyMap

GUI::SurveyMap RoR::GUIManager::SurveyMap

Definition at line 125 of file GUIManager.h.

◆ TextureToolWindow

GUI::TextureToolWindow RoR::GUIManager::TextureToolWindow

Definition at line 118 of file GUIManager.h.

◆ TopMenubar

GUI::TopMenubar RoR::GUIManager::TopMenubar

Definition at line 123 of file GUIManager.h.

◆ VehicleButtons

GUI::VehicleButtons RoR::GUIManager::VehicleButtons

Definition at line 127 of file GUIManager.h.

◆ VehicleDescription

GUI::VehicleDescription RoR::GUIManager::VehicleDescription

Definition at line 115 of file GUIManager.h.


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