RigsofRods
Soft-body Physics Simulation
Public Member Functions | Data Fields | Private Member Functions | Private Attributes
RoR::GUI::ConsoleView Struct Reference

Configurable console renderer, implements filtering, colorized text, incons. More...

#include <GUI_ConsoleView.h>

Public Member Functions

void DrawConsoleMessages ()
 
void DrawFilteringOptions ()
 
void RequestReloadMessages ()
 

Data Fields

bool cvw_filter_type_notice = true
 
bool cvw_filter_type_warning = true
 
bool cvw_filter_type_error = true
 
bool cvw_filter_type_chat = true
 
bool cvw_filter_type_cmd = true
 
bool cvw_filter_area_echo = false
 Not the same thing as 'log' command! More...
 
bool cvw_filter_area_script = true
 
bool cvw_filter_area_actor = true
 
bool cvw_filter_area_terrn = true
 
bool cvw_smooth_scrolling = true
 
size_t cvw_msg_duration_ms = 0u
 Message expiration; 0 means unlimited. More...
 
bool cvw_enable_scrolling = false
 
bool cvw_enable_icons = false
 
ImVec4 cvw_background_color = ImVec4(0,0,0,0)
 Text-background color. More...
 
ImVec2 cvw_background_padding = ImVec2(0,0)
 
float cvw_line_spacing = 1.f
 
float alpha = 1.f
 
size_t fadeout_interval = 700u
 

Private Member Functions

bool MessageFilter (Console::Message const &m)
 Returns true if message should be displayed. More...
 
ImVec2 DrawColoredTextWithIcon (ImVec2 text_cursor, Ogre::TexturePtr icon, ImVec4 default_color, std::string const &line)
 Returns final text size. More...
 
int UpdateMessages ()
 Ret. num of new message(s) More...
 
ImVec2 DrawMessage (ImVec2 cursor, Console::Message const &m)
 

Private Attributes

std::vector< Console::Messagem_filtered_messages
 Updated as needed. More...
 
std::vector< const Console::Message * > m_display_messages
 Rebuilt every frame; kept as member to reuse allocated memory. More...
 
bool m_reload_messages = false
 
size_t m_total_messages = 0
 

Detailed Description

Configurable console renderer, implements filtering, colorized text, incons.

Definition at line 40 of file GUI_ConsoleView.h.

Member Function Documentation

◆ DrawColoredTextWithIcon()

ImVec2 ConsoleView::DrawColoredTextWithIcon ( ImVec2  text_cursor,
Ogre::TexturePtr  icon,
ImVec4  default_color,
std::string const &  line 
)
private

Returns final text size.

Definition at line 285 of file GUI_ConsoleView.cpp.

+ Here is the call graph for this function:

◆ DrawConsoleMessages()

void ConsoleView::DrawConsoleMessages ( )

Definition at line 45 of file GUI_ConsoleView.cpp.

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

◆ DrawFilteringOptions()

void ConsoleView::DrawFilteringOptions ( )

Definition at line 247 of file GUI_ConsoleView.cpp.

◆ DrawMessage()

ImVec2 ConsoleView::DrawMessage ( ImVec2  cursor,
Console::Message const &  m 
)
private

Definition at line 155 of file GUI_ConsoleView.cpp.

+ Here is the call graph for this function:

◆ MessageFilter()

bool ConsoleView::MessageFilter ( Console::Message const &  m)
private

Returns true if message should be displayed.

Definition at line 264 of file GUI_ConsoleView.cpp.

◆ RequestReloadMessages()

void RoR::GUI::ConsoleView::RequestReloadMessages ( )
inline

Definition at line 44 of file GUI_ConsoleView.h.

+ Here is the caller graph for this function:

◆ UpdateMessages()

int ConsoleView::UpdateMessages ( )
private

Ret. num of new message(s)

Definition at line 317 of file GUI_ConsoleView.cpp.

+ Here is the call graph for this function:

Field Documentation

◆ alpha

float RoR::GUI::ConsoleView::alpha = 1.f

