17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 22:39:19 +02:00
Files
maszyna/application/driveruilayer.cppm
maj00r b8f040e6fd propagate template headers transitively, import Console where used
AnimModel.cpp reaches cParser through the simulation core, not a direct
import, so the previous pass missed it; the propagation now follows the
whole import closure. Train.cpp, drivermode.cpp and Globals.cpp call
Console:: inside _WIN32 guards without importing eu07.console - invisible
on Linux, where those blocks are skipped.
2026-09-10 01:41:24 +02:00

92 lines
2.4 KiB
C++

module;
#include <array>
#include <chrono>
#include <cstddef>
#include <limits>
#include <mutex>
#include <ostream>
#include <sstream>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include <deque>
#include <unordered_map>
export module eu07.application.driveruilayer;
import eu07.application.uilayer;
import eu07.application.driveruipanels;
import eu07.input.command;
import eu07.widgets.vehiclelist;
import eu07.widgets.vehicleparams;
import eu07.widgets.map;
import eu07.widgets.time;
import eu07.widgets.trainingcard;
import eu07.widgets.perfgraphs;
import eu07.widgets.cameraview_extcam;
export {
/*
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/.
*/
class driver_ui : public ui_layer {
public:
// constructors
driver_ui();
// methods
void showDebugUI() override;
// potentially processes provided input key. returns: true if the input was processed, false otherwise
bool
on_key( int const Key, int const Action ) override;
// potentially processes provided mouse movement. returns: true if the input was processed, false otherwise
bool
on_cursor_pos( double const Horizontal, double const Vertical ) override;
// potentially processes provided mouse button. returns: true if the input was processed, false otherwise
bool
on_mouse_button( int const Button, int const Action ) override;
// updates state of UI elements
void
update() override;
protected:
void render_menu_contents() override;
private:
// methods
// sets visibility of the cursor
void
set_cursor( bool const Visible );
// render() subclass details
void
render_() override;
// members
drivingaid_panel m_aidpanel { "Driving Aid", false };
scenario_panel m_scenariopanel { "Scenario", false };
timetable_panel m_timetablepanel { "Timetable", false };
debug_panel m_debugpanel { "Debug Data", false };
transcripts_panel m_transcriptspanel { "Transcripts", true }; // voice transcripts
trainingcard_panel m_trainingcardpanel;
perfgraph_panel m_perfgraphpanel;
bool m_paused { false };
command_relay m_relay;
ui::vehiclelist_panel m_vehiclelist { ui::vehiclelist_panel(*this) };
ui::map_panel m_mappanel;
ui::time_panel m_timepanel;
ui::cameraview_panel m_cameraviewpanel;
};
} // export