mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-17 23:39:18 +02:00
modifications for sim
This commit is contained in:
@@ -7,11 +7,25 @@
|
||||
ui::vehiclelist_panel::vehiclelist_panel(ui_layer &parent)
|
||||
: ui_panel(STR_C("Vehicle list"), false), m_parent(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ui::vehiclelist_panel::render_contents()
|
||||
{
|
||||
if (m_first_show && Global.gui_trainingdefault) {
|
||||
for (TDynamicObject *vehicle : simulation::Vehicles.sequence())
|
||||
{
|
||||
if (!vehicle->Mechanik || vehicle->name() != ToLower(Global.local_start_vehicle))
|
||||
continue;
|
||||
|
||||
ui_panel *panel = new vehicleparams_panel(vehicle->name());
|
||||
m_parent.add_owned_panel(panel);
|
||||
}
|
||||
|
||||
m_first_show = false;
|
||||
is_open = false;
|
||||
return;
|
||||
}
|
||||
|
||||
for (TDynamicObject *vehicle : simulation::Vehicles.sequence())
|
||||
{
|
||||
if (!vehicle->Mechanik)
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace ui
|
||||
class vehiclelist_panel : public ui_panel
|
||||
{
|
||||
ui_layer &m_parent;
|
||||
bool m_first_show = true;
|
||||
|
||||
public:
|
||||
vehiclelist_panel(ui_layer &parent);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "uilayer.h"
|
||||
#include "translation.h"
|
||||
#include "command.h"
|
||||
|
||||
Reference in New Issue
Block a user