17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 15:39:20 +02:00
Files
maszyna/launcher/launchermode.cpp
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

66 lines
1.3 KiB
C++

module;
#include <array>
#include <chrono>
#include <cstddef>
#include <deque>
#include <limits>
#include <mutex>
#include <sstream>
#include <type_traits>
#include <unordered_map>
#include <utility>
#include <vector>
#include <ostream>
#include <string>
#include <GLFW/glfw3.h>
#include <memory>
#include "utilities/Globals_macros.h"
module eu07.launcher.launchermode;
import eu07.launcher.launcheruilayer;
import eu07.application.application;
import eu07.simulation.simulation;
import eu07.utilities.globals;
launcher_mode::launcher_mode()
{
m_userinterface = std::make_shared<launcher_ui>();
}
bool launcher_mode::init()
{
return true;
}
bool launcher_mode::update()
{
return true;
}
void launcher_mode::enter()
{
Application.set_cursor( GLFW_CURSOR_NORMAL );
simulation::is_ready = false;
Application.set_title(Global.AppName);
}
void launcher_mode::exit()
{
}
void launcher_mode::on_key(const int Key, const int Scancode, const int Action, const int Mods)
{
#ifndef __unix__
Global.shiftState = Mods & GLFW_MOD_SHIFT ? true : false;
Global.ctrlState = Mods & GLFW_MOD_CONTROL ? true : false;
Global.altState = Mods & GLFW_MOD_ALT ? true : false;
#endif
m_userinterface->on_key(Key, Action);
}
void launcher_mode::on_window_resize(const int w, const int h)
{
m_userinterface->on_window_resize(w, h);
}