Definition at line 65 of file GUI_ConsoleView.h.

◆ cvw_background_color

ImVec4 RoR::GUI::ConsoleView::cvw_background_color = ImVec4(0,0,0,0)

Text-background color.

Definition at line 62 of file GUI_ConsoleView.h.

◆ cvw_background_padding

ImVec2 RoR::GUI::ConsoleView::cvw_background_padding = ImVec2(0,0)

Definition at line 63 of file GUI_ConsoleView.h.

◆ cvw_enable_icons

bool RoR::GUI::ConsoleView::cvw_enable_icons = false

Definition at line 61 of file GUI_ConsoleView.h.

◆ cvw_enable_scrolling

bool RoR::GUI::ConsoleView::cvw_enable_scrolling = false

Definition at line 60 of file GUI_ConsoleView.h.

◆ cvw_filter_area_actor

bool RoR::GUI::ConsoleView::cvw_filter_area_actor = true

Definition at line 54 of file GUI_ConsoleView.h.

◆ cvw_filter_area_echo

bool RoR::GUI::ConsoleView::cvw_filter_area_echo = false

Not the same thing as 'log' command!

Definition at line 52 of file GUI_ConsoleView.h.

◆ cvw_filter_area_script

bool RoR::GUI::ConsoleView::cvw_filter_area_script = true

Definition at line 53 of file GUI_ConsoleView.h.

◆ cvw_filter_area_terrn

bool RoR::GUI::ConsoleView::cvw_filter_area_terrn = true

Definition at line 55 of file GUI_ConsoleView.h.

◆ cvw_filter_type_chat

bool RoR::GUI::ConsoleView::cvw_filter_type_chat = true

Definition at line 50 of file GUI_ConsoleView.h.

◆ cvw_filter_type_cmd

bool RoR::GUI::ConsoleView::cvw_filter_type_cmd = true

Definition at line 51 of file GUI_ConsoleView.h.

◆ cvw_filter_type_error

bool RoR::GUI::ConsoleView::cvw_filter_type_error = true

Definition at line 49 of file GUI_ConsoleView.h.

◆ cvw_filter_type_notice

bool RoR::GUI::ConsoleView::cvw_filter_type_notice = true

Definition at line 47 of file GUI_ConsoleView.h.

◆ cvw_filter_type_warning

bool RoR::GUI::ConsoleView::cvw_filter_type_warning = true

Definition at line 48 of file GUI_ConsoleView.h.

◆ cvw_line_spacing

float RoR::GUI::ConsoleView::cvw_line_spacing = 1.f

Definition at line 64 of file GUI_ConsoleView.h.

◆ cvw_msg_duration_ms

size_t RoR::GUI::ConsoleView::cvw_msg_duration_ms = 0u

Message expiration; 0 means unlimited.

Definition at line 59 of file GUI_ConsoleView.h.

◆ cvw_smooth_scrolling

bool RoR::GUI::ConsoleView::cvw_smooth_scrolling = true

Definition at line 56 of file GUI_ConsoleView.h.

◆ fadeout_interval

size_t RoR::GUI::ConsoleView::fadeout_interval = 700u

Definition at line 66 of file GUI_ConsoleView.h.

◆ m_display_messages

std::vector<const Console::Message*> RoR::GUI::ConsoleView::m_display_messages
private

Rebuilt every frame; kept as member to reuse allocated memory.

Definition at line 76 of file GUI_ConsoleView.h.

◆ m_filtered_messages

std::vector<Console::Message> RoR::GUI::ConsoleView::m_filtered_messages
private

Updated as needed.

Definition at line 75 of file GUI_ConsoleView.h.

◆ m_reload_messages

bool RoR::GUI::ConsoleView::m_reload_messages = false
private

Definition at line 77 of file GUI_ConsoleView.h.

◆ m_total_messages

size_t RoR::GUI::ConsoleView::m_total_messages = 0
private

Definition at line 78 of file GUI_ConsoleView.h.


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