Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
OptionsSavePlayback.hpp
Go to the documentation of this file.
1#pragma once
2
5
6#include <array>
7#include <cstdint>
8#include <expected>
9#include <optional>
10#include <string>
11
12namespace monopoly::fonts
13{
14 class Runtime;
15}
16
17namespace monopoly::optionsui
18{
20 {
21 public:
22 [[nodiscard]] std::expected<void, std::string> sync(
27
28 void reset() noexcept;
29 private:
30 [[nodiscard]] std::expected<void, std::string> ensureTextSurfaces(
33 [[nodiscard]] std::expected<void, std::string> refreshTextSurfaces(
37 [[nodiscard]] std::expected<void, std::string> show(
41 [[nodiscard]] std::expected<void, std::string> hide(
43 [[nodiscard]] std::expected<void, std::string> refreshSelection(
46
47 bool visible_{};
49 int selectedSlot_{-1};
50 std::uint64_t revision_{};
51 std::optional<data::DataId> title_;
52 std::array<data::DataId, SaveSlotCount> slotBackgrounds_{};
53 std::array<std::optional<data::DataId>, SaveSlotCount> slotText_{};
54 std::optional<data::DataId> okayText_;
55 std::optional<data::DataId> cancelText_;
56 };
57}
unsigned state
unsigned index
std::expected< void, std::string > sync(const SaveRuntimeState &state, display::Screen2D desiredView, fonts::Runtime *fontRuntime, engine::SequencePlayback &playback)
constexpr std::size_t SaveSlotCount