RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Protected Types | Protected Member Functions | Protected Attributes
RoR::GUI::SurveyMap Class Reference

In-game map widget Has 3 display modes (see SurveyMapMode), cycled using input SURVEY_MAP_TOGGLE_VIEW More...

#include <GUI_SurveyMap.h>

Public Member Functions

void CreateTerrainTextures ()
 
void Draw ()
 
bool IsVisible () const
 
bool IsHovered () const
 
void CycleMode ()
 
void ToggleMode ()
 

Data Fields

const float WINDOW_PADDING = 4.f
 
const float WINDOW_ROUNDING = 2.f
 

Protected Types

enum  SurveyMapMode { SurveyMapMode::NONE, SurveyMapMode::SMALL, SurveyMapMode::BIG }
 

Protected Member Functions

void setMapZoom (float zoom)
 
void setMapZoomRelative (float dt_sec)
 
const char * getTypeByDriveable (const ActorPtr &actor)
 
const char * getAIType (const ActorPtr &actor)
 
void CacheMapIcon (SurveyMapEntity &e)
 
void DrawMapIcon (const SurveyMapEntity &e, ImVec2 view_pos, ImVec2 view_size, Ogre::Vector2 view_origin)
 
ImVec2 DrawWaypoint (ImVec2 view_pos, ImVec2 view_size, Ogre::Vector2 view_origin, std::string const &caption, int idx)
 
ImVec2 CalcWaypointMapPos (ImVec2 view_pos, ImVec2 view_size, Ogre::Vector2 view_origin, int idx)
 
void CacheIcons ()
 

Protected Attributes

SurveyMapMode mMapMode = SurveyMapMode::NONE
 
SurveyMapMode mMapLastMode = SurveyMapMode::NONE
 
bool mWindowMouseHovered = false
 
bool mMouseClicked = false
 
int mWaypointNum = 0
 
Ogre::Vector2 mTerrainSize = Ogre::Vector2::ZERO
 
Ogre::Vector2 mMapCenterOffset = Ogre::Vector2::ZERO
 
float mMapZoom = 0.f
 
Ogre::TexturePtr mMapTexture
 
bool m_icons_cached = false
 
Ogre::TexturePtr m_left_mouse_button
 
Ogre::TexturePtr m_middle_mouse_button
 
Ogre::TexturePtr m_middle_mouse_scroll_button
 
Ogre::TexturePtr m_right_mouse_button
 
ImVec2 m_circle_center
 
float m_circle_radius = 0.f
 

Detailed Description

In-game map widget Has 3 display modes (see SurveyMapMode), cycled using input SURVEY_MAP_TOGGLE_VIEW

Definition at line 48 of file GUI_SurveyMap.h.

Member Enumeration Documentation

◆ SurveyMapMode

enum RoR::GUI::SurveyMap::SurveyMapMode
strongprotected
Enumerator
NONE 
SMALL 
BIG 

Definition at line 64 of file GUI_SurveyMap.h.

Member Function Documentation

◆ CacheIcons()

void SurveyMap::CacheIcons ( )
protected

Definition at line 671 of file GUI_SurveyMap.cpp.

+ Here is the call graph for this function:

◆ CacheMapIcon()

void SurveyMap::CacheMapIcon ( SurveyMapEntity e)
protected

Definition at line 683 of file GUI_SurveyMap.cpp.

◆ CalcWaypointMapPos()

ImVec2 SurveyMap::CalcWaypointMapPos ( ImVec2  view_pos,
ImVec2  view_size,
Ogre::Vector2  view_origin,
int  idx 
)
protected

Definition at line 656 of file GUI_SurveyMap.cpp.

+ Here is the call graph for this function:

◆ CreateTerrainTextures()

void SurveyMap::CreateTerrainTextures ( )

Definition at line 440 of file GUI_SurveyMap.cpp.

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

◆ CycleMode()

void SurveyMap::CycleMode ( )

Definition at line 536 of file GUI_SurveyMap.cpp.

+ Here is the caller graph for this function:

◆ Draw()

void SurveyMap::Draw ( )

Definition at line 46 of file GUI_SurveyMap.cpp.

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

◆ DrawMapIcon()

void SurveyMap::DrawMapIcon ( const SurveyMapEntity e,
ImVec2  view_pos,
ImVec2  view_size,
Ogre::Vector2  view_origin 
)
protected

Definition at line 552 of file GUI_SurveyMap.cpp.

+ Here is the call graph for this function:

◆ DrawWaypoint()

ImVec2 SurveyMap::DrawWaypoint ( ImVec2  view_pos,
ImVec2  view_size,
Ogre::Vector2  view_origin,
std::string const &  caption,
int  idx 
)
protected

