RigsofRods
Soft-body Physics Simulation
GUI_GameChatBox.h
Go to the documentation of this file.
1 /*
2  This source file is part of Rigs of Rods
3  Copyright 2005-2012 Pierre-Michel Ricordel
4  Copyright 2007-2012 Thomas Fischer
5  Copyright 2013-2020 Petr Ohlidal
6 
7  For more information, see http://www.rigsofrods.org/
8 
9  Rigs of Rods is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License version 3, as
11  published by the Free Software Foundation.
12 
13  Rigs of Rods is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with Rigs of Rods. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
25 
26 #pragma once
27 
28 #include "Application.h"
29 
30 #include "GUI_ConsoleView.h"
31 
32 #include <mutex>
33 #include <string>
34 #include <vector>
35 
36 namespace RoR {
37 namespace GUI {
38 
41 {
42 public:
43  GameChatBox();
44 
45  void SetVisible(bool v) { m_is_visible = v; m_kb_focused = false; };
46  bool IsVisible() const { return m_is_visible; }
47 
48  void Draw();
50 
51 private:
52  void SubmitMessage();
53 
54  bool m_is_visible = false;
55  bool m_kb_focused = false;
58  bool initialized = true;
59  bool init_scroll = false;
60 };
61 
62 } // namespace GUI
63 } // namespace RoR
RoR::GUI::GameChatBox
Overlay showing chat/console messages on screen, with optional entry field.
Definition: GUI_GameChatBox.h:40
RoR::GUI::GameChatBox::initialized
bool initialized
Definition: GUI_GameChatBox.h:58
RoR::GUI::GameChatBox::m_is_visible
bool m_is_visible
Special: false means 'display only messages'.
Definition: GUI_GameChatBox.h:54
GUI_ConsoleView.h
Generic console rendering.
RoR::GUI::GameChatBox::GetConsoleView
ConsoleView & GetConsoleView()
Definition: GUI_GameChatBox.h:49
RoR::GUI::GameChatBox::init_scroll
bool init_scroll
Definition: GUI_GameChatBox.h:59
RoR::GUI::ConsoleView
Configurable console renderer, implements filtering, colorized text, incons.
Definition: GUI_ConsoleView.h:40
RoR::GUI::GameChatBox::m_kb_focused
bool m_kb_focused
Definition: GUI_GameChatBox.h:55
RoR::GUI::GameChatBox::IsVisible
bool IsVisible() const
Definition: GUI_GameChatBox.h:46
RoR::Str< 400 >
RoR::GUI::GameChatBox::SetVisible
void SetVisible(bool v)
Definition: GUI_GameChatBox.h:45
RoR::GUI::GameChatBox::m_msg_buffer
Str< 400 > m_msg_buffer
Definition: GUI_GameChatBox.h:56
Application.h
Central state/object manager and communications hub.
RoR::GUI::GameChatBox::Draw
void Draw()
Definition: GUI_GameChatBox.cpp:48
RoR::GUI::GameChatBox::SubmitMessage
void SubmitMessage()
Flush the user input box.
Definition: GUI_GameChatBox.cpp:169
RoR::GUI::GameChatBox::m_console_view
ConsoleView m_console_view
Definition: GUI_GameChatBox.h:57
RoR::GUI::GameChatBox::GameChatBox
GameChatBox()
Definition: GUI_GameChatBox.cpp:39
RoR
Definition: AppContext.h:36