OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
chapterscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <Tempest/Widget>
4#include <Tempest/Texture2d>
5#include <Tempest/Timer>
6
7class ChapterScreen : public Tempest::Widget {
8 public:
10
11 struct Show {
12 std::string title;
13 std::string subtitle;
14 std::string img;
15 std::string sound;
16 int time=0;
17 };
18
19 void show(const Show& image);
20 bool isActive() const { return active; }
21
22 void keyDownEvent(Tempest::KeyEvent &e);
23 void keyUpEvent (Tempest::KeyEvent &e);
24
25 protected:
26 void paintEvent(Tempest::PaintEvent& e);
27
28 private:
29 const Tempest::Texture2d* back=nullptr;
30 bool active=false;
31 Tempest::Timer timer;
32
33 std::string title, subTitle;
34
35 void close();
36 };
void keyUpEvent(Tempest::KeyEvent &e)
void keyDownEvent(Tempest::KeyEvent &e)
void show(const Show &image)
bool isActive() const
void paintEvent(Tempest::PaintEvent &e)