Definition at line 592 of file GUI_SurveyMap.cpp.

+ Here is the call graph for this function:

◆ getAIType()

const char * SurveyMap::getAIType ( const ActorPtr actor)
protected

Definition at line 518 of file GUI_SurveyMap.cpp.

◆ getTypeByDriveable()

const char * SurveyMap::getTypeByDriveable ( const ActorPtr actor)
protected

Definition at line 497 of file GUI_SurveyMap.cpp.

◆ IsHovered()

bool RoR::GUI::SurveyMap::IsHovered ( ) const
inline

Definition at line 58 of file GUI_SurveyMap.h.

+ Here is the call graph for this function:

◆ IsVisible()

bool RoR::GUI::SurveyMap::IsVisible ( ) const
inline

Definition at line 57 of file GUI_SurveyMap.h.

+ Here is the caller graph for this function:

◆ setMapZoom()

void SurveyMap::setMapZoom ( float  zoom)
protected

Definition at line 481 of file GUI_SurveyMap.cpp.

◆ setMapZoomRelative()

void SurveyMap::setMapZoomRelative ( float  dt_sec)
protected

Definition at line 491 of file GUI_SurveyMap.cpp.

◆ ToggleMode()

void SurveyMap::ToggleMode ( )

Definition at line 547 of file GUI_SurveyMap.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ m_circle_center

ImVec2 RoR::GUI::SurveyMap::m_circle_center
protected

Definition at line 107 of file GUI_SurveyMap.h.

◆ m_circle_radius

float RoR::GUI::SurveyMap::m_circle_radius = 0.f
protected

Definition at line 108 of file GUI_SurveyMap.h.

◆ m_icons_cached

bool RoR::GUI::SurveyMap::m_icons_cached = false
protected

Definition at line 99 of file GUI_SurveyMap.h.

◆ m_left_mouse_button

Ogre::TexturePtr RoR::GUI::SurveyMap::m_left_mouse_button
protected

Definition at line 100 of file GUI_SurveyMap.h.

◆ m_middle_mouse_button

Ogre::TexturePtr RoR::GUI::SurveyMap::m_middle_mouse_button
protected

Definition at line 101 of file GUI_SurveyMap.h.

◆ m_middle_mouse_scroll_button

Ogre::TexturePtr RoR::GUI::SurveyMap::m_middle_mouse_scroll_button
protected

Definition at line 102 of file GUI_SurveyMap.h.

◆ m_right_mouse_button

Ogre::TexturePtr RoR::GUI::SurveyMap::m_right_mouse_button
protected

Definition at line 103 of file GUI_SurveyMap.h.

◆ mMapCenterOffset

Ogre::Vector2 RoR::GUI::SurveyMap::mMapCenterOffset = Ogre::Vector2::ZERO
protected

Definition at line 94 of file GUI_SurveyMap.h.

◆ mMapLastMode

SurveyMapMode RoR::GUI::SurveyMap::mMapLastMode = SurveyMapMode::NONE
protected

Definition at line 87 of file GUI_SurveyMap.h.

◆ mMapMode

SurveyMapMode RoR::GUI::SurveyMap::mMapMode = SurveyMapMode::NONE
protected

Definition at line 86 of file GUI_SurveyMap.h.

◆ mMapTexture

Ogre::TexturePtr RoR::GUI::SurveyMap::mMapTexture
protected

Definition at line 96 of file GUI_SurveyMap.h.

◆ mMapZoom

float RoR::GUI::SurveyMap::mMapZoom = 0.f
protected

Definition at line 95 of file GUI_SurveyMap.h.

◆ mMouseClicked

bool RoR::GUI::SurveyMap::mMouseClicked = false
protected

Definition at line 89 of file GUI_SurveyMap.h.

◆ mTerrainSize

Ogre::Vector2 RoR::GUI::SurveyMap::mTerrainSize = Ogre::Vector2::ZERO
protected

Definition at line 93 of file GUI_SurveyMap.h.

◆ mWaypointNum

int RoR::GUI::SurveyMap::mWaypointNum = 0
protected

Definition at line 90 of file GUI_SurveyMap.h.

◆ mWindowMouseHovered

bool RoR::GUI::SurveyMap::mWindowMouseHovered = false
protected

Definition at line 88 of file GUI_SurveyMap.h.

◆ WINDOW_PADDING

const float RoR::GUI::SurveyMap::WINDOW_PADDING = 4.f

Definition at line 52 of file GUI_SurveyMap.h.

◆ WINDOW_ROUNDING

const float RoR::GUI::SurveyMap::WINDOW_ROUNDING = 2.f

Definition at line 53 of file GUI_SurveyMap.h.


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