openMSX
ImGuiReverseBar.hh
Go to the documentation of this file.
1#ifndef IMGUI_REVERSE_BAR_HH
2#define IMGUI_REVERSE_BAR_HH
3
4#include "ImGuiAdjust.hh"
5#include "ImGuiPart.hh"
6
7#include "GLUtil.hh"
8#include "TclObject.hh"
9
10#include <string>
11
12namespace openmsx {
13
14class ImGuiReverseBar final : public ImGuiPart
15{
16public:
18
19 [[nodiscard]] zstring_view iniName() const override { return "reverse bar"; }
20 void save(ImGuiTextBuffer& buf) override;
21 void loadLine(std::string_view name, zstring_view value) override;
22 void showMenu(MSXMotherBoard* motherBoard) override;
23 void paint(MSXMotherBoard* motherBoard) override;
24
25public:
26 bool showReverseBar = true;
27
28private:
29 std::string saveStateName;
30 std::string saveReplayName;
31 bool saveStateOpen = false;
32 bool saveReplayOpen = false;
33 TclObject confirmCmd;
34 std::string confirmText;
35
36 bool reverseHideTitle = true;
37 bool reverseFadeOut = true;
38 bool reverseAllowMove = false;
39 float reverseAlpha = 1.0f;
40
41 struct PreviewImage {
42 std::string name;
43 gl::Texture texture{gl::Null{}};
44 } previewImage;
45
47
48 static constexpr auto persistentElements = std::tuple{
50 PersistentElement{"hideTitle", &ImGuiReverseBar::reverseHideTitle},
51 PersistentElement{"fadeOut", &ImGuiReverseBar::reverseFadeOut},
52 PersistentElement{"allowMove", &ImGuiReverseBar::reverseAllowMove}
53 };
54};
55
56} // namespace openmsx
57
58#endif
Most basic/generic texture: only contains a texture ID.
Definition GLUtil.hh:39
ImGuiPart(ImGuiManager &manager_)
Definition ImGuiPart.hh:12
void loadLine(std::string_view name, zstring_view value) override
void save(ImGuiTextBuffer &buf) override
void paint(MSXMotherBoard *motherBoard) override
zstring_view iniName() const override
void showMenu(MSXMotherBoard *motherBoard) override
Like std::string_view, but with the extra guarantee that it refers to a zero-terminated string.
This file implemented 3 utility functions:
Definition Autofire.cc:11
PersistentElement(zstring_view, T C::*) -> PersistentElement< C, T >