mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 14:49:19 +02:00
Developer tools: Add vehicle fiz reload button
This commit is contained in:
@@ -622,6 +622,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();
|
||||
@@ -1492,6 +1493,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() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user