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 MIN_UI_HELP_DIALOG_HXX
19#define MIN_UI_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 R77HelpDialog : public Dialog
31{
32 public:
33 R77HelpDialog(OSystem& osystem, DialogContainer& parent, const GUI::Font& font);
34 virtual ~R77HelpDialog() = 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 formatWidget(const string& label, StaticTextWidget* widget);
41 void loadConfig() override;
42
43 private:
44 static constexpr uInt32 LINES_PER_PAGE = 11;
45 ButtonWidget* myNextButton;
46 ButtonWidget* myPrevButton;
47
48 StaticTextWidget* myTitle;
49 StaticTextWidget* myJoy[LINES_PER_PAGE];
50 StaticTextWidget* myBtn[LINES_PER_PAGE];
51 StaticTextWidget* myDesc[LINES_PER_PAGE];
52 string myJoyStr[LINES_PER_PAGE];
53 string myBtnStr[LINES_PER_PAGE];
54 string myDescStr[LINES_PER_PAGE];
55
56 uInt8 myPage;
57 uInt8 myNumPages;
58
59 private:
60 // Following constructors and assignment operators not supported
61 R77HelpDialog() = delete;
62 R77HelpDialog(const R77HelpDialog&) = delete;
63 R77HelpDialog(R77HelpDialog&&) = delete;
64 R77HelpDialog& operator=(const R77HelpDialog&) = delete;
65 R77HelpDialog& operator=(R77HelpDialog&&) = delete;
66};
67
68#endif
69