mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 14:29:20 +02:00
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.
58 lines
1.2 KiB
C++
58 lines
1.2 KiB
C++
module;
|
|
#include <array>
|
|
#include <chrono>
|
|
#include <cstddef>
|
|
#include <limits>
|
|
#include <mutex>
|
|
#include <ostream>
|
|
#include <sstream>
|
|
#include <type_traits>
|
|
#include <unordered_map>
|
|
#include <utility>
|
|
#include <vector>
|
|
#include <deque>
|
|
#include <string>
|
|
|
|
export module eu07.application.uitranscripts;
|
|
|
|
export {
|
|
|
|
|
|
|
|
namespace ui {
|
|
|
|
// klasa obsługująca linijkę napisu do dźwięku
|
|
struct TTranscript {
|
|
|
|
float fShow; // czas pokazania
|
|
float fHide; // czas ukrycia/usunięcia
|
|
std::string asText; // tekst gotowy do wyświetlenia (usunięte znaczniki czasu)
|
|
bool bItalic; // czy kursywa (dźwięk nieistotny dla prowadzącego)
|
|
};
|
|
|
|
// klasa obsługująca napisy do dźwięków
|
|
class TTranscripts {
|
|
|
|
public:
|
|
// constructors
|
|
TTranscripts() = default;
|
|
// methods
|
|
void AddLine( std::string const &txt, float show, float hide, bool it );
|
|
// dodanie tekstów, długość dźwięku, czy istotne
|
|
void Add( std::string const &txt, bool background = false );
|
|
// usuwanie niepotrzebnych (ok. 10 razy na sekundę)
|
|
void Update();
|
|
// members
|
|
std::deque<TTranscript> aLines;
|
|
|
|
private:
|
|
// members
|
|
float fRefreshTime { 360 }; // wartośc zaporowa
|
|
|
|
};
|
|
|
|
extern TTranscripts Transcripts;
|
|
|
|
} // namespace ui
|
|
} // export
|