maintenance: settings item refactoring, include dependencies fixes

This commit is contained in:
tmj-fstate
2018-01-26 16:44:47 +01:00
parent 9d008d2a3e
commit 0124032d3b
92 changed files with 2226 additions and 2233 deletions

40
uitranscripts.h Normal file
View File

@@ -0,0 +1,40 @@
#pragma once
#include <deque>
#include <string>
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:
// 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