1//============================================================================
2//
3// SSSS tt lll lll
4// SS SS tt ll ll
5// SS tttttt eeee ll ll aaaa
6// SSSS tt ee ee ll ll aa
7// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8// SS SS tt ee ll ll aa aa
9// SSSS ttt eeeee llll llll aaaaa
10//
11// Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
12// and the Stella Team
13//
14// See the file "License.txt" for information on usage and redistribution of
15// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16//============================================================================
17
18#ifndef HELP_DIALOG_HXX
19#define HELP_DIALOG_HXX
20
21class DialogContainer;
22class CommandSender;
23class ButtonWidget;
24class StaticTextWidget;
25class OSystem;
26
27#include "Dialog.hxx"
28#include "bspf.hxx"
29
30class HelpDialog : public Dialog
31{
32 public:
33 HelpDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
34 virtual ~HelpDialog() = default;
35
36 private:
37 void handleCommand(CommandSender* sender, int cmd, int data, int id) override;
38 void updateStrings(uInt8 page, uInt8 lines, string& title);
39 void displayInfo();
40 void loadConfig() override { displayInfo(); }
41
42 private:
43 static constexpr uInt32 LINES_PER_PAGE = 10;
44 ButtonWidget* myNextButton;
45 ButtonWidget* myPrevButton;
46
47 StaticTextWidget* myTitle;
48 StaticTextWidget* myKey[LINES_PER_PAGE];
49 StaticTextWidget* myDesc[LINES_PER_PAGE];
50 string myKeyStr[LINES_PER_PAGE];
51 string myDescStr[LINES_PER_PAGE];
52
53 uInt8 myPage;
54 uInt8 myNumPages;
55
56 private:
57 // Following constructors and assignment operators not supported
58 HelpDialog() = delete;
59 HelpDialog(const HelpDialog&) = delete;
60 HelpDialog(HelpDialog&&) = delete;
61 HelpDialog& operator=(const HelpDialog&) = delete;
62 HelpDialog& operator=(HelpDialog&&) = delete;
63};
64
65#endif
66