RigsofRods
Soft-body Physics Simulation
GUI_VehicleInfoTPanel.cpp
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 
22 #include "GUI_VehicleInfoTPanel.h"
23 
24 #include "Application.h"
25 #include "Actor.h"
26 #include "SimData.h"
27 #include "Language.h"
28 #include "Engine.h"
29 #include "GameContext.h"
30 #include "GfxActor.h"
31 #include "GUIManager.h"
32 #include "Utils.h"
33 #include "GUIUtils.h"
34 
35 using namespace RoR;
36 using namespace GUI;
37 
38 const float HELP_TEXTURE_WIDTH = 512.f;
39 const float HELP_TEXTURE_HEIGHT = 128.f;
40 const ImVec2 MAX_PREVIEW_SIZE(100.f, 100.f);
41 const float MIN_PANEL_WIDTH = 230.f;
42 
44 {
45  // === DETERMINE VISIBILITY ===
46 
47  // Show only once for 5 sec, with a notice
48  bool show_translucent = false;
49  if (App::ui_show_vehicle_buttons->getBool() && actorx && !m_startupdemo_init)
50  {
51  m_startupdemo_timer.reset();
53  fmt::format(_LC("VehicleButtons", "Hover the mouse on the left to see controls")), "lightbulb.png");
54  m_startupdemo_init = true;
55  }
56  if (App::ui_show_vehicle_buttons->getBool() && m_startupdemo_timer.getMilliseconds() < 5000)
57  {
58  show_translucent = true;
59  }
60 
61  // Show when mouse is on the left of screen
63  && App::ui_show_vehicle_buttons->getBool()
64  && App::GetGuiManager()->AreStaticMenusAllowed()
65  && (ImGui::GetIO().MousePos.x <= MIN_PANEL_WIDTH + ImGui::GetStyle().WindowPadding.x*2))
66  {
67  show_translucent = true;
68  }
69 
70  if (show_translucent && m_visibility_mode != TPANELMODE_OPAQUE)
71  {
73  }
74  else if (!show_translucent && m_visibility_mode != TPANELMODE_OPAQUE)
75  {
77  }
78 
80  {
81  return;
82  }
83 
84  // === OPEN IMGUI WINDOW ===
85 
87 
88  ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse |
89  ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar;
90 
91  ImGui::SetNextWindowPos(ImVec2(theme.screen_edge_padding.x, (theme.screen_edge_padding.y + 110)));
92  ImGui::SetNextWindowContentWidth(MIN_PANEL_WIDTH);
93  switch (m_visibility_mode)
94  {
95  case TPANELMODE_OPAQUE:
96  ImGui::PushStyleColor(ImGuiCol_WindowBg, theme.semitransparent_window_bg);
97  ImGui::PushStyleColor(ImGuiCol_TextDisabled, ImGui::GetStyle().Colors[ImGuiCol_TextDisabled]);
98  break;
99 
101  ImGui::PushStyleColor(ImGuiCol_WindowBg, m_panel_translucent_color);
102  ImGui::PushStyleColor(ImGuiCol_TextDisabled, m_transluc_textdis_color);
103  break;
104 
105  default:
106  break;
107  }
108  ImGui::Begin("VehicleInfoTPanel", nullptr, flags);
109 
110  // === DECIDE WHAT THE WINDOW WILL DISPLAY ===
111 
112  int tabflags_basics = ImGuiTabItemFlags_None;
113  int tabflags_stats = ImGuiTabItemFlags_None;
114  int tabflags_commands = ImGuiTabItemFlags_None;
115  int tabflags_diag = ImGuiTabItemFlags_None;
117  {
118  switch (m_requested_focus)
119  {
120  case TPANELFOCUS_BASICS: tabflags_basics = ImGuiTabItemFlags_SetSelected; break;
121  case TPANELFOCUS_STATS: tabflags_stats = ImGuiTabItemFlags_SetSelected; break;
122  case TPANELFOCUS_DIAG: tabflags_diag = ImGuiTabItemFlags_SetSelected; break;
123  case TPANELFOCUS_COMMANDS: tabflags_commands = ImGuiTabItemFlags_SetSelected; break;
124  default:;
125  }
126 
127  // Reset the request
129  }
130 
131  // === DRAW THE WINDOW HEADER - MINI IMAGE (if available) AND VEHICLE NAME ===
132 
133  ImVec2 name_pos = ImGui::GetCursorPos();
134  ImVec2 tabs_pos;
135  if (actorx->GetActor()->getUsedActorEntry()->filecachename != "")
136  {
137  Ogre::TexturePtr preview_tex = Ogre::TextureManager::getSingleton().load(
139  // Scale the image
140  ImVec2 MAX_PREVIEW_SIZE(100.f, 100.f);
141  ImVec2 size(preview_tex->getWidth(), preview_tex->getHeight());
142  size *= MAX_PREVIEW_SIZE.x / size.x; // Fit size along X
143  if (size.y > MAX_PREVIEW_SIZE.y) // Reduce size along Y if needed
144  {
145  size *= MAX_PREVIEW_SIZE.y / size.y;
146  }
147  // Draw the image
148  ImGui::Image(reinterpret_cast<ImTextureID>(preview_tex->getHandle()), size);
149  tabs_pos = ImGui::GetCursorPos();
150  // Move name to the right
151  name_pos.x += size.x + ImGui::GetStyle().ItemSpacing.x;
152  ImGui::SetCursorPos(name_pos);
153  }
154 
156 
157  // === DRAW TAB BAR ===
158 
159  if (actorx->GetActor()->getUsedActorEntry()->filecachename != "")
160  {
161  ImGui::SetCursorPos(tabs_pos);
162  }
163  ImGui::BeginTabBar("VehicleInfoTPanelTabs", ImGuiTabBarFlags_None);
164  if (ImGui::BeginTabItem(_LC("TPanel", "Basics"), nullptr, tabflags_basics))
165  {
167  this->DrawVehicleBasicsUI(actorx);
168 
169  ImGui::EndTabItem();
170  }
171  if (ImGui::BeginTabItem(_LC("TPanel", "Stats"), nullptr, tabflags_stats))
172  {
174  this->DrawVehicleStatsUI(actorx);
175 
176  ImGui::EndTabItem();
177  }
178  if (ImGui::BeginTabItem(_LC("TPanel", "Commands"), nullptr, tabflags_commands))
179  {
181  this->DrawVehicleCommandsUI(actorx);
182 
183  ImGui::EndTabItem();
184  }
185  if (ImGui::BeginTabItem(_LC("TPanel", "Diag"), nullptr, tabflags_diag))
186  {
188  this->DrawVehicleDiagUI(actorx);
189 
190  ImGui::EndTabItem();
191  }
192 
193  ImGui::EndTabBar();
194 
195  ImGui::End();
196  ImGui::PopStyleColor(2); // WindowBg, TextDisabled
197 
198  this->DrawVehicleCommandHighlights(actorx);
199 }
200 
202 {
203  // === DRAW DESCRIPTION (if available) ===
204 
205  if (!actorx->GetActor()->getDescription().empty())
206  {
207  ImGui::TextDisabled("%s", _LC("VehicleDescription", "Description text:"));
208  for (auto line : actorx->GetActor()->getDescription())
209  {
210  ImGui::TextWrapped("%s", line.c_str());
211  }
212  }
213 
214  // === DRAW HELP TEXTURE (if available) ===
215 
216  if (actorx->GetHelpTex())
217  {
218  ImGui::TextDisabled("%s", _LC("VehicleDescription", "Help image:"));
219  ImGui::SameLine();
220  ImGui::SetCursorPosX(MIN_PANEL_WIDTH - (ImGui::CalcTextSize(_LC("VehicleDescription", "Full size")).x + 25.f));
221  ImGui::Checkbox(_LC("VehicleDescription", "Full size"), &m_helptext_fullsize);
222 
224  {
225  m_helptext_fullsize_screenpos = ImGui::GetCursorScreenPos();
226  ImGui::Dummy(ImVec2(MIN_PANEL_WIDTH, HELP_TEXTURE_HEIGHT));
227  this->DrawVehicleHelpTextureFullsize(actorx);
228  }
229  else
230  {
231  ImTextureID im_tex = reinterpret_cast<ImTextureID>(actorx->GetHelpTex()->getHandle());
232  ImGui::Image(im_tex, ImVec2(MIN_PANEL_WIDTH, HELP_TEXTURE_HEIGHT));
233  }
234  }
235 
236  // === DRAW COMMAND KEYS, WITH HIGHLIGHT ===
237 
240 
241  if (actorx->GetActor()->ar_unique_commandkey_pairs.size() > 0)
242  {
243  ImGui::TextDisabled("%s", _LC("VehicleDescription", "Command controls:"));
244  ImGui::PushStyleColor(ImGuiCol_Text, m_cmdbeam_highlight_color);
245  ImGui::Text("%s", _LC("VehicleDescription", "Hover controls for on-vehicle highlight"));
246  ImGui::PopStyleColor(1); // Text
247 
248  for (const UniqueCommandKeyPair& qpair: actorx->GetActor()->ar_unique_commandkey_pairs)
249  {
250  // Calc key-button sizes for right alignment (also to check if they fit on the description line)
251  ImVec2 initial_cursor = ImGui::GetCursorScreenPos();
252  const RoR::events event1 = (RoR::events)RoR::InputEngine::resolveEventName(fmt::format("COMMANDS_{:02d}", qpair.uckp_key1));
253  const RoR::events event2 = (RoR::events)RoR::InputEngine::resolveEventName(fmt::format("COMMANDS_{:02d}", qpair.uckp_key2));
254  std::string desc = qpair.uckp_description;
255  if (qpair.uckp_description == "")
256  {
257  desc = _LC("VehicleDescription", "~unlabeled~");
258  }
259  ImVec2 key1_size = ImCalcEventHighlightedSize(event1);
260  ImVec2 key2_size = ImCalcEventHighlightedSize(event2);
261  ImVec2 desc_size = ImGui::CalcTextSize(desc.c_str());
262  const bool single_line = ImGui::GetWindowContentRegionMax().x > desc_size.x + key1_size.x + key2_size.x;
263  static const float BUMP_HEIGHT = 3.f;
264  static const float MOUSEHIGHLIGHT_MAGICPADRIGHT = 4.f;
265 
266  // The line-highlighting: Done manually because `ImGui::Selectable()` blocks buttons under it (or gets blocked by buttons with the `_AllowItemOverlap` flag).
267  ImVec2 highlight_mouse_min = initial_cursor - ImGui::GetStyle().ItemSpacing/2;
268  ImVec2 highlight_mouse_max = highlight_mouse_min + ImVec2(ImGui::GetWindowContentRegionWidth()+MOUSEHIGHLIGHT_MAGICPADRIGHT, ImGui::GetTextLineHeightWithSpacing());
269  if (!single_line)
270  {
271  highlight_mouse_max.y += ImGui::GetTextLineHeightWithSpacing() - BUMP_HEIGHT;
272  }
273 
274  if ((ImGui::GetMousePos().x > highlight_mouse_min.x && ImGui::GetMousePos().y > highlight_mouse_min.y)
275  && (ImGui::GetMousePos().x < highlight_mouse_max.x && ImGui::GetMousePos().y < highlight_mouse_max.y))
276  {
277  // This is only for the command-highlight HUD; key1/key2 both point to the same command beams.
278  m_hovered_commandkey = qpair.uckp_key1;
279 
280  // Draw the highlight
281  ImVec4 col = m_cmdbeam_highlight_color;
282  col.w = 0.55f;
283  ImDrawList* draw_list = ImGui::GetWindowDrawList();
284  draw_list->AddRectFilled(highlight_mouse_min, highlight_mouse_max, ImColor(col));
285 
286  // Description comes first - colored for contrast
287  ImGui::TextColored(m_command_hovered_text_color, "%s", desc.c_str());
288  }
289  else
290  {
291  // Description comes first
292  ImGui::Text("%s", desc.c_str());
293  }
294 
295 
296  if (single_line)
297  {
298  ImGui::SameLine(); // They fit!
299  }
300  else
301  {
302  ImGui::SetCursorPos(ImGui::GetCursorPos() + ImVec2(0.f, -BUMP_HEIGHT)); // They must go below, but bump them up a bit
303  }
304 
305  // Key 1
306  bool key1_hovered = false;
307  bool key1_active = false;
308  ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().x) - key1_size.x - key2_size.x - ImGui::GetStyle().ItemSpacing.x);
309  ImDrawEventHighlightedButton(event1, &key1_hovered, &key1_active);
310  if (key1_active)
311  {
312  m_active_commandkey = qpair.uckp_key1;
313  }
314  if (key1_hovered)
315  {
316  m_hovered_commandkey = qpair.uckp_key1;
317  }
318  ImGui::SameLine();
319 
320  // Key 2
321  ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().x) - key2_size.x);
322  bool key2_hovered = false;
323  bool key2_active = false;
324  ImDrawEventHighlightedButton(event2, &key2_hovered, &key2_active);
325  if (key2_active)
326  {
327  m_active_commandkey = qpair.uckp_key2;
328  }
329  if (key2_hovered)
330  {
331  m_hovered_commandkey = qpair.uckp_key2;
332  }
333  }
334  }
335 }
336 
337 void DrawStatsLineColored(const char* name, const std::string& value, ImVec4 value_color)
338 {
340  ImGui::TextColored(theme.value_blue_text_color, "%s", name);
341  // If the value is too long, move it to next line
342  ImVec2 label_size = ImGui::CalcTextSize(name);
343  ImVec2 value_size = ImGui::CalcTextSize(value.c_str());
344  float cursor_x_desired = - ImGui::CalcTextSize(value.c_str()).x;
345  if (label_size.x + value_size.x + ImGui::GetStyle().ItemSpacing.x < ImGui::GetWindowContentRegionWidth())
346  {
347  ImGui::SameLine();
348  }
349  ImGui::SetCursorPosX(ImGui::GetWindowContentRegionMax().x - value_size.x);
350  ImGui::TextColored(value_color, "%s", value.c_str());
351 }
352 
353 void DrawStatsLine(const char* name, const std::string& value)
354 {
355  DrawStatsLineColored(name, value, ImGui::GetStyle().Colors[ImGuiCol_Text]);
356 }
357 
358 void DrawStatsBullet(const char* name, const std::string& value)
359 {
361  ImGui::PushStyleColor(ImGuiCol_Text, theme.value_blue_text_color);
362  ImGui::Bullet();
363  ImGui::PopStyleColor(); // Text
364  ImGui::SameLine();
365  DrawStatsLineColored(name, value, ImGui::GetStyle().Colors[ImGuiCol_Text]);
366 }
367 
369 {
371  ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(ImGui::GetStyle().ItemSpacing.x, 0));
372 
373  if (m_stat_health < 1.0f)
374  {
375  const float value = static_cast<float>( Round((1.0f - m_stat_health) * 100.0f, 2) );
376  DrawStatsLine(_LC("SimActorStats", "Vehicle health: "), fmt::format("{:.2f}%", value));
377  }
378  else if (m_stat_health >= 1.0f) //When this condition is true, it means that health is at 0% which means 100% of destruction.
379  {
380  DrawStatsLine(_LC("SimActorStats", "Vehicle destruction: "), "100%");
381  }
382 
383  const int num_beams = actorx->GetActor()->ar_num_beams;
384  DrawStatsLine(_LC("SimActorStats", "Beam count: "), fmt::format("{}", num_beams));
385 
386  const float broken_pct = static_cast<float>( Round((float)m_stat_broken_beams / (float)num_beams, 2) * 100.0f );
387  DrawStatsLine(_LC("SimActorStats", "Broken beams count: "), fmt::format("{} ({:.0f}%)", m_stat_broken_beams, broken_pct));
388 
389  const float deform_pct = static_cast<float>( Round((float)m_stat_deformed_beams / (float)num_beams * 100.0f) );
390  DrawStatsLine(_LC("SimActorStats", "Deformed beams count: "), fmt::format("{} ({:.0f}%)", m_stat_deformed_beams, deform_pct));
391 
392  const float avg_deform = static_cast<float>( Round((float)m_stat_avg_deform / (float)num_beams, 4) * 100.0f );
393  DrawStatsLine(_LC("SimActorStats", "Average deformation: "), fmt::format("{:.2f}", avg_deform));
394 
395  const float avg_stress = 1.f - (float)m_stat_beam_stress / (float)num_beams;
396  DrawStatsLine(_LC("SimActorStats", "Average stress: "), fmt::format("{:+08.0f}", avg_stress));
397 
398  ImGui::NewLine();
399 
400  const int num_nodes = actorx->GetActor()->ar_num_nodes;
401  const int num_wheelnodes = actorx->GetActor()->getWheelNodeCount();
402  DrawStatsLine(_LC("SimActorStats", "Node count: "), fmt::format("{} (wheels: {})", num_nodes, num_wheelnodes));
403  if (App::gfx_speedo_imperial->getBool())
404  {
405  DrawStatsLine(_LC("SimActorStats", "Total mass: "), fmt::format("{:8.2f} lb", m_stat_mass_Kg * 2.205));
406  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:8.2f} kg",m_stat_mass_Kg));
407  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.2f} tons", m_stat_mass_Kg / 1000.0f));
408  }
409  else
410  {
411  DrawStatsLine(_LC("SimActorStats", "Total mass: "), fmt::format("{:8.2f} kg", m_stat_mass_Kg));
412  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:8.2f} lb", m_stat_mass_Kg * 2.205));
413  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.2f} tons", m_stat_mass_Kg / 1000.0f));
414  }
415 
416  ImGui::NewLine();
417 
418  const float n0_velo_len = actorx->GetSimDataBuffer().simbuf_node0_velo.length();
420  {
421  const double PI = 3.14159265358979323846;
422 
423  const float max_rpm = actorx->GetSimDataBuffer().simbuf_engine_max_rpm;
424  const float torque = actorx->GetSimDataBuffer().simbuf_engine_torque;
425  const float turbo_psi = actorx->GetSimDataBuffer().simbuf_engine_turbo_psi;
426  const float cur_rpm = actorx->GetSimDataBuffer().simbuf_engine_rpm;
427  const float wheel_speed = actorx->GetSimDataBuffer().simbuf_wheel_speed;
428 
429  const ImVec4 rpm_color = (cur_rpm > max_rpm) ? theme.value_red_text_color : ImGui::GetStyle().Colors[ImGuiCol_Text];
430  DrawStatsLineColored(_LC("SimActorStats", "Engine RPM: "), fmt::format("{:.2f} / {:.2f}", cur_rpm, max_rpm), rpm_color);
431 
432  const float inputshaft_rpm = Round(std::max(0.0f, actorx->GetSimDataBuffer().simbuf_inputshaft_rpm));
433  DrawStatsLineColored(_LC("SimActorStats", "Input shaft RPM: "), fmt::format("{:.0f}", inputshaft_rpm), rpm_color);
434 
435  DrawStatsLine(_LC("SimActorStats", "Current torque: "), fmt::format("{:.0f} Nm", Round(torque)));
436 
437  const float currentKw = (((cur_rpm * (torque + ((turbo_psi * 6.8) * torque) / 100) * ( PI / 30)) / 1000));
438  if (App::gfx_speedo_imperial->getBool())
439  {
440  DrawStatsLine(_LC("SimActorStats", "Current power: "), fmt::format("{:.0f}hp ({:.0f}Kw)", Round(currentKw * 1.34102209), Round(currentKw)));
441  }
442  else
443  {
444  DrawStatsLine(_LC("SimActorStats", "Current power: "), fmt::format("{:.0f}Kw ({:.0f}hp)", Round(currentKw), Round(currentKw * 1.34102209)));
445  }
446 
447  DrawStatsLine(_LC("SimActorStats", "Current gear: "), fmt::format("{}", actorx->GetSimDataBuffer().simbuf_gear));
448 
449  DrawStatsLine(_LC("SimActorStats", "Drive ratio: "), fmt::format("{:.2f}:1", actorx->GetSimDataBuffer().simbuf_drive_ratio));
450 
451  float velocityKPH = wheel_speed * 3.6f;
452  float velocityMPH = wheel_speed * 2.23693629f;
453  float carSpeedKPH = n0_velo_len * 3.6f;
454  float carSpeedMPH = n0_velo_len * 2.23693629f;
455 
456  // apply a deadzone ==> no flickering +/-
457  if (fabs(wheel_speed) < 1.0f)
458  {
459  velocityKPH = velocityMPH = 0.0f;
460  }
461  if (fabs(n0_velo_len) < 1.0f)
462  {
463  carSpeedKPH = carSpeedMPH = 0.0f;
464  }
465 
466  if (App::gfx_speedo_imperial->getBool())
467  {
468  DrawStatsLine(_LC("SimActorStats", "Wheel speed: "), fmt::format("{:.0f} mph ({:.0f} km/h)", Round(velocityMPH), Round(velocityKPH)));
469 
470  DrawStatsLine(_LC("SimActorStats", "Vehicle speed: "), fmt::format("{:.0f} mph ({:.0f} km/h)", Round(carSpeedMPH), Round(carSpeedKPH)));
471  }
472  else
473  {
474  DrawStatsLine(_LC("SimActorStats", "Wheel speed: "), fmt::format("{:.0f} km/h ({:.0f} mph)", Round(velocityKPH), Round(velocityMPH)));
475 
476  DrawStatsLine(_LC("SimActorStats", "Vehicle speed: "), fmt::format("{:.0f} km/h ({:.0f} mph)", Round(carSpeedKPH), Round(carSpeedMPH)));
477  }
478  }
479  else // Aircraft or boat
480  {
481  float speedKN = n0_velo_len * 1.94384449f;
482  if (App::gfx_speedo_imperial->getBool())
483  {
484  DrawStatsLine(_LC("SimActorStats", "Current speed: "), fmt::format("{:.0f} kn", Round(speedKN)));
485  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.0f} mph", Round(speedKN * 1.151)));
486  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.0f} km/h", Round(speedKN * 1.852)));
487  }
488  else
489  {
490  DrawStatsLine(_LC("SimActorStats", "Current speed: "), fmt::format("{:.0f} kn", Round(speedKN)));
491  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.0f} km/h", Round(speedKN * 1.852)));
492  DrawStatsLine(_LC("SimActorStats", ""), fmt::format("{:.0f} mph", Round(speedKN * 1.151)));
493  }
494 
495  ImGui::NewLine();
496 
497  if (actorx->GetSimDataBuffer().simbuf_driveable == AIRPLANE)
498  {
499  const float altitude = actorx->GetSimNodeBuffer()[0].AbsPosition.y / 30.48 * 100;
500  DrawStatsLine(_LC("SimActorStats", "Altitude: "), fmt::format("{:.0f} feet ({:.0f} meters)", Round(altitude), Round(altitude * 0.30480)));
501 
502  int engine_num = 1; // UI; count from 1
504  {
505  std::string label = fmt::format("{} #{}:", _LC("SimActorStats", "Engine "), engine_num);
506  if (ae.simbuf_ae_type == AeroEngineType::AE_XPROP) // Turboprop/pistonprop
507  {
508  DrawStatsLine(label.c_str(), fmt::format("{:.2f} RPM", ae.simbuf_ae_rpm));
509  }
510  else // Turbojet
511  {
512  DrawStatsLine(label.c_str(), fmt::format("{:.2f}", ae.simbuf_ae_rpm));
513  }
514  ++engine_num;
515  }
516  }
517  else if (actorx->GetSimDataBuffer().simbuf_driveable == BOAT)
518  {
519  int engine_num = 1; // UI; count from 1
520  for (ScrewpropSB& screw: actorx->GetSimDataBuffer().simbuf_screwprops)
521  {
522  std::string label = fmt::format("{} #{}:", _LC("SimActorStats", "Engine "), engine_num);
523  DrawStatsLine(label.c_str(), fmt::format("{:.2f}", screw.simbuf_sp_throttle));
524  ++engine_num;
525  }
526  }
527  }
528 
529  ImGui::NewLine();
530 
531  const float speedKPH = actorx->GetSimDataBuffer().simbuf_top_speed * 3.6f;
532  const float speedMPH = actorx->GetSimDataBuffer().simbuf_top_speed * 2.23693629f;
533  if (App::gfx_speedo_imperial->getBool())
534  {
535  DrawStatsLine(_LC("SimActorStats", "Top speed: "), fmt::format("{:.0f} mph ({:.0f} km/h)", Round(speedMPH), Round(speedKPH)));
536  }
537  else
538  {
539  DrawStatsLine(_LC("SimActorStats", "Top speed: "), fmt::format("{:.0f} km/h ({:.0f} mph)", Round(speedKPH), Round(speedMPH)));
540  }
541 
542  ImGui::NewLine();
543 
544  DrawStatsLine(_LC("SimActorStats", "G-Forces:"), "");
545  DrawStatsBullet("Vertical:", fmt::format("{: 6.2f}g ({:1.2f}g)", m_stat_gcur_x, m_stat_gmax_x));
546  DrawStatsBullet("Sagittal:", fmt::format("{: 6.2f}g ({:1.2f}g)", m_stat_gcur_y, m_stat_gmax_y));
547  DrawStatsBullet("Lateral:", fmt::format("{: 6.2f}g ({:1.2f}g)", m_stat_gcur_z, m_stat_gmax_z));
548 
549  ImGui::PopStyleVar(); // ItemSpacing
550 }
551 
553 {
554  ImGui::TextDisabled("%s", _LC("TopMenubar", "Live diagnostic views:"));
555  ImGui::TextDisabled("%s", fmt::format(_LC("TopMenubar", "(Toggle with {})"), App::GetInputEngine()->getEventCommandTrimmed(EV_COMMON_TOGGLE_DEBUG_VIEW)).c_str());
556  ImGui::TextDisabled("%s", fmt::format(_LC("TopMenubar", "(Cycle with {})"), App::GetInputEngine()->getEventCommandTrimmed(EV_COMMON_CYCLE_DEBUG_VIEWS)).c_str());
557 
558  int debug_view_type = static_cast<int>(actorx->GetDebugView());
559  ImGui::RadioButton(_LC("TopMenubar", "Normal view"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_NONE));
560  ImGui::RadioButton(_LC("TopMenubar", "Skeleton view"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_SKELETON));
561  ImGui::RadioButton(_LC("TopMenubar", "Node details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_NODES));
562  ImGui::RadioButton(_LC("TopMenubar", "Beam details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_BEAMS));
563  ActorPtr current_actor = actorx->GetActor();
564  if (current_actor->ar_num_wheels > 0)
565  {
566  ImGui::RadioButton(_LC("TopMenubar", "Wheel details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_WHEELS));
567  }
568  if (current_actor->ar_num_shocks > 0)
569  {
570  ImGui::RadioButton(_LC("TopMenubar", "Shock details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_SHOCKS));
571  }
572  if (current_actor->ar_num_rotators > 0)
573  {
574  ImGui::RadioButton(_LC("TopMenubar", "Rotator details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_ROTATORS));
575  }
576  if (current_actor->hasSlidenodes())
577  {
578  ImGui::RadioButton(_LC("TopMenubar", "Slidenode details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_SLIDENODES));
579  }
580  if (current_actor->ar_num_cabs > 0)
581  {
582  ImGui::RadioButton(_LC("TopMenubar", "Submesh details"), &debug_view_type, static_cast<int>(DebugViewType::DEBUGVIEW_SUBMESH));
583  }
584 
585  if ((current_actor != nullptr) && (debug_view_type != static_cast<int>(current_actor->GetGfxActor()->GetDebugView())))
586  {
587  current_actor->GetGfxActor()->SetDebugView(static_cast<DebugViewType>(debug_view_type));
588  }
589 
590  if (debug_view_type >= 1 && debug_view_type <= static_cast<int>(DebugViewType::DEBUGVIEW_BEAMS))
591  {
592  ImGui::Separator();
593  ImGui::TextDisabled("%s", _LC("TopMenubar", "Settings:"));
594  DrawGCheckbox(App::diag_hide_broken_beams, _LC("TopMenubar", "Hide broken beams"));
595  DrawGCheckbox(App::diag_hide_beam_stress, _LC("TopMenubar", "Hide beam stress"));
596  DrawGCheckbox(App::diag_hide_wheels, _LC("TopMenubar", "Hide wheels"));
597  DrawGCheckbox(App::diag_hide_nodes, _LC("TopMenubar", "Hide nodes"));
598  if (debug_view_type >= 2)
599  {
600  DrawGCheckbox(App::diag_hide_wheel_info, _LC("TopMenubar", "Hide wheel info"));
601  }
602  }
603 
604 }
605 
607 {
608  m_visibility_mode = mode;
609  m_requested_focus = focus; // Cannot be handled here, must be handled in Draw() while window is open.
610 }
611 
613 {
614  //taken from TruckHUD.cpp (now removed)
615  beam_t* beam = actor->ar_beams;
616  float average_deformation = 0.0f;
617  float beamstress = 0.0f;
618  float mass = actor->getTotalMass();
619  int beambroken = 0;
620  int beamdeformed = 0;
621  Ogre::Vector3 gcur = actor->getGForces();
622  Ogre::Vector3 gmax = actor->getMaxGForces();
623 
624  for (int i = 0; i < actor->ar_num_beams; i++ , beam++)
625  {
626  if (beam->bm_broken != 0)
627  {
628  beambroken++;
629  }
630  beamstress += std::abs(beam->stress);
631  float current_deformation = fabs(beam->L - beam->refL);
632  if (fabs(current_deformation) > 0.0001f && beam->bm_type != BEAM_HYDRO)
633  {
634  beamdeformed++;
635  }
636  average_deformation += current_deformation;
637  }
638 
639  m_stat_health = ((float)beambroken / (float)actor->ar_num_beams) * 10.0f + ((float)beamdeformed / (float)actor->ar_num_beams);
640  m_stat_broken_beams = beambroken;
641  m_stat_deformed_beams = beamdeformed;
642  m_stat_beam_stress = beamstress;
643  m_stat_mass_Kg = mass;
644  m_stat_avg_deform = average_deformation;
645  m_stat_gcur_x = gcur.x;
646  m_stat_gcur_y = gcur.y;
647  m_stat_gcur_z = gcur.z;
648  m_stat_gmax_x = gmax.x;
649  m_stat_gmax_y = gmax.y;
650  m_stat_gmax_z = gmax.z;
651 }
652 
653 const ImVec2 BUTTON_SIZE(18, 18);
654 const ImVec2 BUTTON_OFFSET(0, 3.f);
655 const float BUTTON_Y_OFFSET = 0.f;
656 const ImVec2 BUTTONDUMMY_SIZE(18, 1);
657 
658 void DrawSingleBulletRow(const char* name, RoR::events ev)
659 {
660  ImGui::Dummy(BUTTONDUMMY_SIZE); ImGui::SameLine(); ImGui::Bullet(); ImGui::Text("%s", name);
661  ImGui::SameLine();
662  const ImVec2 btn_size = ImCalcEventHighlightedSize(ev);
663  ImGui::SetCursorPosX(ImGui::GetWindowContentRegionWidth() - btn_size.x);
665 }
666 
668 {
670 
671  if (!m_icons_cached)
672  {
673  this->CacheIcons();
674  }
675 
676  ImGui::TextDisabled("Simulation:");
677  this->DrawRepairButton(actorx);
678  this->DrawActorPhysicsButton(actorx);
679 
680  int num_headlights = actorx->GetActor()->countFlaresByType(FlareType::HEADLIGHT);
681  int num_taillights = actorx->GetActor()->countFlaresByType(FlareType::TAIL_LIGHT);
682  int num_blinkleft = actorx->GetActor()->countFlaresByType(FlareType::BLINKER_LEFT);
683  int num_blinkright = actorx->GetActor()->countFlaresByType(FlareType::BLINKER_RIGHT);
684  int num_beacons = actorx->countBeaconProps();
685  bool has_horn = actorx->GetActor()->getTruckType() == TRUCK;
686  if (num_headlights || num_taillights || num_blinkleft || num_blinkright || num_beacons || has_horn)
687  {
688  ImGui::TextDisabled("Lights and signals:");
689  if (num_headlights || num_taillights)
690  {
691  this->DrawHeadLightButton(actorx);
692  }
693  if (num_blinkleft)
694  {
695  this->DrawLeftBlinkerButton(actorx);
696  }
697  if (num_blinkright)
698  {
699  this->DrawRightBlinkerButton(actorx);
700  }
701  if (num_blinkright || num_blinkleft)
702  {
703  this->DrawWarnBlinkerButton(actorx);
704  }
705  if (num_beacons)
706  {
707  this->DrawBeaconButton(actorx);
708  }
709  if (has_horn)
710  {
711  this->DrawHornButton(actorx);
712  }
713  }
714 
715  int total_customlights = 0;
716  for (int i = 0; i < MAX_CLIGHTS; i++)
717  {
718  total_customlights += actorx->GetActor()->countCustomLights(i);
719  }
720  if (total_customlights > 0)
721  {
722  this->DrawCustomLightButtons(actorx);
723  }
724 
725  const bool has_engine = actorx->GetActor()->ar_engine != nullptr;
726  const bool engine_running = has_engine && actorx->GetActor()->ar_engine->isRunning();
727  const bool has_transfercase = actorx->GetActor()->getTransferCaseMode() != nullptr;
728  const bool has_4wd = has_transfercase && actorx->GetActor()->getTransferCaseMode()->tr_ax_2 != -1;
729  const bool has_2wd = has_transfercase && actorx->GetActor()->getTransferCaseMode()->tr_2wd;
730  const size_t num_tc_gears = (has_transfercase) ? actorx->GetActor()->getTransferCaseMode()->tr_gear_ratios.size() : 0u;
731  if (has_engine)
732  {
733  ImGui::TextDisabled("Engine:");
734  this->DrawEngineButton(actorx);
735  if (!engine_running)
736  {
738  }
739  if (has_transfercase && has_4wd && has_2wd)
740  {
741  this->DrawTransferCaseModeButton(actorx);
742  }
743  if (has_transfercase && num_tc_gears > 1)
744  {
745  this->DrawTransferCaseGearRatioButton(actorx);
746  }
747 
748  this->DrawShiftModeButton(actorx);
749 
750  switch (actorx->GetActor()->ar_engine->getAutoMode())
751  {
755  break;
760  break;
766  break;
768  break;
770  break;
771  }
772 
773  }
774 
775  const int num_axlediffs = actorx->GetActor()->getAxleDiffMode();
776  const int num_wheeldiffs = actorx->GetActor()->getWheelDiffMode();
777  const bool tc_visible = !actorx->GetActor()->tc_nodash;
778  const bool alb_visible = !actorx->GetActor()->alb_nodash;
779  const bool has_parkingbrake = actorx->GetActor()->getTruckType() != NOT_DRIVEABLE && actorx->GetActor()->getTruckType() != BOAT;
780  if (num_axlediffs || num_wheeldiffs || tc_visible || alb_visible || has_parkingbrake || has_engine)
781  {
782  ImGui::TextDisabled("Traction:");
783  if (num_axlediffs)
784  {
785  this->DrawAxleDiffButton(actorx);
786  }
787  if (num_wheeldiffs)
788  {
789  this->DrawWheelDiffButton(actorx);
790  }
791  if (tc_visible)
792  {
793  this->DrawTractionControlButton(actorx);
794  }
795  if (alb_visible)
796  {
797  this->DrawAntiLockBrakeButton(actorx);
798  }
799  if (has_parkingbrake)
800  {
801  this->DrawParkingBrakeButton(actorx);
802  }
803  if (has_engine)
804  {
805  this->DrawCruiseControlButton(actorx);
806  }
807  }
808 
809  const size_t num_locks = actorx->GetActor()->ar_hooks.size();
810  const size_t num_ties = actorx->GetActor()->ar_ties.size();
811  if (num_locks || num_ties)
812  {
813  ImGui::TextDisabled("Connections:");
814  if (num_locks)
815  {
816  this->DrawLockButton(actorx);
817  }
818  if (num_ties)
819  {
820  this->DrawSecureButton(actorx);
821  }
822  }
823 
824  const size_t num_cparticles = actorx->getCParticles().size();
825  const size_t num_videocams = actorx->getVideoCameras().size();
826  ImGui::TextDisabled("View:");
827  if (num_cparticles)
828  {
829  this->DrawParticlesButton(actorx);
830  }
831  if (num_videocams)
832  {
833  this->DrawMirrorButton(actorx);
834  }
835 
836  this->DrawCameraButton();
837 }
838 
840 {
842  {
843  return;
844  }
845 
846  ImDrawList* draw_list = GetImDummyFullscreenWindow("RoR_VehicleCommandHighlights");
847  for (const commandbeam_t& cmdbeam: actorx->GetActor()->ar_command_key[m_hovered_commandkey].beams)
848  {
849  const beam_t& beam = actorx->GetActor()->ar_beams[cmdbeam.cmb_beam_index];
850  ImVec2 p1_pos, p2_pos;
851  if (GetScreenPosFromWorldPos(beam.p1->AbsPosition, p1_pos) && GetScreenPosFromWorldPos(beam.p2->AbsPosition, p2_pos))
852  {
853  draw_list->AddLine(p1_pos, p2_pos, ImColor(m_cmdbeam_highlight_color), m_cmdbeam_highlight_thickness);
854  }
855  }
856 }
857 
859 {
860  // In order to draw the image on top of the T-panel, the window must be focusable,
861  // so we can't simply use `GetImDummyFullscreenWindow()`
862  // ===============================================================================
863 
864  int window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar
865  | ImGuiWindowFlags_NoSavedSettings ;
866  ImGui::SetNextWindowPos(m_helptext_fullsize_screenpos - ImGui::GetStyle().WindowPadding);
867  ImGui::SetNextWindowSize(ImVec2(HELP_TEXTURE_WIDTH, HELP_TEXTURE_HEIGHT) + ImGui::GetStyle().WindowPadding);
868  ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0)); // Fully transparent background!
869  ImGui::Begin("T-Panel help tex fullsize", NULL, window_flags);
870  ImDrawList* drawlist = ImGui::GetWindowDrawList();
871  ImTextureID im_tex = reinterpret_cast<ImTextureID>(actorx->GetHelpTex()->getHandle());
872  drawlist->AddImage(im_tex, m_helptext_fullsize_screenpos,
874  ImGui::End();
875  ImGui::PopStyleColor(1); // WindowBg
876 }
877 
878 bool DrawSingleButtonRow(bool active, const Ogre::TexturePtr& icon, const char* name, RoR::events ev, bool* btn_active = nullptr)
879 {
880  if (active)
881  {
882  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
883  }
884  else
885  {
886  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
887  }
888 
889  ImGui::GetWindowDrawList()->AddRectFilled(
890  ImGui::GetCursorScreenPos() - BUTTON_OFFSET, ImGui::GetCursorScreenPos() + BUTTON_SIZE,
891  ImColor(ImGui::GetStyle().Colors[ImGuiCol_Button]), ImGui::GetStyle().FrameRounding);
892  ImGui::GetWindowDrawList()->AddImage(reinterpret_cast<ImTextureID>(icon->getHandle()),
893  ImGui::GetCursorScreenPos() - BUTTON_OFFSET, ImGui::GetCursorScreenPos() + BUTTON_SIZE);
894  ImGui::SetCursorPosX(ImGui::GetCursorPosX() + BUTTON_SIZE.x + 2*ImGui::GetStyle().ItemSpacing.x);
895  ImGui::PopStyleColor();
896 
897  ImGui::Text("%s", name);
898  ImGui::SameLine();
899  const ImVec2 btn_size = ImCalcEventHighlightedSize(ev);
900  ImGui::SetCursorPosX(ImGui::GetWindowContentRegionMax().x - btn_size.x);
901  return ImDrawEventHighlightedButton(ev, nullptr, btn_active);
902 }
903 
905 {
907  {
908  actorx->GetActor()->toggleHeadlights();
909  }
910 }
911 
913 {
915  {
916  actorx->GetActor()->toggleBlinkType(BLINK_LEFT);
917  }
918 }
919 
921 {
923  {
925  }
926 }
927 
929 {
931  {
932  actorx->GetActor()->toggleBlinkType(BLINK_WARN);
933  }
934 }
935 
937 {
938  if (actorx->GetActor()->ar_is_police) // Police siren
939  {
941  {
942  SOUND_TOGGLE(actorx->GetActor(), SS_TRIG_HORN);
943  }
944  }
945  else
946  {
947  // Triggering continuous command every frame is sloppy
948  // Set state and read it in GameContext via GetHornButtonState()
950  }
951 }
952 
954 {
956  {
958  {
960  }
961  else
962  {
964  }
965  }
966 }
967 
969 {
971  {
973  rq->amr_actor = actorx->GetActor()->ar_instance_id;
976  }
977 }
978 
980 {
982  {
983  actorx->GetActor()->parkingbrakeToggle();
984  }
985 }
986 
988 {
990  {
991  actorx->GetActor()->tractioncontrolToggle();
992  }
993 }
994 
996 {
998  {
999  actorx->GetActor()->antilockbrakeToggle();
1000  }
1001 }
1002 
1004 {
1006  {
1007  actorx->GetActor()->ar_physics_paused = !actorx->GetActor()->ar_physics_paused;
1008  }
1009 }
1010 
1012 {
1014  {
1015  actorx->GetActor()->toggleAxleDiffMode();
1016  actorx->GetActor()->displayAxleDiffMode();
1017  }
1018 }
1019 
1021 {
1023  {
1024  actorx->GetActor()->toggleWheelDiffMode();
1025  actorx->GetActor()->displayWheelDiffMode();
1026  }
1027 }
1028 
1030 {
1032  {
1033  actorx->GetActor()->toggleTransferCaseMode();
1034  actorx->GetActor()->displayTransferCaseMode();
1035  }
1036 }
1037 
1039 {
1041  {
1043  actorx->GetActor()->displayTransferCaseMode();
1044  }
1045 }
1046 
1048 {
1050  {
1051  actorx->GetActor()->toggleCustomParticles();
1052  }
1053 }
1054 
1056 {
1058  {
1059  actorx->GetActor()->beaconsToggle();
1060  }
1061 }
1062 
1064 {
1066  {
1067  actorx->GetActor()->ar_engine->toggleAutoMode();
1068  // force gui update
1069  actorx->GetActor()->RequestUpdateHudFeatures();
1070 
1071  // Inform player via chatbox
1072  const char* msg = nullptr;
1073  switch (actorx->GetActor()->ar_engine->getAutoMode())
1074  {
1075  case SimGearboxMode::AUTO: msg = "Automatic shift";
1076  break;
1077  case SimGearboxMode::SEMI_AUTO: msg = "Manual shift - Auto clutch";
1078  break;
1079  case SimGearboxMode::MANUAL: msg = "Fully Manual: sequential shift";
1080  break;
1081  case SimGearboxMode::MANUAL_STICK: msg = "Fully manual: stick shift";
1082  break;
1083  case SimGearboxMode::MANUAL_RANGES: msg = "Fully Manual: stick shift with ranges";
1084  break;
1085  }
1087  }
1088 }
1089 
1091 {
1093  {
1094  if (actorx->GetActor()->ar_engine && actorx->GetActor()->ar_engine->isRunning())
1095  {
1096  actorx->GetActor()->ar_engine->toggleContact();
1097  }
1098  else if (actorx->GetActor()->ar_engine)
1099  {
1100  actorx->GetActor()->ar_engine->startEngine();
1101  }
1102  }
1103 }
1104 
1106 {
1107  int num_custom_flares = 0;
1108 
1109  for (int i = 0; i < MAX_CLIGHTS; i++)
1110  {
1111  if (actorx->GetActor()->countCustomLights(i) > 0)
1112  {
1113  ImGui::PushID(i);
1114  num_custom_flares++;
1115 
1116  if (i == 5 || i == 9) // Add new line every 4 buttons
1117  {
1118  ImGui::NewLine();
1119  }
1120 
1121  std::string label = "L" + std::to_string(i + 1);
1122 
1123  if (actorx->GetActor()->getCustomLightVisible(i))
1124  {
1125  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
1126  }
1127  else
1128  {
1129  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
1130  }
1131 
1132  if (ImGui::Button(label.c_str(), ImVec2(32, 0)))
1133  {
1134  actorx->GetActor()->setCustomLightVisible(i, !actorx->GetActor()->getCustomLightVisible(i));
1135  }
1136  if (ImGui::IsItemHovered())
1137  {
1138  ImGui::BeginTooltip();
1139  ImGui::TextDisabled("%s %d (%s)", "Custom Light", i + 1, App::GetInputEngine()->getEventCommandTrimmed(EV_TRUCK_LIGHTTOGGLE01 + i).c_str());
1140  ImGui::EndTooltip();
1141  }
1142  ImGui::SameLine();
1143 
1144  ImGui::PopStyleColor();
1145  ImGui::PopID();
1146  }
1147  }
1148  if (num_custom_flares > 0)
1149  {
1150  ImGui::NewLine();
1151  }
1152 }
1153 
1154 
1155 
1157 {
1158  if (DrawSingleButtonRow(false, m_camera_icon, "Switch Camera", EV_CAMERA_CHANGE))
1159  {
1160  if (App::GetCameraManager()->EvaluateSwitchBehavior())
1161  {
1163  }
1164  }
1165 }
1166 
1168 {
1169  if (DrawSingleButtonRow(actorx->GetActor()->isLocked(), m_lock_icon, "Lock", EV_COMMON_LOCK))
1170  {
1171  //actorx->GetActor()->hookToggle(-1, HOOK_TOGGLE, -1);
1172  ActorLinkingRequest* hook_rq = new ActorLinkingRequest();
1174  hook_rq->alr_actor_instance_id = actorx->GetActor()->ar_instance_id;
1176 
1177  //actorx->GetActor()->toggleSlideNodeLock();
1178  ActorLinkingRequest* slidenode_rq = new ActorLinkingRequest();
1180  slidenode_rq->alr_actor_instance_id = actorx->GetActor()->ar_instance_id;
1182  }
1183 }
1184 
1186 {
1188  {
1189  //actorx->GetActor()->tieToggle(-1, TIE_TOGGLE, -1);
1190  ActorLinkingRequest* tie_rq = new ActorLinkingRequest();
1192  tie_rq->alr_actor_instance_id = actorx->GetActor()->ar_instance_id;
1194  }
1195 }
1196 
1198 {
1200  {
1201  actorx->GetActor()->cruisecontrolToggle();
1202  }
1203 }
1204 
1206 {
1207  // Special element - a hint-only (non-button/highlight) hotkey + 10 inline buttons
1208  // ===============================================================================
1209 
1210  ImGui::GetWindowDrawList()->AddImage(reinterpret_cast<ImTextureID>(m_beacons_icon->getHandle()),
1211  ImGui::GetCursorScreenPos() - BUTTON_OFFSET, ImGui::GetCursorScreenPos() + BUTTON_SIZE);
1212  ImGui::SetCursorPosX(ImGui::GetCursorPosX() + BUTTON_SIZE.x + 2 * ImGui::GetStyle().ItemSpacing.x);
1213 
1214  ImGui::Text("Custom lights");
1215  ImGui::SameLine();
1216  const char* hotkey = "CTRL+[1...]";
1217  ImVec2 keysize = ImGui::CalcTextSize(hotkey);
1218  ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().x) - keysize.x - ImGui::GetStyle().ItemSpacing.x);
1219  ImGui::Text(hotkey);
1220 
1221  const ImVec2 BTN_PADDING = ImVec2(1, 1);
1222  const ImVec2 btn_size = ImGui::CalcTextSize("10") + (BTN_PADDING * 2);
1223  ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, BTN_PADDING);
1224  for (int i = 0; i < MAX_CLIGHTS; i++)
1225  {
1226  if (actorx->GetActor()->countCustomLights(i) > 0)
1227  {
1228  ImGui::PushID(i);
1229 
1230  std::string label = std::to_string(i + 1);
1231 
1232  if (actorx->GetActor()->getCustomLightVisible(i))
1233  {
1234  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
1235  }
1236  else
1237  {
1238  ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
1239  }
1240 
1241  if (ImGui::Button(label.c_str(), btn_size))
1242  {
1243  actorx->GetActor()->setCustomLightVisible(i, !actorx->GetActor()->getCustomLightVisible(i));
1244  }
1245  if (ImGui::IsItemHovered())
1246  {
1247  ImGui::BeginTooltip();
1248  ImGui::TextDisabled("%s", App::GetInputEngine()->getEventCommandTrimmed(EV_TRUCK_LIGHTTOGGLE01 + i).c_str());
1249  ImGui::EndTooltip();
1250  }
1251  ImGui::PopStyleColor(); // Button
1252  ImGui::SameLine();
1253  ImGui::PopID();
1254  }
1255  }
1256  ImGui::PopStyleVar(); // FramePadding
1257 
1258  ImGui::NewLine();
1259 }
1260 
1262 {
1263  // Icons used https://materialdesignicons.com/
1264  // Licence https://github.com/Templarian/MaterialDesign/blob/master/LICENSE
1265 
1266  m_headlight_icon = FetchIcon("car-light-high.png");
1267  m_left_blinker_icon = FetchIcon("arrow-left-bold.png");
1268  m_right_blinker_icon = FetchIcon("arrow-right-bold.png");
1269  m_warning_light_icon = FetchIcon("hazard-lights.png");
1270  m_horn_icon = FetchIcon("bugle.png");
1271  m_mirror_icon = FetchIcon("mirror-rectangle.png");
1272  m_repair_icon = FetchIcon("car-wrench.png");
1273  m_parking_brake_icon = FetchIcon("car-brake-alert.png");
1274  m_traction_control_icon = FetchIcon("car-traction-control.png");
1275  m_abs_icon = FetchIcon("car-brake-abs.png");
1276  m_physics_icon = FetchIcon("pause.png");
1277  m_actor_physics_icon = FetchIcon("pause-circle-outline.png");
1278  m_a_icon = FetchIcon("alpha-a-circle.png");
1279  m_w_icon = FetchIcon("alpha-w-circle.png");
1280  m_m_icon = FetchIcon("alpha-m-circle.png");
1281  m_g_icon = FetchIcon("alpha-g-circle.png");
1282  m_particle_icon = FetchIcon("water.png");
1283  m_shift_icon = FetchIcon("car-shift-pattern.png");
1284  m_engine_icon = FetchIcon("engine.png");
1285  m_beacons_icon = FetchIcon("alarm-light-outline.png");
1286  m_camera_icon = FetchIcon("camera-switch-outline.png");
1287  m_lock_icon = FetchIcon("alpha-l-circle.png");
1288  m_secure_icon = FetchIcon("lock-outline.png");
1289  m_cruise_control_icon = FetchIcon("car-cruise-control.png");
1290 
1291  m_icons_cached = true;
1292 }
RoR::Actor::getAxleDiffMode
int getAxleDiffMode()
Writes info to console/notify box.
Definition: Actor.h:162
GameContext.h
Game state manager and message-queue provider.
RoR::GUI::VehicleInfoTPanel::m_m_icon
Ogre::TexturePtr m_m_icon
Definition: GUI_VehicleInfoTPanel.h:144
RoR::Engine::toggleContact
void toggleContact()
Ignition.
Definition: Engine.cpp:982
RoR::TransferCase::tr_ax_2
int tr_ax_2
This axle is only driven in 4WD mode.
Definition: Differentials.h:49
RoR::GUI::VehicleInfoTPanel::DrawEngineButton
void DrawEngineButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1090
RoR::GUI::VehicleInfoTPanel::m_stat_deformed_beams
int m_stat_deformed_beams
Definition: GUI_VehicleInfoTPanel.h:82
RoR::GfxActor::SetDebugView
void SetDebugView(DebugViewType dv)
Definition: GfxActor.cpp:1577
RoR::GUI::VehicleInfoTPanel::DrawRepairButton
void DrawRepairButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:968
RoR::Actor::cc_mode
bool cc_mode
Cruise Control.
Definition: Actor.h:364
RoR::GUI::VehicleInfoTPanel::TPANELFOCUS_NONE
@ TPANELFOCUS_NONE
Definition: GUI_VehicleInfoTPanel.h:38
RoR::GUI::VehicleInfoTPanel::TPanelFocus
TPanelFocus
Definition: GUI_VehicleInfoTPanel.h:38
RoR::GUI::VehicleInfoTPanel::m_stat_health
float m_stat_health
Definition: GUI_VehicleInfoTPanel.h:80
RoR::GUI::VehicleInfoTPanel::DrawLockButton
void DrawLockButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1167
RoR::Actor::getWheelDiffMode
int getWheelDiffMode()
Writes info to console/notify box.
Definition: Actor.h:165
RoR::GUI::VehicleInfoTPanel::TPanelMode
TPanelMode
Definition: GUI_VehicleInfoTPanel.h:37
RoR::App::gfx_speedo_imperial
CVar * gfx_speedo_imperial
Definition: Application.cpp:245
RGN_CACHE
#define RGN_CACHE
Definition: Application.h:46
RoR::Actor::getBeaconMode
bool getBeaconMode() const
Definition: Actor.h:183
RoR::ImTextWrappedColorMarked
void ImTextWrappedColorMarked(std::string const &text)
Prints multiline text with '#rrggbb' color markers. Behaves like ImGui::Text* functions.
Definition: GUIUtils.cpp:246
RoR::GUI::VehicleInfoTPanel::m_a_icon
Ogre::TexturePtr m_a_icon
Definition: GUI_VehicleInfoTPanel.h:142
RoR::ActorSB::simbuf_driveable
int simbuf_driveable
Definition: SimBuffers.h:120
RoR::ImCalcEventHighlightedSize
ImVec2 ImCalcEventHighlightedSize(events input_event)
Definition: GUIUtils.cpp:469
RoR::GUI::VehicleInfoTPanel::TPANELFOCUS_BASICS
@ TPANELFOCUS_BASICS
Definition: GUI_VehicleInfoTPanel.h:38
RoR::GUI::VehicleInfoTPanel::DrawBeaconButton
void DrawBeaconButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1055
RoR::GUIManager::GuiTheme::value_red_text_color
ImVec4 value_red_text_color
Definition: GUIManager.h:85
RoR::EV_TRUCK_SHIFT_UP
@ EV_TRUCK_SHIFT_UP
shift one gear up in manual transmission mode
Definition: InputEngine.h:357
RoR::Actor::hasSlidenodes
bool hasSlidenodes()
Definition: Actor.h:117
RoR::MSG_SIM_MODIFY_ACTOR_REQUESTED
@ MSG_SIM_MODIFY_ACTOR_REQUESTED
Payload = RoR::ActorModifyRequest* (owner)
Definition: Application.h:122
RoR::DebugViewType::DEBUGVIEW_BEAMS
@ DEBUGVIEW_BEAMS
DrawStatsLineColored
void DrawStatsLineColored(const char *name, const std::string &value, ImVec4 value_color)
Definition: GUI_VehicleInfoTPanel.cpp:337
RoR::FetchIcon
Ogre::TexturePtr FetchIcon(const char *name)
Definition: GUIUtils.cpp:346
RoR::GUI::VehicleInfoTPanel::m_physics_icon
Ogre::TexturePtr m_physics_icon
Definition: GUI_VehicleInfoTPanel.h:140
RoR::EV_COMMON_REPAIR_TRUCK
@ EV_COMMON_REPAIR_TRUCK
repair truck to original condition
Definition: InputEngine.h:249
RoR::EV_TRUCK_TOGGLE_CONTACT
@ EV_TRUCK_TOGGLE_CONTACT
toggle ignition
Definition: InputEngine.h:362
RoR::Actor::ar_physics_paused
bool ar_physics_paused
Actor physics individually paused by user.
Definition: Actor.h:467
RoR::Actor::isLocked
bool isLocked()
Are hooks locked?
Definition: Actor.cpp:3834
RoR::FlareType::BLINKER_LEFT
@ BLINKER_LEFT
RoR::TRUCK
@ TRUCK
its a truck (or other land vehicle)
Definition: SimData.h:92
RoR::GUI::VehicleInfoTPanel::m_icons_cached
bool m_icons_cached
Definition: GUI_VehicleInfoTPanel.h:129
RoR::EV_COMMON_TOGGLE_TRUCK_BEACONS
@ EV_COMMON_TOGGLE_TRUCK_BEACONS
toggle truck beacons
Definition: InputEngine.h:272
RoR::EV_TRUCK_BLINK_RIGHT
@ EV_TRUCK_BLINK_RIGHT
toggle right direction indicator (blinker)
Definition: InputEngine.h:303
RoR::GUI::VehicleInfoTPanel::DrawWarnBlinkerButton
void DrawWarnBlinkerButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:928
RoR::Actor::toggleAxleDiffMode
void toggleAxleDiffMode()
Definition: Actor.cpp:1326
MAX_CLIGHTS
static const int MAX_CLIGHTS
See RoRnet::Lightmask and enum events in InputEngine.h.
Definition: SimConstants.h:35
RoR::GUI::VehicleInfoTPanel::m_visibility_mode
TPanelMode m_visibility_mode
Definition: GUI_VehicleInfoTPanel.h:51
RoR::GUIManager::GuiTheme
Definition: GUIManager.h:79
RoR::App::GetCameraManager
CameraManager * GetCameraManager()
Definition: Application.cpp:279
RoR::node_t::AbsPosition
Ogre::Vector3 AbsPosition
absolute position in the world (shaky)
Definition: SimData.h:293
GUI_VehicleInfoTPanel.h
RoR::App::GetGuiManager
GUIManager * GetGuiManager()
Definition: Application.cpp:273
RoR::App::diag_hide_broken_beams
CVar * diag_hide_broken_beams
Definition: Application.cpp:152
RoR::GUIManager::GuiTheme::value_blue_text_color
ImVec4 value_blue_text_color
Definition: GUIManager.h:86
RoR::GUI::VehicleInfoTPanel::TPANELMODE_OPAQUE
@ TPANELMODE_OPAQUE
Definition: GUI_VehicleInfoTPanel.h:37
RoR::GUI::VehicleInfoTPanel::m_stat_gcur_z
float m_stat_gcur_z
Definition: GUI_VehicleInfoTPanel.h:88
RoR::ActorLinkingRequest
Estabilishing a physics linkage between 2 actors modifies a global linkage table and triggers immedia...
Definition: SimData.h:903
RoR::beam_t::p1
node_t * p1
Definition: SimData.h:334
RoR::GfxActor::GetSimNodeBuffer
NodeSB * GetSimNodeBuffer()
Definition: GfxActor.h:129
RoR::GUI::VehicleInfoTPanel::TPANELMODE_HIDDEN
@ TPANELMODE_HIDDEN
Definition: GUI_VehicleInfoTPanel.h:37
RoR::Actor::getCustomParticleMode
bool getCustomParticleMode()
Definition: Actor.cpp:4505
RoR::DebugViewType::DEBUGVIEW_NONE
@ DEBUGVIEW_NONE
RoR::Actor::ar_instance_id
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
Definition: Actor.h:376
RoR::GUI::VehicleInfoTPanel::CacheIcons
void CacheIcons()
Definition: GUI_VehicleInfoTPanel.cpp:1261
RoR::Actor::ar_num_nodes
int ar_num_nodes
Definition: Actor.h:293
RoR::GetScreenPosFromWorldPos
bool GetScreenPosFromWorldPos(Ogre::Vector3 const &world_pos, ImVec2 &out_screen)
Definition: GUIUtils.cpp:542
MIN_PANEL_WIDTH
const float MIN_PANEL_WIDTH
Definition: GUI_VehicleInfoTPanel.cpp:41
RoR::GUI::VehicleInfoTPanel::m_helptext_fullsize
bool m_helptext_fullsize
Definition: GUI_VehicleInfoTPanel.h:73
RoR::Actor::ar_unique_commandkey_pairs
std::vector< UniqueCommandKeyPair > ar_unique_commandkey_pairs
UI helper for displaying command control keys to user (must be built at spawn).
Definition: Actor.h:328
RoR::GUI::VehicleInfoTPanel::m_particle_icon
Ogre::TexturePtr m_particle_icon
Definition: GUI_VehicleInfoTPanel.h:146
RoR::GUI::VehicleInfoTPanel::DrawAntiLockBrakeButton
void DrawAntiLockBrakeButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:995
BUTTONDUMMY_SIZE
const ImVec2 BUTTONDUMMY_SIZE(18, 1)
RoR::Actor::toggleWheelDiffMode
void toggleWheelDiffMode()
Definition: Actor.cpp:1318
format
Truck file format(technical spec)
RoR::ActorSB::simbuf_screwprops
std::vector< ScrewpropSB > simbuf_screwprops
Definition: SimBuffers.h:135
RoR::GUI::VehicleInfoTPanel::m_w_icon
Ogre::TexturePtr m_w_icon
Definition: GUI_VehicleInfoTPanel.h:143
GUIUtils.h
RoR::TransferCase::tr_2wd
bool tr_2wd
Does it support 2WD mode?
Definition: Differentials.h:50
RoR::Actor::getWheelNodeCount
int getWheelNodeCount() const
Definition: Actor.cpp:813
RoR::GfxActor::GetActor
ActorPtr GetActor()
Definition: GfxActor.cpp:336
RoR::DebugViewType::DEBUGVIEW_ROTATORS
@ DEBUGVIEW_ROTATORS
RoR::EV_TRUCK_BLINK_WARN
@ EV_TRUCK_BLINK_WARN
toggle all direction indicators
Definition: InputEngine.h:304
RoR::GUI::VehicleInfoTPanel::m_warning_light_icon
Ogre::TexturePtr m_warning_light_icon
Definition: GUI_VehicleInfoTPanel.h:133
RoR::GfxActor::countBeaconProps
int countBeaconProps() const
Definition: GfxActor.cpp:3414
RoR::Engine::getAutoMode
SimGearboxMode getAutoMode()
Definition: Engine.cpp:842
RoR::GUI::VehicleInfoTPanel::DrawActorPhysicsButton
void DrawActorPhysicsButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1003
RoR::ScrewpropSB
Definition: SimBuffers.h:74
RoR::DebugViewType
DebugViewType
Definition: GfxData.h:101
RoR::GUI::VehicleInfoTPanel::DrawSecureButton
void DrawSecureButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1185
RoR::GfxActor::getVideoCameras
std::vector< VideoCamera > & getVideoCameras()
Definition: GfxActor.h:75
RoR::GUI::VehicleInfoTPanel::UpdateStats
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
Definition: GUI_VehicleInfoTPanel.cpp:612
RoR::ActorLinkingRequest::alr_type
ActorLinkingRequestType alr_type
Definition: SimData.h:906
RoR::AeroEngineSB
Definition: SimBuffers.h:90
RoR::GUI::VehicleInfoTPanel::m_stat_broken_beams
int m_stat_broken_beams
Definition: GUI_VehicleInfoTPanel.h:81
RoR::ActorSB::simbuf_node0_velo
Ogre::Vector3 simbuf_node0_velo
Definition: SimBuffers.h:124
RoR::Round
Ogre::Real Round(Ogre::Real value, unsigned short ndigits=0)
Definition: Utils.cpp:101
RoR::EV_TRUCK_CRUISE_CONTROL
@ EV_TRUCK_CRUISE_CONTROL
toggle cruise control
Definition: InputEngine.h:308
RoR::Actor::RequestUpdateHudFeatures
void RequestUpdateHudFeatures()
Definition: Actor.h:279
RoR::ActorLinkingRequestType::HOOK_TOGGLE
@ HOOK_TOGGLE
RoR::Actor::getDescription
std::vector< std::string > getDescription()
Definition: Actor.cpp:4417
RoR::Actor::toggleCustomParticles
void toggleCustomParticles()
Definition: Actor.cpp:3160
RoR::GUI::VehicleInfoTPanel::m_stat_gmax_x
float m_stat_gmax_x
Definition: GUI_VehicleInfoTPanel.h:89
RoR::GUI::VehicleInfoTPanel::DrawMirrorButton
void DrawMirrorButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:953
RoR::Actor::ar_num_rotators
int ar_num_rotators
Definition: Actor.h:304
RoR::GUI::VehicleInfoTPanel::m_horn_btn_active
bool m_horn_btn_active
Definition: GUI_VehicleInfoTPanel.h:128
RoR::FlareType::HEADLIGHT
@ HEADLIGHT
RoR::Console::putMessage
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
Definition: Console.cpp:103
RoR::Actor::ar_hooks
std::vector< hook_t > ar_hooks
Definition: Actor.h:311
RoR::FlareType::BLINKER_RIGHT
@ BLINKER_RIGHT
RoR::ActorSB::simbuf_aeroengines
std::vector< AeroEngineSB > simbuf_aeroengines
Definition: SimBuffers.h:138
RoR::EV_TRUCK_TRACTION_CONTROL
@ EV_TRUCK_TRACTION_CONTROL
toggle antilockbrake system
Definition: InputEngine.h:371
RoR::GUI::VehicleInfoTPanel::m_beacons_icon
Ogre::TexturePtr m_beacons_icon
Definition: GUI_VehicleInfoTPanel.h:149
RoR::Actor::ar_ties
std::vector< tie_t > ar_ties
Definition: Actor.h:310
RoR::DebugViewType::DEBUGVIEW_SUBMESH
@ DEBUGVIEW_SUBMESH
RoR::EV_TRUCK_SHIFT_DOWN
@ EV_TRUCK_SHIFT_DOWN
shift one gear down in manual transmission mode
Definition: InputEngine.h:332
RoR::GUI::VehicleInfoTPanel::m_abs_icon
Ogre::TexturePtr m_abs_icon
Definition: GUI_VehicleInfoTPanel.h:139
RoR::GUI::VehicleInfoTPanel::DrawHornButton
void DrawHornButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:936
RoR::Actor::GetGfxActor
GfxActor * GetGfxActor()
Definition: Actor.h:278
RoR::Actor::ar_num_cabs
int ar_num_cabs
Definition: Actor.h:341
RoR::GUI::VehicleInfoTPanel::m_active_commandkey
CommandkeyID_t m_active_commandkey
Definition: GUI_VehicleInfoTPanel.h:66
RoR::TransferCase::tr_gear_ratios
std::vector< float > tr_gear_ratios
Gear reduction ratios.
Definition: Differentials.h:53
RoR::GUI::VehicleInfoTPanel::DrawRightBlinkerButton
void DrawRightBlinkerButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:920
Engine.h
RoR::App::diag_hide_beam_stress
CVar * diag_hide_beam_stress
Definition: Application.cpp:153
RoR::GUI::VehicleInfoTPanel::m_requested_focus
TPanelFocus m_requested_focus
Requested by SetVisible()
Definition: GUI_VehicleInfoTPanel.h:52
Utils.h
RoR::NOT_DRIVEABLE
@ NOT_DRIVEABLE
not drivable at all
Definition: SimData.h:91
RoR::FlareType::TAIL_LIGHT
@ TAIL_LIGHT
Language.h
RoR::Actor::displayAxleDiffMode
void displayAxleDiffMode()
Cycles through the available inter axle diff modes.
Definition: Actor.cpp:1334
RoR::GUIManager::GuiTheme::semitransparent_window_bg
ImVec4 semitransparent_window_bg
Definition: GUIManager.h:92
RoR::Actor::tractioncontrolToggle
void tractioncontrolToggle()
Definition: Actor.cpp:3742
RoR::GUI::VehicleInfoTPanel::m_command_hovered_text_color
ImVec4 m_command_hovered_text_color
Definition: GUI_VehicleInfoTPanel.h:72
RoR::GUI::VehicleInfoTPanel::DrawVehicleCommandsUI
void DrawVehicleCommandsUI(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:201
DrawStatsLine
void DrawStatsLine(const char *name, const std::string &value)
Definition: GUI_VehicleInfoTPanel.cpp:353
RefCountingObjectPtr< Actor >
RoR::GUI::VehicleInfoTPanel::m_stat_beam_stress
float m_stat_beam_stress
Definition: GUI_VehicleInfoTPanel.h:83
RoR::Actor::beaconsToggle
void beaconsToggle()
Definition: Actor.cpp:3751
GUIManager.h
RoR::GfxActor::SetVideoCamState
void SetVideoCamState(VideoCamState state)
Definition: GfxActor.cpp:442
Actor.h
RoR::GUI::VehicleInfoTPanel::DrawTransferCaseModeButton
void DrawTransferCaseModeButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1029
RoR::beam_t::stress
float stress
Definition: SimData.h:343
RoR::App::diag_hide_wheel_info
CVar * diag_hide_wheel_info
Definition: Application.cpp:154
RoR::GUI::VehicleInfoTPanel::TPANELFOCUS_DIAG
@ TPANELFOCUS_DIAG
Definition: GUI_VehicleInfoTPanel.h:38
RoR::Actor::tc_nodash
bool tc_nodash
Hide the dashboard indicator?
Definition: Actor.h:453
RoR::Console::CONSOLE_SYSTEM_NOTICE
@ CONSOLE_SYSTEM_NOTICE
Definition: Console.h:51
RoR::GUI::VehicleInfoTPanel::m_startupdemo_init
bool m_startupdemo_init
Definition: GUI_VehicleInfoTPanel.h:55
RoR::SimGearboxMode::AUTO
@ AUTO
Automatic shift.
RoR::beam_t::refL
float refL
reference length
Definition: SimData.h:355
RoR::GUI::VehicleInfoTPanel::DrawWheelDiffButton
void DrawWheelDiffButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1020
DrawStatsBullet
void DrawStatsBullet(const char *name, const std::string &value)
Definition: GUI_VehicleInfoTPanel.cpp:358
RoR::GfxActor::getCParticles
std::vector< CParticle > & getCParticles()
Definition: GfxActor.h:73
RoR::Actor::getMaxGForces
Ogre::Vector3 getMaxGForces()
Definition: Actor.h:116
RoR::GUI::VehicleInfoTPanel::m_stat_gmax_y
float m_stat_gmax_y
Definition: GUI_VehicleInfoTPanel.h:90
RoR::GetImDummyFullscreenWindow
ImDrawList * GetImDummyFullscreenWindow(const std::string &name="RoR_TransparentFullscreenWindow")
Definition: GUIUtils.cpp:358
RoR::Engine::isRunning
bool isRunning()
Definition: Engine.h:101
RoR::ActorModifyRequest::amr_actor
ActorInstanceID_t amr_actor
Definition: SimData.h:870
RoR::SimGearboxMode::MANUAL_STICK
@ MANUAL_STICK
Fully manual: stick shift.
RoR::GUI::VehicleInfoTPanel::m_stat_gmax_z
float m_stat_gmax_z
Definition: GUI_VehicleInfoTPanel.h:91
RoR::GUI::VehicleInfoTPanel::m_headlight_icon
Ogre::TexturePtr m_headlight_icon
Definition: GUI_VehicleInfoTPanel.h:130
RoR::GfxActor::GetVideoCamState
VideoCamState GetVideoCamState() const
Definition: GfxActor.h:144
RoR::GUIManager::GetTheme
GuiTheme & GetTheme()
Definition: GUIManager.h:166
RoR::DebugViewType::DEBUGVIEW_SLIDENODES
@ DEBUGVIEW_SLIDENODES
RoR::beam_t
Simulation: An edge in the softbody structure.
Definition: SimData.h:329
RoR::GUI::VehicleInfoTPanel::m_left_blinker_icon
Ogre::TexturePtr m_left_blinker_icon
Definition: GUI_VehicleInfoTPanel.h:131
RoR::GUI::VehicleInfoTPanel::m_horn_icon
Ogre::TexturePtr m_horn_icon
Definition: GUI_VehicleInfoTPanel.h:134
RoR::Actor::ar_beams
beam_t * ar_beams
Definition: Actor.h:297
RoR::GUI::VehicleInfoTPanel::m_actor_physics_icon
Ogre::TexturePtr m_actor_physics_icon
Definition: GUI_VehicleInfoTPanel.h:141
RoR::Actor::ar_engine
EnginePtr ar_engine
Definition: Actor.h:379
RoR::GUI::VehicleInfoTPanel::m_cmdbeam_highlight_color
ImVec4 m_cmdbeam_highlight_color
Definition: GUI_VehicleInfoTPanel.h:69
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::ActorModifyRequest
Definition: SimData.h:852
RoR::CacheEntry::filecachename
Ogre::String filecachename
preview image filename
Definition: CacheSystem.h:87
RoR::EV_TRUCK_STARTER
@ EV_TRUCK_STARTER
hold to start the engine
Definition: InputEngine.h:358
RoR::EV_TRUCK_LIGHTTOGGLE01
@ EV_TRUCK_LIGHTTOGGLE01
toggle custom light 1
Definition: InputEngine.h:315
RoR::Actor::toggleHeadlights
void toggleHeadlights()
Definition: Actor.cpp:2965
RoR::GfxActor::GetHelpTex
Ogre::TexturePtr GetHelpTex()
Definition: GfxActor.h:149
RoR::Actor::getTransferCaseMode
TransferCase * getTransferCaseMode()
Toggles between 2WD and 4WD mode.
Definition: Actor.h:167
RoR::ActorSB::simbuf_drive_ratio
float simbuf_drive_ratio
Definition: SimBuffers.h:153
RoR::App::diag_hide_wheels
CVar * diag_hide_wheels
Definition: Application.cpp:155
RoR::GUI::VehicleInfoTPanel::m_cmdbeam_highlight_thickness
float m_cmdbeam_highlight_thickness
Definition: GUI_VehicleInfoTPanel.h:71
RoR::GameContext::PushMessage
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
Definition: GameContext.cpp:66
DrawSingleBulletRow
void DrawSingleBulletRow(const char *name, RoR::events ev)
Definition: GUI_VehicleInfoTPanel.cpp:658
RoR::ActorSB::simbuf_inputshaft_rpm
float simbuf_inputshaft_rpm
Definition: SimBuffers.h:152
RoR::GUI::VehicleInfoTPanel::DrawVehicleDiagUI
void DrawVehicleDiagUI(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:552
HELP_TEXTURE_WIDTH
const float HELP_TEXTURE_WIDTH
Definition: GUI_VehicleInfoTPanel.cpp:38
RoR::GUI::VehicleInfoTPanel::m_parking_brake_icon
Ogre::TexturePtr m_parking_brake_icon
Definition: GUI_VehicleInfoTPanel.h:137
RoR::GUI::VehicleInfoTPanel::DrawVehicleCommandHighlights
void DrawVehicleCommandHighlights(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:839
RoR::GUI::VehicleInfoTPanel::m_stat_gcur_x
float m_stat_gcur_x
Definition: GUI_VehicleInfoTPanel.h:86
RoR::Actor::antilockbrakeToggle
void antilockbrakeToggle()
Definition: Actor.cpp:3733
RoR::Actor::getHeadlightsVisible
bool getHeadlightsVisible() const
Definition: Actor.h:196
RoR::Actor::ar_command_key
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
Definition: Actor.h:314
RoR::EV_TRUCK_TOGGLE_TCASE_4WD_MODE
@ EV_TRUCK_TOGGLE_TCASE_4WD_MODE
toggle the transfer case 4wd mode
Definition: InputEngine.h:368
RoR::GUI::VehicleInfoTPanel::DrawParticlesButton
void DrawParticlesButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1047
RoR::EV_TRUCK_TOGGLE_VIDEOCAMERA
@ EV_TRUCK_TOGGLE_VIDEOCAMERA
toggle videocamera update
Definition: InputEngine.h:370
RoR::BLINK_RIGHT
@ BLINK_RIGHT
Definition: SimData.h:124
RoR::BLINK_WARN
@ BLINK_WARN
Definition: SimData.h:125
RoR::GUI::VehicleInfoTPanel::TPANELFOCUS_STATS
@ TPANELFOCUS_STATS
Definition: GUI_VehicleInfoTPanel.h:38
RoR::GUI::VehicleInfoTPanel::DrawCameraButton
void DrawCameraButton()
Definition: GUI_VehicleInfoTPanel.cpp:1156
BUTTON_SIZE
const ImVec2 BUTTON_SIZE(18, 18)
RoR::GUI::VehicleInfoTPanel::m_transluc_textdis_color
ImVec4 m_transluc_textdis_color
Definition: GUI_VehicleInfoTPanel.h:57
RoR::ActorSB::simbuf_wheel_speed
float simbuf_wheel_speed
Definition: SimBuffers.h:127
RoR::GUI::VehicleInfoTPanel::m_stat_avg_deform
float m_stat_avg_deform
Definition: GUI_VehicleInfoTPanel.h:85
Application.h
Central state/object manager and communications hub.
RoR::App::GetConsole
Console * GetConsole()
Definition: Application.cpp:274
RoR::EV_COMMON_LOCK
@ EV_COMMON_LOCK
connect hook node to a node in close proximity
Definition: InputEngine.h:239
RoR::SimGearboxMode::SEMI_AUTO
@ SEMI_AUTO
Manual shift with auto clutch.
RoR::GUI::VehicleInfoTPanel::m_current_focus
TPanelFocus m_current_focus
Updated based on currently open tab.
Definition: GUI_VehicleInfoTPanel.h:53
BUTTON_OFFSET
const ImVec2 BUTTON_OFFSET(0, 3.f)
RoR::Actor::isTied
bool isTied()
Definition: Actor.cpp:3826
RoR::ImDrawEventHighlightedButton
bool ImDrawEventHighlightedButton(events input_event, bool *btn_hovered=nullptr, bool *btn_active=nullptr)
Definition: GUIUtils.cpp:426
RoR::EV_TRUCK_TOGGLE_INTER_WHEEL_DIFF
@ EV_TRUCK_TOGGLE_INTER_WHEEL_DIFF
toggle the inter wheel differential mode
Definition: InputEngine.h:366
RoR::App::GetGameContext
GameContext * GetGameContext()
Definition: Application.cpp:284
RoR::GUI::VehicleInfoTPanel::m_engine_icon
Ogre::TexturePtr m_engine_icon
Definition: GUI_VehicleInfoTPanel.h:148
HELP_TEXTURE_HEIGHT
const float HELP_TEXTURE_HEIGHT
Definition: GUI_VehicleInfoTPanel.cpp:39
RoR::InputEngine::resolveEventName
static int resolveEventName(Ogre::String eventName)
Definition: InputEngine.cpp:2050
RoR::AIRPLANE
@ AIRPLANE
its an airplane
Definition: SimData.h:93
RoR::GUI::VehicleInfoTPanel::m_camera_icon
Ogre::TexturePtr m_camera_icon
Definition: GUI_VehicleInfoTPanel.h:150
RoR::GUI::VehicleInfoTPanel::DrawVehicleHelpTextureFullsize
void DrawVehicleHelpTextureFullsize(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:858
RoR::EV_TRUCK_HORN
@ EV_TRUCK_HORN
truck horn
Definition: InputEngine.h:312
RoR::EV_COMMON_SECURE_LOAD
@ EV_COMMON_SECURE_LOAD
tie a load to the truck
Definition: InputEngine.h:262
RoR::ActorSB::simbuf_engine_rpm
float simbuf_engine_rpm
Definition: SimBuffers.h:147
RoR::BLINK_LEFT
@ BLINK_LEFT
Definition: SimData.h:123
RoR::GUI::VehicleInfoTPanel::m_cruise_control_icon
Ogre::TexturePtr m_cruise_control_icon
Definition: GUI_VehicleInfoTPanel.h:153
RoR::beam_t::bm_type
BeamType bm_type
Definition: SimData.h:347
RoR::EV_COMMON_TOGGLE_TRUCK_LOW_BEAMS
@ EV_COMMON_TOGGLE_TRUCK_LOW_BEAMS
toggle truck low beams (on/off); also toggles running lights.
Definition: InputEngine.h:274
RoR::VideoCamState::VCSTATE_DISABLED
@ VCSTATE_DISABLED
RoR::GUI::VehicleInfoTPanel::DrawParkingBrakeButton
void DrawParkingBrakeButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:979
RoR::Actor::ar_num_beams
int ar_num_beams
Definition: Actor.h:298
RoR::GUI::VehicleInfoTPanel::DrawCustomLightButton
void DrawCustomLightButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1105
RoR::DebugViewType::DEBUGVIEW_SHOCKS
@ DEBUGVIEW_SHOCKS
RoR::Actor::getTotalMass
float getTotalMass(bool withLocked=true)
Definition: Actor.cpp:754
RoR::GUI::VehicleInfoTPanel::m_shift_icon
Ogre::TexturePtr m_shift_icon
Definition: GUI_VehicleInfoTPanel.h:147
RoR::Actor::getUsedActorEntry
CacheEntryPtr & getUsedActorEntry()
The actor entry itself.
Definition: Actor.cpp:4663
_LC
#define _LC(ctx, str)
Definition: Language.h:38
RoR::Actor::tc_mode
bool tc_mode
Enabled?
Definition: Actor.h:450
RoR::GUI::VehicleInfoTPanel::DrawTransferCaseGearRatioButton
void DrawTransferCaseGearRatioButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1038
RoR::SS_TRIG_HORN
@ SS_TRIG_HORN
Definition: SoundScriptManager.h:59
RoR::EV_TRUCK_SWITCH_SHIFT_MODES
@ EV_TRUCK_SWITCH_SHIFT_MODES
toggle between transmission modes
Definition: InputEngine.h:361
RoR::SimGearboxMode::MANUAL
@ MANUAL
Fully manual: sequential shift.
RoR::NodeSB::AbsPosition
Ogre::Vector3 AbsPosition
Definition: SimBuffers.h:69
RoR::Actor::toggleTransferCaseMode
void toggleTransferCaseMode()
Definition: Actor.cpp:1402
RoR::Actor::parkingbrakeToggle
void parkingbrakeToggle()
Definition: Actor.cpp:3718
RoR::GUIManager::GuiTheme::screen_edge_padding
ImVec2 screen_edge_padding
Definition: GUIManager.h:96
RoR::ActorSB::simbuf_top_speed
float simbuf_top_speed
Definition: SimBuffers.h:128
RoR::Actor::getParkingBrake
bool getParkingBrake()
Definition: Actor.h:158
RoR::Actor::ar_is_police
bool ar_is_police
Gfx/sfx attr.
Definition: Actor.h:499
RoR::GUI::VehicleInfoTPanel::m_startupdemo_timer
Ogre::Timer m_startupdemo_timer
Definition: GUI_VehicleInfoTPanel.h:54
RoR::Actor::alb_mode
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
Definition: Actor.h:357
RoR::EV_TRUCK_TOGGLE_TCASE_GEAR_RATIO
@ EV_TRUCK_TOGGLE_TCASE_GEAR_RATIO
toggle the transfer case gear ratio
Definition: InputEngine.h:369
RoR::App::ui_show_vehicle_buttons
CVar * ui_show_vehicle_buttons
Definition: Application.cpp:263
RoR::DebugViewType::DEBUGVIEW_NODES
@ DEBUGVIEW_NODES
RoR::EV_TRUCK_MANUAL_CLUTCH
@ EV_TRUCK_MANUAL_CLUTCH
manual clutch (for manual transmission)
Definition: InputEngine.h:325
RoR::UniqueCommandKeyPair
UI helper for displaying command control keys to user.
Definition: SimData.h:675
RoR::ActorSB::simbuf_engine_max_rpm
float simbuf_engine_max_rpm
Definition: SimBuffers.h:157
RoR::GUI::VehicleInfoTPanel::TPANELMODE_TRANSLUCENT
@ TPANELMODE_TRANSLUCENT
Definition: GUI_VehicleInfoTPanel.h:37
RoR::GUI::VehicleInfoTPanel::m_g_icon
Ogre::TexturePtr m_g_icon
Definition: GUI_VehicleInfoTPanel.h:145
RoR::EV_CAMERA_CHANGE
@ EV_CAMERA_CHANGE
change camera mode
Definition: InputEngine.h:113
RoR::VideoCamState::VCSTATE_ENABLED_ONLINE
@ VCSTATE_ENABLED_ONLINE
RoR::Actor::toggleBlinkType
void toggleBlinkType(BlinkType blink)
Definition: Actor.cpp:3056
RoR::BEAM_HYDRO
@ BEAM_HYDRO
Definition: SimData.h:71
RoR::GUI::VehicleInfoTPanel::DrawTractionControlButton
void DrawTractionControlButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:987
RoR::DebugViewType::DEBUGVIEW_SKELETON
@ DEBUGVIEW_SKELETON
RoR::MSG_SIM_ACTOR_LINKING_REQUESTED
@ MSG_SIM_ACTOR_LINKING_REQUESTED
Payload = RoR::ActorLinkingRequest* (owner)
Definition: Application.h:132
RoR::ActorSB::simbuf_gear
int simbuf_gear
Definition: SimBuffers.h:145
RoR::Message
Unified game event system - all requests and state changes are reported using a message.
Definition: GameContext.h:51
_L
#define _L
Definition: ErrorUtils.cpp:35
RoR::GUI::VehicleInfoTPanel::DrawShiftModeButton
void DrawShiftModeButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1063
RoR::DebugViewType::DEBUGVIEW_WHEELS
@ DEBUGVIEW_WHEELS
RoR::Actor::alb_nodash
bool alb_nodash
Anti-lock brake attribute: Hide the dashboard indicator?
Definition: Actor.h:360
RoR::GUI::VehicleInfoTPanel::DrawVehicleBasicsUI
void DrawVehicleBasicsUI(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:667
RoR::GUI::VehicleInfoTPanel::DrawAxleDiffButton
void DrawAxleDiffButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1011
RoR::commandbeam_t
Definition: SimData.h:553
RoR::EV_TRUCK_TOGGLE_PHYSICS
@ EV_TRUCK_TOGGLE_PHYSICS
toggle physics simulation
Definition: InputEngine.h:367
RoR::EV_TRUCK_TOGGLE_INTER_AXLE_DIFF
@ EV_TRUCK_TOGGLE_INTER_AXLE_DIFF
toggle the inter axle differential mode
Definition: InputEngine.h:365
RoR::Actor::toggleTransferCaseGearRatio
void toggleTransferCaseGearRatio()
Definition: Actor.cpp:1433
RoR::GUI::VehicleInfoTPanel::m_stat_gcur_y
float m_stat_gcur_y
Definition: GUI_VehicleInfoTPanel.h:87
RoR::Actor::ar_num_wheels
int ar_num_wheels
Definition: Actor.h:333
RoR::App::GetInputEngine
InputEngine * GetInputEngine()
Definition: Application.cpp:275
RoR::Actor::getTruckType
int getTruckType()
Definition: Actor.h:239
RoR::ActorLinkingRequest::alr_actor_instance_id
ActorInstanceID_t alr_actor_instance_id
Definition: SimData.h:905
RoR::ActorSB::simbuf_engine_turbo_psi
float simbuf_engine_turbo_psi
Definition: SimBuffers.h:149
RoR::GUI::VehicleInfoTPanel::m_mirror_icon
Ogre::TexturePtr m_mirror_icon
Definition: GUI_VehicleInfoTPanel.h:135
RoR::Actor::setCustomLightVisible
void setCustomLightVisible(int number, bool visible)
Definition: Actor.cpp:4449
RoR::beam_t::p2
node_t * p2
Definition: SimData.h:335
RoR::AeroEngineType::AE_XPROP
@ AE_XPROP
RoR::App::diag_hide_nodes
CVar * diag_hide_nodes
Definition: Application.cpp:156
RoR::EV_COMMON_TOGGLE_CUSTOM_PARTICLES
@ EV_COMMON_TOGGLE_CUSTOM_PARTICLES
toggle particle cannon
Definition: InputEngine.h:267
MAX_PREVIEW_SIZE
const ImVec2 MAX_PREVIEW_SIZE(100.f, 100.f)
RoR::EV_TRUCK_BLINK_LEFT
@ EV_TRUCK_BLINK_LEFT
toggle left direction indicator (blinker)
Definition: InputEngine.h:302
RoR::GfxActor
Definition: GfxActor.h:52
RoR::GUI::VehicleInfoTPanel::Draw
void Draw(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:43
RoR::GUI::VehicleInfoTPanel::m_panel_translucent_color
ImVec4 m_panel_translucent_color
Definition: GUI_VehicleInfoTPanel.h:56
RoR::EV_TRUCK_AUTOSHIFT_UP
@ EV_TRUCK_AUTOSHIFT_UP
shift automatic transmission one gear up
Definition: InputEngine.h:301
RoR::SimGearboxMode::MANUAL_RANGES
@ MANUAL_RANGES
Fully manual: stick shift with ranges.
GfxActor.h
Manager for all visuals belonging to a single actor.
RoR::GUI::VehicleInfoTPanel::m_lock_icon
Ogre::TexturePtr m_lock_icon
Definition: GUI_VehicleInfoTPanel.h:151
RoR::Actor::countFlaresByType
int countFlaresByType(FlareType type)
Definition: Actor.cpp:4486
RoR::GUI::VehicleInfoTPanel::m_repair_icon
Ogre::TexturePtr m_repair_icon
Definition: GUI_VehicleInfoTPanel.h:136
RoR::Actor::countCustomLights
int countCustomLights(int control_number)
Definition: Actor.cpp:4469
RoR::ActorLinkingRequestType::SLIDENODE_TOGGLE
@ SLIDENODE_TOGGLE
RoR::DrawGCheckbox
bool DrawGCheckbox(CVar *cvar, const char *label)
Definition: GUIUtils.cpp:261
RoR::GUI::VehicleInfoTPanel::m_secure_icon
Ogre::TexturePtr m_secure_icon
Definition: GUI_VehicleInfoTPanel.h:152
RoR::GUI::VehicleInfoTPanel::m_helptext_fullsize_screenpos
ImVec2 m_helptext_fullsize_screenpos
The image is drawn into separate window.
Definition: GUI_VehicleInfoTPanel.h:74
RoR::GfxActor::GetDebugView
DebugViewType GetDebugView() const
Definition: GfxActor.h:145
RoR::ImDrawEventHighlighted
void ImDrawEventHighlighted(events input_event)
Definition: GUIUtils.cpp:410
RoR::Console::CONSOLE_MSGTYPE_INFO
@ CONSOLE_MSGTYPE_INFO
Generic message.
Definition: Console.h:60
RoR::EV_TRUCK_AUTOSHIFT_DOWN
@ EV_TRUCK_AUTOSHIFT_DOWN
shift automatic transmission one gear down
Definition: InputEngine.h:300
RoR::Actor::getBlinkType
BlinkType getBlinkType()
Definition: Actor.cpp:4497
RoR::Actor::getTruckName
std::string getTruckName()
Definition: Actor.h:236
RoR::GUI::VehicleInfoTPanel::SetVisible
void SetVisible(TPanelMode mode, TPanelFocus focus=TPANELFOCUS_NONE)
Definition: GUI_VehicleInfoTPanel.cpp:606
RoR::GUI::VehicleInfoTPanel::DrawLeftBlinkerButton
void DrawLeftBlinkerButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:912
RoR::events
events
Definition: InputEngine.h:73
RoR::BOAT
@ BOAT
its a boat
Definition: SimData.h:94
RoR::EV_COMMON_CYCLE_DEBUG_VIEWS
@ EV_COMMON_CYCLE_DEBUG_VIEWS
cycle debug view mode
Definition: InputEngine.h:265
RoR::Actor::getGForces
Ogre::Vector3 getGForces()
Definition: Actor.h:87
RoR::Actor::displayWheelDiffMode
void displayWheelDiffMode()
Cycles through the available inter wheel diff modes.
Definition: Actor.cpp:1362
RoR::GUI::VehicleInfoTPanel::DrawCruiseControlButton
void DrawCruiseControlButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1197
RoR::GUI::VehicleInfoTPanel::m_right_blinker_icon
Ogre::TexturePtr m_right_blinker_icon
Definition: GUI_VehicleInfoTPanel.h:132
RoR::ActorLinkingRequestType::TIE_TOGGLE
@ TIE_TOGGLE
RoR::GUI::VehicleInfoTPanel::m_stat_mass_Kg
float m_stat_mass_Kg
Definition: GUI_VehicleInfoTPanel.h:84
SOUND_GET_STATE
#define SOUND_GET_STATE(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:39
RoR::GUI::VehicleInfoTPanel::TPANELFOCUS_COMMANDS
@ TPANELFOCUS_COMMANDS
Definition: GUI_VehicleInfoTPanel.h:38
RoR::Engine::startEngine
void startEngine()
Quick engine start. Plays sounds.
Definition: Engine.cpp:995
RoR::GUI::VehicleInfoTPanel::DrawVehicleStatsUI
void DrawVehicleStatsUI(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:368
RoR::GUI::VehicleInfoTPanel::m_hovered_commandkey
CommandkeyID_t m_hovered_commandkey
Definition: GUI_VehicleInfoTPanel.h:67
RoR::GUI::VehicleInfoTPanel::m_traction_control_icon
Ogre::TexturePtr m_traction_control_icon
Definition: GUI_VehicleInfoTPanel.h:138
RoR::Actor::cruisecontrolToggle
void cruisecontrolToggle()
Defined in 'gameplay/CruiseControl.cpp'.
Definition: CruiseControl.cpp:31
RoR::ActorModifyRequest::amr_type
Type amr_type
Definition: SimData.h:871
RoR::EV_TRUCK_SHIFT_NEUTRAL
@ EV_TRUCK_SHIFT_NEUTRAL
shift to neutral gear in manual transmission mode
Definition: InputEngine.h:356
RoR::GfxActor::GetSimDataBuffer
ActorSB & GetSimDataBuffer()
Definition: GfxActor.h:128
RoR::Actor::ar_num_shocks
int ar_num_shocks
Number of shock absorbers.
Definition: Actor.h:301
RoR
Definition: AppContext.h:36
x
float x
Definition: (ValueTypes) quaternion.h:5
RoR::ActorSB::simbuf_has_engine
bool simbuf_has_engine
Definition: SimBuffers.h:144
RoR::ActorSB::simbuf_engine_torque
float simbuf_engine_torque
Definition: SimBuffers.h:151
RoR::Engine::toggleAutoMode
void toggleAutoMode()
Definition: Engine.cpp:817
DrawSingleButtonRow
bool DrawSingleButtonRow(bool active, const Ogre::TexturePtr &icon, const char *name, RoR::events ev, bool *btn_active=nullptr)
Definition: GUI_VehicleInfoTPanel.cpp:878
RoR::EV_TRUCK_PARKING_BRAKE
@ EV_TRUCK_PARKING_BRAKE
toggle parking brake
Definition: InputEngine.h:328
RoR::COMMANDKEYID_INVALID
static const CommandkeyID_t COMMANDKEYID_INVALID
Definition: ForwardDeclarations.h:83
SOUND_TOGGLE
#define SOUND_TOGGLE(_ACTOR_, _TRIG_)
Definition: SoundScriptManager.h:37
RoR::EV_COMMON_TOGGLE_DEBUG_VIEW
@ EV_COMMON_TOGGLE_DEBUG_VIEW
toggle debug view mode
Definition: InputEngine.h:264
RoR::GUI::VehicleInfoTPanel::DrawHeadLightButton
void DrawHeadLightButton(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:904
RoR::EV_TRUCK_ANTILOCK_BRAKE
@ EV_TRUCK_ANTILOCK_BRAKE
toggle antilockbrake system
Definition: InputEngine.h:299
RoR::CameraManager::switchToNextBehavior
void switchToNextBehavior()
Definition: CameraManager.cpp:329
RoR::Actor::getCustomLightVisible
bool getCustomLightVisible(int number)
Definition: Actor.cpp:4427
RoR::beam_t::L
float L
length
Definition: SimData.h:338
RoR::ActorModifyRequest::Type::RESET_ON_SPOT
@ RESET_ON_SPOT
RoR::Actor::displayTransferCaseMode
void displayTransferCaseMode()
Gets the current transfer case mode name (4WD Hi, ...)
Definition: Actor.cpp:1388
RoR::beam_t::bm_broken
bool bm_broken
Definition: SimData.h:351
BUTTON_Y_OFFSET
const float BUTTON_Y_OFFSET
Definition: GUI_VehicleInfoTPanel.cpp:655
RoR::GUI::VehicleInfoTPanel::DrawCustomLightButtons
void DrawCustomLightButtons(RoR::GfxActor *actorx)
Definition: GUI_VehicleInfoTPanel.cpp:1205