56 bool show_translucent =
false;
61 fmt::format(
_LC(
"VehicleButtons",
"Hover the mouse on the left to see controls")),
"lightbulb.png");
66 show_translucent =
true;
73 && (ImGui::GetIO().MousePos.x <=
MIN_HOVERBOX_WIDTH * ImGui::GetFontSize() + ImGui::GetStyle().WindowPadding.x*2))
75 show_translucent =
true;
96 ImGuiWindowFlags flags = ImGuiWindowFlags_NoCollapse |
97 ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBringToFrontOnFocus;
107 ImGui::SetNextWindowContentWidth(
MIN_PANEL_WIDTH * ImGui::GetFontSize());
114 ImGui::PushStyleColor(ImGuiCol_TextDisabled, ImGui::GetStyle().Colors[ImGuiCol_TextDisabled]);
127 ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.f, 0.f, 0.f, 0.f));
128 ImGui::Begin(
"VehicleInfoTPanel",
nullptr, flags);
132 int tabflags_basics = ImGuiTabItemFlags_None;
133 int tabflags_stats = ImGuiTabItemFlags_None;
134 int tabflags_commands = ImGuiTabItemFlags_None;
135 int tabflags_diag = ImGuiTabItemFlags_None;
142 case TPANELFOCUS_DIAG: tabflags_diag = ImGuiTabItemFlags_SetSelected;
break;
153 ImVec2 name_pos = ImGui::GetCursorPos();
157 Ogre::TexturePtr preview_tex = Ogre::TextureManager::getSingleton().load(
161 ImVec2 size(preview_tex->getWidth(), preview_tex->getHeight());
162 size *= max_preview_size.x / size.x;
163 if (size.y > max_preview_size.y)
165 size *= max_preview_size.y / size.y;
168 ImGui::Image(
reinterpret_cast<ImTextureID
>(preview_tex->getHandle()), size);
169 tabs_pos = ImGui::GetCursorPos();
171 name_pos.x += size.x + ImGui::GetStyle().ItemSpacing.x;
172 ImGui::SetCursorPos(name_pos);
181 ImGui::SetCursorPos(tabs_pos);
183 ImGui::BeginTabBar(
"VehicleInfoTPanelTabs", ImGuiTabBarFlags_None);
184 if (ImGui::BeginTabItem(
_LC(
"TPanel",
"Basics"),
nullptr, tabflags_basics))
193 if (ImGui::BeginTabItem(
_LC(
"TPanel",
"Stats"),
nullptr, tabflags_stats))
202 if (ImGui::BeginTabItem(
_LC(
"TPanel",
"Commands"),
nullptr, tabflags_commands))
211 if (ImGui::BeginTabItem(
_LC(
"TPanel",
"Diag"),
nullptr, tabflags_diag))
224 ImGui::PopStyleColor(4);
234 const float max_height = std::max(ImGui::GetFrameHeight(),
235 ImGui::GetIO().DisplaySize.y
236 - (ImGui::GetCursorScreenPos().y + ImGui::GetStyle().WindowPadding.y + theme.
screen_edge_padding.y));
239 ImGui::BeginChild(
"TabContents", ImVec2(0.f, height),
false);
254 ImGui::TextDisabled(
"%s",
_LC(
"VehicleDescription",
"Description text:"));
257 ImGui::TextWrapped(
"%s", line.c_str());
265 ImGui::TextDisabled(
"%s",
_LC(
"VehicleDescription",
"Help image:"));
269 ImGui::SetCursorPosX(this->
GetPanelWidth() - (ImGui::CalcTextSize(
_LC(
"VehicleDescription",
"Full size")).
x + ImGui::GetFontSize() * 1.5625f));
280 if (ImGui::IsItemVisible())
287 ImTextureID im_tex =
reinterpret_cast<ImTextureID
>(actorx->
GetHelpTex()->getHandle());
299 ImGui::TextDisabled(
"%s",
_LC(
"VehicleDescription",
"Command controls:"));
301 ImGui::Text(
"%s",
_LC(
"VehicleDescription",
"Hover controls for on-vehicle highlight"));
302 ImGui::PopStyleColor(1);
307 ImVec2 initial_cursor = ImGui::GetCursorScreenPos();
310 std::string desc = qpair.uckp_description;
311 if (qpair.uckp_description ==
"")
313 desc =
_LC(
"VehicleDescription",
"~unlabeled~");
317 ImVec2 desc_size = ImGui::CalcTextSize(desc.c_str());
318 const bool single_line = ImGui::GetWindowContentRegionMax().x > desc_size.x + key1_size.x + key2_size.x;
319 const float BUMP_HEIGHT = ImGui::GetFontSize() * 0.1875f;
320 const float MOUSEHIGHLIGHT_MAGICPADRIGHT = ImGui::GetFontSize() * 0.25f;
323 ImVec2 highlight_mouse_min = initial_cursor - ImGui::GetStyle().ItemSpacing/2;
324 ImVec2 highlight_mouse_max = highlight_mouse_min + ImVec2(ImGui::GetWindowContentRegionWidth()+MOUSEHIGHLIGHT_MAGICPADRIGHT, ImGui::GetTextLineHeightWithSpacing());
327 highlight_mouse_max.y += ImGui::GetTextLineHeightWithSpacing() - BUMP_HEIGHT;
330 if ((ImGui::GetMousePos().
x > highlight_mouse_min.x && ImGui::GetMousePos().y > highlight_mouse_min.y)
331 && (ImGui::GetMousePos().x < highlight_mouse_max.x && ImGui::GetMousePos().y < highlight_mouse_max.y))
339 ImDrawList* draw_list = ImGui::GetWindowDrawList();
340 draw_list->AddRectFilled(highlight_mouse_min, highlight_mouse_max, ImColor(col));
348 ImGui::Text(
"%s", desc.c_str());
358 ImGui::SetCursorPos(ImGui::GetCursorPos() + ImVec2(0.f, -BUMP_HEIGHT));
362 bool key1_hovered =
false;
363 bool key1_active =
false;
364 ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().
x) - key1_size.x - key2_size.x - ImGui::GetStyle().ItemSpacing.x);
377 ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().
x) - key2_size.x);
378 bool key2_hovered =
false;
379 bool key2_active =
false;
398 ImVec2 label_size = ImGui::CalcTextSize(name);
399 ImVec2 value_size = ImGui::CalcTextSize(value.c_str());
400 float cursor_x_desired = - ImGui::CalcTextSize(value.c_str()).x;
401 if (label_size.x + value_size.x + ImGui::GetStyle().ItemSpacing.x < ImGui::GetWindowContentRegionWidth())
405 ImGui::SetCursorPosX(ImGui::GetWindowContentRegionMax().
x - value_size.x);
406 ImGui::TextColored(value_color,
"%s", value.c_str());
419 ImGui::PopStyleColor();
427 ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(ImGui::GetStyle().ItemSpacing.x, 0));
432 DrawStatsLine(
_LC(
"SimActorStats",
"Vehicle health: "), fmt::format(
"{:.2f}%", value));
440 DrawStatsLine(
_LC(
"SimActorStats",
"Beam count: "), fmt::format(
"{}", num_beams));
448 const float avg_deform =
static_cast<float>(
Round((
float)
m_stat_avg_deform / (
float)num_beams, 4) * 100.0f );
449 DrawStatsLine(
_LC(
"SimActorStats",
"Average deformation: "), fmt::format(
"{:.2f}", avg_deform));
452 DrawStatsLine(
_LC(
"SimActorStats",
"Average stress: "), fmt::format(
"{:+08.0f}", avg_stress));
458 DrawStatsLine(
_LC(
"SimActorStats",
"Node count: "), fmt::format(
"{} (wheels: {})", num_nodes, num_wheelnodes));
477 const double PI = 3.14159265358979323846;
485 const ImVec4 rpm_color = (cur_rpm > max_rpm) ? theme.
value_red_text_color : ImGui::GetStyle().Colors[ImGuiCol_Text];
486 DrawStatsLineColored(
_LC(
"SimActorStats",
"Engine RPM: "), fmt::format(
"{:.2f} / {:.2f}", cur_rpm, max_rpm), rpm_color);
489 DrawStatsLineColored(
_LC(
"SimActorStats",
"Input shaft RPM: "), fmt::format(
"{:.0f}", inputshaft_rpm), rpm_color);
493 const float currentKw = (((cur_rpm * (torque + ((turbo_psi * 6.8) * torque) / 100) * ( PI / 30)) / 1000));
496 DrawStatsLine(
_LC(
"SimActorStats",
"Current power: "), fmt::format(
"{:.0f}hp ({:.0f}Kw)",
Round(currentKw * 1.34102209),
Round(currentKw)));
500 DrawStatsLine(
_LC(
"SimActorStats",
"Current power: "), fmt::format(
"{:.0f}Kw ({:.0f}hp)",
Round(currentKw),
Round(currentKw * 1.34102209)));
507 float velocityKPH = wheel_speed * 3.6f;
508 float velocityMPH = wheel_speed * 2.23693629f;
509 float carSpeedKPH = n0_velo_len * 3.6f;
510 float carSpeedMPH = n0_velo_len * 2.23693629f;
513 if (fabs(wheel_speed) < 1.0f)
515 velocityKPH = velocityMPH = 0.0f;
517 if (fabs(n0_velo_len) < 1.0f)
519 carSpeedKPH = carSpeedMPH = 0.0f;
524 DrawStatsLine(
_LC(
"SimActorStats",
"Wheel speed: "), fmt::format(
"{:.0f} mph ({:.0f} km/h)",
Round(velocityMPH),
Round(velocityKPH)));
526 DrawStatsLine(
_LC(
"SimActorStats",
"Vehicle speed: "), fmt::format(
"{:.0f} mph ({:.0f} km/h)",
Round(carSpeedMPH),
Round(carSpeedKPH)));
530 DrawStatsLine(
_LC(
"SimActorStats",
"Wheel speed: "), fmt::format(
"{:.0f} km/h ({:.0f} mph)",
Round(velocityKPH),
Round(velocityMPH)));
532 DrawStatsLine(
_LC(
"SimActorStats",
"Vehicle speed: "), fmt::format(
"{:.0f} km/h ({:.0f} mph)",
Round(carSpeedKPH),
Round(carSpeedMPH)));
537 float speedKN = n0_velo_len * 1.94384449f;
556 DrawStatsLine(
_LC(
"SimActorStats",
"Altitude: "), fmt::format(
"{:.0f} feet ({:.0f} meters)",
Round(altitude),
Round(altitude * 0.30480)));
561 std::string label = fmt::format(
"{} #{}:",
_LC(
"SimActorStats",
"Engine "), engine_num);
564 DrawStatsLine(label.c_str(), fmt::format(
"{:.2f} RPM", ae.simbuf_ae_rpm));
568 DrawStatsLine(label.c_str(), fmt::format(
"{:.2f}", ae.simbuf_ae_rpm));
578 std::string label = fmt::format(
"{} #{}:",
_LC(
"SimActorStats",
"Engine "), engine_num);
579 DrawStatsLine(label.c_str(), fmt::format(
"{:.2f}", screw.simbuf_sp_throttle));
591 DrawStatsLine(
_LC(
"SimActorStats",
"Top speed: "), fmt::format(
"{:.0f} mph ({:.0f} km/h)",
Round(speedMPH),
Round(speedKPH)));
595 DrawStatsLine(
_LC(
"SimActorStats",
"Top speed: "), fmt::format(
"{:.0f} km/h ({:.0f} mph)",
Round(speedKPH),
Round(speedMPH)));
605 ImGui::PopStyleVar();
610 ImGui::TextDisabled(
"%s",
_LC(
"TopMenubar",
"Live diagnostic views:"));
614 int debug_view_type =
static_cast<int>(actorx->
GetDebugView());
644 if (debug_view_type !=
static_cast<int>(actorx->
GetDebugView()))
652 ImGui::TextDisabled(
"%s",
_LC(
"TopMenubar",
"Settings:"));
657 if (debug_view_type >= 2)
674 float average_deformation = 0.0f;
675 float beamstress = 0.0f;
678 int beamdeformed = 0;
688 beamstress += std::abs(beam->
stress);
689 float current_deformation = fabs(beam->
L - beam->
refL);
694 average_deformation += current_deformation;
718 ImGui::Dummy(ImVec2(
BUTTON_SIZE.x * ImGui::GetFontSize(), 1.f)); ImGui::SameLine(); ImGui::Bullet(); ImGui::Text(
"%s", name);
721 ImGui::SetCursorPosX(ImGui::GetWindowContentRegionWidth() - btn_size.x);
734 ImGui::TextDisabled(
"Simulation:");
744 if (num_headlights || num_taillights || num_blinkleft || num_blinkright || num_beacons || has_horn)
746 ImGui::TextDisabled(
"Lights and signals:");
747 if (num_headlights || num_taillights)
759 if (num_blinkright || num_blinkleft)
773 int total_customlights = 0;
778 if (total_customlights > 0)
791 ImGui::TextDisabled(
"Engine:");
797 if (has_transfercase && has_4wd && has_2wd)
801 if (has_transfercase && num_tc_gears > 1)
838 if (num_axlediffs || num_wheeldiffs || tc_visible || alb_visible || has_parkingbrake || has_engine)
840 ImGui::TextDisabled(
"Traction:");
857 if (has_parkingbrake)
869 if (num_locks || num_ties)
871 ImGui::TextDisabled(
"Connections:");
882 const size_t num_cparticles = actorx->
getCParticles().size();
884 ImGui::TextDisabled(
"View:");
908 ImVec2 p1_pos, p2_pos;
923 const ImVec2 clip_min = ImGui::GetWindowDrawList()->GetClipRectMin();
924 const ImVec2 clip_max = ImGui::GetWindowDrawList()->GetClipRectMax();
926 int window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar
927 | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoMouseInputs;
930 ImGui::PushStyleColor(ImGuiCol_WindowBg, ImVec4(0, 0, 0, 0));
931 ImGui::Begin(
"T-Panel help tex fullsize", NULL, window_flags);
932 ImDrawList* drawlist = ImGui::GetWindowDrawList();
933 ImTextureID im_tex =
reinterpret_cast<ImTextureID
>(actorx->
GetHelpTex()->getHandle());
934 drawlist->PushClipRect(ImVec2(drawlist->GetClipRectMin().x, clip_min.y), ImVec2(drawlist->GetClipRectMax().x, clip_max.y),
true);
937 drawlist->PopClipRect();
939 ImGui::PopStyleColor(1);
946 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
950 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
953 ImGui::GetWindowDrawList()->AddRectFilled(
954 ImGui::GetCursorScreenPos() -
BUTTON_OFFSET * ImGui::GetFontSize(), ImGui::GetCursorScreenPos() +
BUTTON_SIZE * ImGui::GetFontSize(),
955 ImColor(ImGui::GetStyle().Colors[ImGuiCol_Button]), ImGui::GetStyle().FrameRounding);
956 ImGui::GetWindowDrawList()->AddImage(
reinterpret_cast<ImTextureID
>(icon->getHandle()),
957 ImGui::GetCursorScreenPos() -
BUTTON_OFFSET * ImGui::GetFontSize(), ImGui::GetCursorScreenPos() +
BUTTON_SIZE * ImGui::GetFontSize());
958 ImGui::SetCursorPosX(ImGui::GetCursorPosX() +
BUTTON_SIZE.x * ImGui::GetFontSize() + 2*ImGui::GetStyle().ItemSpacing.x);
959 ImGui::PopStyleColor();
961 ImGui::Text(
"%s", name);
964 ImGui::SetCursorPosX(ImGui::GetWindowContentRegionMax().
x - btn_size.x);
1136 const char* msg =
nullptr;
1171 int num_custom_flares = 0;
1178 num_custom_flares++;
1180 if (i == 5 || i == 9)
1185 std::string label =
"L" + std::to_string(i + 1);
1189 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
1193 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
1196 if (ImGui::Button(label.c_str(), ImVec2(ImGui::GetFontSize() * 2.f, 0)))
1200 if (ImGui::IsItemHovered())
1202 ImGui::BeginTooltip();
1204 ImGui::EndTooltip();
1208 ImGui::PopStyleColor();
1212 if (num_custom_flares > 0)
1274 ImGui::GetWindowDrawList()->AddImage(
reinterpret_cast<ImTextureID
>(
m_beacons_icon->getHandle()),
1275 ImGui::GetCursorScreenPos() -
BUTTON_OFFSET * ImGui::GetFontSize(), ImGui::GetCursorScreenPos() +
BUTTON_SIZE * ImGui::GetFontSize());
1276 ImGui::SetCursorPosX(ImGui::GetCursorPosX() +
BUTTON_SIZE.x * ImGui::GetFontSize() + 2 * ImGui::GetStyle().ItemSpacing.x);
1278 ImGui::Text(
"Custom lights");
1280 const char* hotkey =
"CTRL+[1...]";
1281 ImVec2 keysize = ImGui::CalcTextSize(hotkey);
1282 ImGui::SetCursorPosX((ImGui::GetWindowContentRegionMax().
x) - keysize.x - ImGui::GetStyle().ItemSpacing.x);
1283 ImGui::Text(hotkey);
1285 const ImVec2 BTN_PADDING = ImVec2(ImGui::GetFontSize() * 0.0625f, ImGui::GetFontSize() * 0.0625f);
1286 const ImVec2 btn_size = ImGui::CalcTextSize(
"10") + (BTN_PADDING * 2);
1287 ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, BTN_PADDING);
1294 std::string label = std::to_string(i + 1);
1298 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]);
1302 ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_Button]);
1305 if (ImGui::Button(label.c_str(), btn_size))
1309 if (ImGui::IsItemHovered())
1311 ImGui::BeginTooltip();
1313 ImGui::EndTooltip();
1315 ImGui::PopStyleColor();
1320 ImGui::PopStyleVar();
Central state/object manager and communications hub.
const float MIN_PANEL_WIDTH
void DrawStatsLineColored(const char *name, const std::string &value, ImVec4 value_color)
const float HELP_TEXTURE_HEIGHT_FULL
const float BUTTON_Y_OFFSET
const ImVec2 BUTTON_SIZE(1.125f, 1.125f)
const float HELP_TEXTURE_HEIGHT
bool DrawSingleButtonRow(bool active, const Ogre::TexturePtr &icon, const char *name, RoR::events ev, bool *btn_active=nullptr)
const ImVec2 MAX_PREVIEW_SIZE(6.25f, 6.25f)
const float MIN_HOVERBOX_WIDTH
void DrawStatsLine(const char *name, const std::string &value)
void DrawStatsBullet(const char *name, const std::string &value)
const ImVec2 BUTTON_OFFSET(0, 0.1875f)
void DrawSingleBulletRow(const char *name, RoR::events ev)
const float HELP_TEXTURE_WIDTH
Game state manager and message-queue provider.
Manager for all visuals belonging to a single actor.
static const int MAX_CLIGHTS
See RoRnet::Lightmask and enum events in InputEngine.h.
Core data structures for simulation; Everything affected by by either physics, network or user intera...
#define SOUND_TOGGLE(_ACTOR_, _TRIG_)
#define SOUND_GET_STATE(_ACTOR_, _TRIG_)
bool alb_mode
Anti-lock brake state; Enabled? {1/0}.
void toggleTransferCaseGearRatio()
void antilockbrakeToggle()
CmdKeyArray ar_command_key
BEWARE: commandkeys are indexed 1-MAX_COMMANDS!
void displayTransferCaseMode()
Gets the current transfer case mode name (4WD Hi, ...)
int getWheelNodeCount() const
bool getCustomParticleMode()
std::vector< tie_t > ar_ties
void toggleWheelDiffMode()
bool ar_is_police
Gfx/sfx attr.
bool ar_physics_paused
Actor physics individually paused by user.
std::string getTruckName()
void toggleBlinkType(BlinkType blink)
void toggleTransferCaseMode()
void displayAxleDiffMode()
Cycles through the available inter axle diff modes.
void displayWheelDiffMode()
Cycles through the available inter wheel diff modes.
bool alb_nodash
Anti-lock brake attribute: Hide the dashboard indicator?
int countFlaresByType(FlareType type)
int getWheelDiffMode()
Writes info to console/notify box.
bool getCustomLightVisible(int number)
TransferCase * getTransferCaseMode()
Toggles between 2WD and 4WD mode.
int getAxleDiffMode()
Writes info to console/notify box.
int countCustomLights(int control_number)
std::vector< std::string > getDescription()
void toggleAxleDiffMode()
ActorInstanceID_t ar_instance_id
Static attr; session-unique ID.
void setCustomLightVisible(int number, bool visible)
void RequestUpdateHudFeatures()
Ogre::Vector3 getMaxGForces()
bool getBeaconMode() const
bool cc_mode
Cruise Control.
void parkingbrakeToggle()
float getTotalMass(bool withLocked=true)
std::vector< hook_t > ar_hooks
void tractioncontrolToggle()
CacheEntryPtr & getUsedActorEntry()
The actor entry itself.
bool tc_nodash
Hide the dashboard indicator?
void toggleCustomParticles()
bool isLocked()
Are hooks locked?
Ogre::Vector3 getGForces()
void cruisecontrolToggle()
Defined in 'gameplay/CruiseControl.cpp'.
std::vector< UniqueCommandKeyPair > ar_unique_commandkey_pairs
UI helper for displaying command control keys to user (must be built at spawn).
bool getHeadlightsVisible() const
Ogre::String filecachename
preview image filename
void switchToNextBehavior()
@ CONSOLE_MSGTYPE_INFO
Generic message.
void putMessage(MessageArea area, MessageType type, std::string const &msg, std::string icon="")
SimGearboxMode getAutoMode()
void startEngine()
Quick engine start. Plays sounds.
void toggleContact()
Ignition.
Ogre::TexturePtr m_cruise_control_icon
Ogre::Timer m_startupdemo_timer
void DrawVehicleStatsUI(RoR::GfxActor *actorx)
void DrawEngineButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_abs_icon
void DrawWarnBlinkerButton(RoR::GfxActor *actorx)
void SetVisible(TPanelMode mode, TPanelFocus focus=TPANELFOCUS_NONE)
Ogre::TexturePtr m_actor_physics_icon
Ogre::TexturePtr m_lock_icon
CommandkeyID_t m_hovered_commandkey
ImVec4 m_panel_translucent_color
void DrawVehicleCommandsUI(RoR::GfxActor *actorx)
void UpdateStats(float dt, ActorPtr actor)
Caution: touches live data, must be synced with sim. thread.
Ogre::TexturePtr m_shift_icon
ImVec4 m_command_hovered_text_color
ImVec4 m_transluc_textdis_color
Ogre::TexturePtr m_mirror_icon
TPanelMode m_visibility_mode
void DrawSecureButton(RoR::GfxActor *actorx)
void DrawParkingBrakeButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_left_blinker_icon
Ogre::TexturePtr m_headlight_icon
Ogre::TexturePtr m_engine_icon
Ogre::TexturePtr m_w_icon
float m_cmdbeam_highlight_thickness
void DrawVehicleDiagUI(RoR::GfxActor *actorx)
Ogre::TexturePtr m_secure_icon
Ogre::TexturePtr m_m_icon
Ogre::TexturePtr m_parking_brake_icon
CommandkeyID_t m_active_commandkey
void DrawLeftBlinkerButton(RoR::GfxActor *actorx)
void DrawParticlesButton(RoR::GfxActor *actorx)
int m_stat_deformed_beams
void DrawRepairButton(RoR::GfxActor *actorx)
void DrawHornButton(RoR::GfxActor *actorx)
void DrawVehicleHelpTextureFullsize(RoR::GfxActor *actorx)
Ogre::TexturePtr m_right_blinker_icon
ImVec4 m_panel_transluc_scrollbar_bg
Ogre::TexturePtr m_traction_control_icon
Ogre::TexturePtr m_warning_light_icon
void DrawMirrorButton(RoR::GfxActor *actorx)
void DrawHeadLightButton(RoR::GfxActor *actorx)
void DrawBeaconButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_particle_icon
void DrawCruiseControlButton(RoR::GfxActor *actorx)
void DrawActorPhysicsButton(RoR::GfxActor *actorx)
void DrawAxleDiffButton(RoR::GfxActor *actorx)
void DrawVehicleCommandHighlights(RoR::GfxActor *actorx)
Ogre::TexturePtr m_physics_icon
void DrawShiftModeButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_beacons_icon
void DrawCustomLightButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_horn_icon
Ogre::TexturePtr m_camera_icon
void BeginTabContents()
Opens scrollable child window which fits the panel to screen.
ImVec4 m_cmdbeam_highlight_color
TPanelFocus m_current_focus
Updated based on currently open tab.
void DrawLockButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_g_icon
void Draw(RoR::GfxActor *actorx)
float m_tab_contents_height
Measured on previous frame; 0 = unknown.
ImVec2 m_helptext_fullsize_screenpos
The image is drawn into separate window.
void DrawVehicleBasicsUI(RoR::GfxActor *actorx)
void DrawTransferCaseModeButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_repair_icon
void DrawTransferCaseGearRatioButton(RoR::GfxActor *actorx)
void DrawWheelDiffButton(RoR::GfxActor *actorx)
void DrawAntiLockBrakeButton(RoR::GfxActor *actorx)
void DrawCustomLightButtons(RoR::GfxActor *actorx)
TPanelFocus m_requested_focus
Requested by SetVisible()
void DrawTractionControlButton(RoR::GfxActor *actorx)
Ogre::TexturePtr m_a_icon
void DrawRightBlinkerButton(RoR::GfxActor *actorx)
void PushMessage(Message m)
Doesn't guarantee order! Use ChainMessage() if order matters.
std::vector< CParticle > & getCParticles()
void SetVideoCamState(VideoCamState state)
ActorSB & GetSimDataBuffer()
bool IsDebugViewApplicable(DebugViewType dv)
std::vector< VideoCamera > & getVideoCameras()
VideoCamState GetVideoCamState() const
NodeSB * GetSimNodeBuffer()
void SetDebugView(DebugViewType dv)
Ogre::TexturePtr GetHelpTex()
int countBeaconProps() const
DebugViewType GetDebugView() const
bool tr_2wd
Does it support 2WD mode?
std::vector< float > tr_gear_ratios
Gear reduction ratios.
int tr_ax_2
This axle is only driven in 4WD mode.
@ TRUCK
its a truck (or other land vehicle)
@ NOT_DRIVEABLE
not drivable at all
@ AIRPLANE
its an airplane
@ MSG_SIM_ACTOR_LINKING_REQUESTED
Payload = RoR::ActorLinkingRequest* (owner)
@ MSG_SIM_MODIFY_ACTOR_REQUESTED
Payload = RoR::ActorModifyRequest* (owner)
@ MANUAL_STICK
Fully manual: stick shift.
@ MANUAL_RANGES
Fully manual: stick shift with ranges.
@ SEMI_AUTO
Manual shift with auto clutch.
@ MANUAL
Fully manual: sequential shift.
CVar * ui_show_vehicle_buttons
InputEngine * GetInputEngine()
CameraManager * GetCameraManager()
GUIManager * GetGuiManager()
GameContext * GetGameContext()
CVar * diag_hide_wheel_info
CVar * diag_hide_broken_beams
CVar * gfx_speedo_imperial
CVar * ui_always_show_fullsize
CVar * diag_hide_beam_stress
void ImDrawEventHighlighted(events input_event)
ImDrawList * GetImDummyFullscreenWindow(const std::string &name="RoR_TransparentFullscreenWindow")
bool ImDrawEventHighlightedButton(events input_event, bool *btn_hovered=nullptr, bool *btn_active=nullptr)
void ImTextWrappedColorMarked(std::string const &text)
Prints multiline text with '#rrggbb' color markers. Behaves like ImGui::Text* functions.
ImVec2 ImCalcEventHighlightedSize(events input_event)
bool GetScreenPosFromWorldPos(Ogre::Vector3 const &world_pos, ImVec2 &out_screen)
bool DrawGCheckbox(CVar *cvar, const char *label)
Ogre::Real Round(Ogre::Real value, unsigned short ndigits=0)
static const CommandkeyID_t COMMANDKEYID_INVALID
Ogre::TexturePtr FetchIcon(const char *name)
Estabilishing a physics linkage between 2 actors modifies a global linkage table and triggers immedia...
ActorLinkingRequestType alr_type
ActorInstanceID_t alr_actor_instance_id
ActorInstanceID_t amr_actor
Ogre::Vector3 simbuf_node0_velo
std::vector< ScrewpropSB > simbuf_screwprops
std::vector< AeroEngineSB > simbuf_aeroengines
float simbuf_inputshaft_rpm
float simbuf_engine_max_rpm
float simbuf_engine_turbo_psi
float simbuf_engine_torque
ImVec4 semitransparent_window_bg
ImVec4 semitrans_scrollbar_bg
ImVec2 screen_edge_padding
Set by ApplyImGuiStyle() relative to font size.
ImVec4 value_blue_text_color
ImVec4 value_red_text_color
Unified game event system - all requests and state changes are reported using a message.
Ogre::Vector3 AbsPosition
UI helper for displaying command control keys to user.
Simulation: An edge in the softbody structure.
float refL
reference length
Ogre::Vector3 AbsPosition
absolute position in the world (shaky)