mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
Merge branch 'master' into gfx-work
This commit is contained in:
101
driveruipanels.h
Normal file
101
driveruipanels.h
Normal file
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
This Source Code Form is subject to the
|
||||
terms of the Mozilla Public License, v.
|
||||
2.0. If a copy of the MPL was not
|
||||
distributed with this file, You can
|
||||
obtain one at
|
||||
http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "uilayer.h"
|
||||
#include "Classes.h"
|
||||
|
||||
class drivingaid_panel : public ui_expandable_panel {
|
||||
|
||||
public:
|
||||
drivingaid_panel( std::string const &Name, bool const Isopen )
|
||||
: ui_expandable_panel( Name, Isopen )
|
||||
{}
|
||||
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
// members
|
||||
std::array<char, 256> m_buffer;
|
||||
};
|
||||
|
||||
class timetable_panel : public ui_expandable_panel {
|
||||
|
||||
public:
|
||||
timetable_panel( std::string const &Name, bool const Isopen )
|
||||
: ui_expandable_panel( Name, Isopen ) {}
|
||||
|
||||
void update() override;
|
||||
|
||||
private:
|
||||
// members
|
||||
std::array<char, 256> m_buffer;
|
||||
};
|
||||
|
||||
class debug_panel : public ui_panel {
|
||||
|
||||
public:
|
||||
debug_panel( std::string const &Name, bool const Isopen )
|
||||
: ui_panel( Name, Isopen ) {}
|
||||
|
||||
void update() override;
|
||||
void render() override;
|
||||
|
||||
private:
|
||||
// types
|
||||
struct input_data {
|
||||
TTrain const *train;
|
||||
TDynamicObject const *controlled;
|
||||
TCamera const *camera;
|
||||
TDynamicObject const *vehicle;
|
||||
TMoverParameters const *mover;
|
||||
TController const *mechanik;
|
||||
};
|
||||
// methods
|
||||
// generate and send section data to provided output
|
||||
void update_section_vehicle( std::vector<text_line> &Output );
|
||||
void update_section_engine( std::vector<text_line> &Output );
|
||||
void update_section_ai( std::vector<text_line> &Output );
|
||||
void update_section_scantable( std::vector<text_line> &Output );
|
||||
void update_section_scenario( std::vector<text_line> &Output );
|
||||
void update_section_eventqueue( std::vector<text_line> &Output );
|
||||
void update_section_camera( std::vector<text_line> &Output );
|
||||
void update_section_renderer( std::vector<text_line> &Output );
|
||||
// section update helpers
|
||||
std::string update_vehicle_coupler( int const Side );
|
||||
std::string update_vehicle_brake() const;
|
||||
// renders provided lines, under specified collapsing header
|
||||
void render_section( std::string const &Header, std::vector<text_line> const &Lines );
|
||||
// members
|
||||
std::array<char, 1024> m_buffer;
|
||||
input_data m_input;
|
||||
std::vector<text_line>
|
||||
m_vehiclelines,
|
||||
m_enginelines,
|
||||
m_ailines,
|
||||
m_scantablelines,
|
||||
m_cameralines,
|
||||
m_scenariolines,
|
||||
m_eventqueuelines,
|
||||
m_rendererlines;
|
||||
int tprev { 0 }; // poprzedni czas
|
||||
double VelPrev { 0.0 }; // poprzednia prędkość
|
||||
double Acc { 0.0 }; // przyspieszenie styczne
|
||||
};
|
||||
|
||||
class transcripts_panel : public ui_panel {
|
||||
|
||||
public:
|
||||
transcripts_panel( std::string const &Name, bool const Isopen )
|
||||
: ui_panel( Name, Isopen ) {}
|
||||
|
||||
void update() override;
|
||||
void render() override;
|
||||
};
|
||||
Reference in New Issue
Block a user