Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
GUI_VehicleInfoTPanel.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-2024 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
26
27#pragma once
28
29#include "ForwardDeclarations.h"
30
31namespace RoR {
32namespace GUI {
33
35{
36public:
39
43 bool IsHornButtonActive() const { return m_horn_btn_active; }
44
45 void UpdateStats(float dt, ActorPtr actor);
46 void Draw(RoR::GfxActor* actorx);
47
48private:
55 bool m_startupdemo_init = false;
56 ImVec4 m_panel_translucent_color = ImVec4(0.1f, 0.1f, 0.1f, 0.5f);
57 ImVec4 m_transluc_textdis_color = ImVec4(0.64f, 0.64f, 0.63f, 1.f);
58 float GetPanelWidth();
60
66
69
70 ImVec4 m_cmdbeam_highlight_color = ImVec4(0.733f, 1.f, 0.157f, 0.745f);
73 ImVec4 m_command_hovered_text_color = ImVec4(0.1f, 0.1f, 0.1f, 1.f);
74 bool m_helptext_fullsize = false;
77
81 float m_stat_health = 0.f;
84 float m_stat_beam_stress = 0.f;
85 float m_stat_mass_Kg = 0.f;
86 float m_stat_avg_deform = 0.f;
87 float m_stat_gcur_x = 0.f;
88 float m_stat_gcur_y = 0.f;
89 float m_stat_gcur_z = 0.f;
90 float m_stat_gmax_x = 0.f;
91 float m_stat_gmax_y = 0.f;
92 float m_stat_gmax_z = 0.f;
94
97 void DrawVehicleDiagUI(RoR::GfxActor* actorx);
99
107 void DrawHornButton(RoR::GfxActor* actorx);
108 void DrawMirrorButton(RoR::GfxActor* actorx);
109 void DrawRepairButton(RoR::GfxActor* actorx);
114 void DrawAxleDiffButton(RoR::GfxActor* actorx);
119 void DrawBeaconButton(RoR::GfxActor* actorx);
121 void DrawEngineButton(RoR::GfxActor* actorx);
123 void DrawLockButton(RoR::GfxActor* actorx);
124 void DrawSecureButton(RoR::GfxActor* actorx);
126 void DrawCameraButton();
128 void CacheIcons();
129 bool m_horn_btn_active = false;
130 bool m_icons_cached = false;
131 Ogre::TexturePtr m_headlight_icon;
132 Ogre::TexturePtr m_left_blinker_icon;
133 Ogre::TexturePtr m_right_blinker_icon;
134 Ogre::TexturePtr m_warning_light_icon;
135 Ogre::TexturePtr m_horn_icon;
136 Ogre::TexturePtr m_mirror_icon;
137 Ogre::TexturePtr m_repair_icon;
138 Ogre::TexturePtr m_parking_brake_icon;
139 Ogre::TexturePtr m_traction_control_icon;
140 Ogre::TexturePtr m_abs_icon;
141 Ogre::TexturePtr m_physics_icon;
142 Ogre::TexturePtr m_actor_physics_icon;
143 Ogre::TexturePtr m_a_icon;
144 Ogre::TexturePtr m_w_icon;
145 Ogre::TexturePtr m_m_icon;
146 Ogre::TexturePtr m_g_icon;
147 Ogre::TexturePtr m_particle_icon;
148 Ogre::TexturePtr m_shift_icon;
149 Ogre::TexturePtr m_engine_icon;
150 Ogre::TexturePtr m_beacons_icon;
151 Ogre::TexturePtr m_camera_icon;
152 Ogre::TexturePtr m_lock_icon;
153 Ogre::TexturePtr m_secure_icon;
154 Ogre::TexturePtr m_cruise_control_icon;
156};
157
158
159
160} // namespace GUI
161} // namespace RoR
Global forward declarations.
void DrawVehicleStatsUI(RoR::GfxActor *actorx)
void DrawEngineButton(RoR::GfxActor *actorx)
CommandkeyID_t GetActiveCommandKey() const
void DrawWarnBlinkerButton(RoR::GfxActor *actorx)
void SetVisible(TPanelMode mode, TPanelFocus focus=TPANELFOCUS_NONE)
void DrawVehicleCommandsUI(RoR::GfxActor *actorx)
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
void DrawSecureButton(RoR::GfxActor *actorx)
void DrawParkingBrakeButton(RoR::GfxActor *actorx)
void DrawVehicleDiagUI(RoR::GfxActor *actorx)
void DrawLeftBlinkerButton(RoR::GfxActor *actorx)
void DrawParticlesButton(RoR::GfxActor *actorx)
void DrawRepairButton(RoR::GfxActor *actorx)
void DrawHornButton(RoR::GfxActor *actorx)
void DrawVehicleHelpTextureFullsize(RoR::GfxActor *actorx)
void DrawMirrorButton(RoR::GfxActor *actorx)
bool IsVisible(TPanelFocus focus=TPANELFOCUS_NONE) const
void DrawHeadLightButton(RoR::GfxActor *actorx)
void DrawBeaconButton(RoR::GfxActor *actorx)
void DrawCruiseControlButton(RoR::GfxActor *actorx)
void DrawActorPhysicsButton(RoR::GfxActor *actorx)
void DrawAxleDiffButton(RoR::GfxActor *actorx)
void DrawVehicleCommandHighlights(RoR::GfxActor *actorx)
void DrawShiftModeButton(RoR::GfxActor *actorx)
void DrawCustomLightButton(RoR::GfxActor *actorx)
TPanelFocus m_current_focus
Updated based on currently open tab.
void DrawLockButton(RoR::GfxActor *actorx)
void Draw(RoR::GfxActor *actorx)
ImVec2 m_helptext_fullsize_screenpos
The image is drawn into separate window.
void DrawVehicleBasicsUI(RoR::GfxActor *actorx)
void DrawTransferCaseModeButton(RoR::GfxActor *actorx)
void DrawTransferCaseGearRatioButton(RoR::GfxActor *actorx)
void DrawWheelDiffButton(RoR::GfxActor *actorx)
void DrawAntiLockBrakeButton(RoR::GfxActor *actorx)
void DrawCustomLightButtons(RoR::GfxActor *actorx)
TPanelFocus m_requested_focus
Requested by SetVisible()
void DrawTractionControlButton(RoR::GfxActor *actorx)
void DrawRightBlinkerButton(RoR::GfxActor *actorx)
int CommandkeyID_t
Index into Actor::ar_commandkeys (BEWARE: indexed 1-MAX_COMMANDKEYS, 0 is invalid value,...
static const CommandkeyID_t COMMANDKEYID_INVALID