16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 20:39:18 +02:00

Developer tools: Add vehicle fiz reload button

This commit is contained in:
2025-02-17 01:23:43 +01:00
parent 7d27e6ce33
commit 5258c4c775
6 changed files with 47 additions and 3 deletions

View File

@@ -619,6 +619,7 @@ debug_panel::render() {
render_section( "Camera", m_cameralines );
render_section( "Gfx Renderer", m_rendererlines );
render_section_settings();
render_section_developer(); // Developer tools
#ifdef WITH_UART
if(true == render_section( "UART", m_uartlines)) {
int ports_num = UartStatus.available_ports.size();
@@ -1475,6 +1476,19 @@ debug_panel::render_section( std::vector<text_line> const &Lines ) {
return true;
}
bool debug_panel::render_section_developer()
{
if (false == ImGui::CollapsingHeader("Developer tools"))
return false;
ImGui::PushStyleColor(ImGuiCol_Text, {Global.UITextColor.r, Global.UITextColor.g, Global.UITextColor.b, Global.UITextColor.a});
ImGui::TextUnformatted("Warning! These tools are only for developers.\nDo not use them if you are NOT sure what they do!");
ImGui::TextColored(ImVec4(1.0f, 0.0f, 0.0f, 1.0f), "These settings may crash your simulator!");
if (ImGui::Button("Reload current vehicle .fiz") == true)
{
m_input.vehicle->MoverParameters->reload_FIZ(); // reload fiz
}
}
bool
debug_panel::render_section_settings() {