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