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

modifications for sim

This commit is contained in:
milek7
2020-01-01 01:50:09 +01:00
parent e697b01296
commit b651752057
12 changed files with 192 additions and 32 deletions

View File

@@ -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)