Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
TradePartnerSelectionPlayback.hpp
Go to the documentation of this file.
1#pragma once
2#include "TradeUI.hpp"
4#include <string>
5#include <functional>
6namespace monopoly::fonts { class Runtime; }
7namespace monopoly::tradeui
8{
9 // Missing UDTrade player chooser consumer. Selection remains owned by TradeUI.
11 {
12 public:
13 using TokenImageProvider = std::function<std::shared_ptr<const data::LegacyBitmapRGBA8>(std::uint8_t)>;
15 [[nodiscard]] std::expected<void,std::string> sync(const State& state,
18 [[nodiscard]] std::expected<void,std::string> reset(engine::SequencePlayback& playback);
19 [[nodiscard]] data::DataId surface() const noexcept { return surface_; }
20 [[nodiscard]] bool visible() const noexcept { return visible_; }
21 private:
23 bool visible_{};
24 std::string key_;
25 std::shared_ptr<const data::ResourceSnapshot> resources_;
26 data::BitmapRuntimeCache bitmaps_;
27 TokenImageProvider tokenImages_;
28 };
29}
fonts::Runtime & font
unsigned state
unsigned index
std::expected< void, std::string > sync(const State &state, const rules::GameState &game, display::Screen2D view, fonts::Runtime *font, engine::SequencePlayback &playback, bool modernPresentation=false)
std::expected< void, std::string > reset(engine::SequencePlayback &playback)
std::function< std::shared_ptr< const data::LegacyBitmapRGBA8 >(std::uint8_t)> TokenImageProvider
std::uint32_t DataId
Definition DataBanks.hpp:10
constexpr DataId EmptyDataId
Definition DataBanks.hpp:13