Files
maszyna/launcher/launchermode.cpp
jakubg1 5e2175302b Loading screen overhaul POC
The loading screen has been significantly changed:
- The background image is now properly picked randomly instead of taking the `textures/logo.bmp` file, prepended by an external program such as Rainsted/Starter.
- The progress bar has been moved from a floating window to a thin green line at the bottom of the loading screen.
- The log window is now hidden by default. It can be turned on by setting `loadinglog` to `true` in `eu07.ini`.
- There is an animated wheel icon on the loading screen, and a trivia text is displayed.

New translation key:
- `"Did you know"`

TODO:
- Load trivia from a separate file.
2025-09-10 01:53:22 +02:00

44 lines
779 B
C++

#include "stdafx.h"
#include "launcher/launchermode.h"
#include "launcher/launcheruilayer.h"
#include "application.h"
#include "simulation.h"
#include "Globals.h"
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)
{
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);
}