OXYGENHUB
◆ main openmsx / src / imgui / ImGuiTrainer.hh
779 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef IMGUI_TRAINER_HH
2
#define IMGUI_TRAINER_HH
3
4
#include "ImGuiPart.hh"
5
6
#include "TclObject.hh"
7
8
#include <optional>
9
10
namespace openmsx {
11
12
class ImGuiTrainer final : public ImGuiPart
13
{
14
public:
15
	using ImGuiPart::ImGuiPart;
16
17
	[[nodiscard]] zstring_view iniName() const override { return "trainer"; }
18
	void save(ImGuiTextBuffer& buf) override;
19
	void loadLine(std::string_view name, zstring_view value) override;
20
	void paint(MSXMotherBoard* motherBoard) override;
21
22
public:
23
	bool show = false;
24
25
private:
26
	std::optional<TclObject> trainers;
27
	std::vector<std::string> gameNames; // calculated from 'trainers'
28
	std::string filterString;
29
30
	static constexpr auto persistentElements = std::tuple{
31
		PersistentElement{"show", &ImGuiTrainer::show},
32
	};
33
};
34
35
} // namespace openmsx
36
37
#endif