Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
OptionsSaveRuntime.hpp File Reference
#include "OptionsUI.hpp"
#include "RuleTypes.hpp"
#include "UIMessages.hpp"
#include <array>
#include <cstddef>
#include <cstdint>
#include <expected>
#include <filesystem>
#include <memory>
#include <optional>
#include <span>
#include <string>
#include <vector>
Include dependency graph for OptionsSaveRuntime.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  monopoly::optionsui::SaveMetadata
 
struct  monopoly::optionsui::SaveSlot
 
struct  monopoly::optionsui::SaveRuntimeState
 
struct  monopoly::optionsui::SaveDialogInput
 

Namespaces

namespace  monopoly
 
namespace  monopoly::data
 
namespace  monopoly::fonts
 
namespace  monopoly::optionsui
 

Enumerations

enum class  monopoly::optionsui::FileDialogMode : std::uint8_t { monopoly::optionsui::None , monopoly::optionsui::Load , monopoly::optionsui::Save }
 

Functions

std::filesystem::path monopoly::optionsui::saveGameDirectory ()
 
std::filesystem::path monopoly::optionsui::gameBlobPath (std::size_t slot)
 
std::filesystem::path monopoly::optionsui::gameMetadataPath (std::size_t slot)
 
std::expected< void, std::string > monopoly::optionsui::refreshSaveSlots (SaveRuntimeState &state, FileDialogMode mode)
 
void monopoly::optionsui::closeSaveDialog (SaveRuntimeState &state) noexcept
 
SaveDialogInput monopoly::optionsui::processSaveDialogInput (SaveRuntimeState &state, const uimsg::Message &message, fonts::Runtime *fontRuntime, std::shared_ptr< const data::ResourceSnapshot > resources)
 
std::expected< std::vector< std::uint8_t >, std::string > monopoly::optionsui::readSelectedGameBlob (const SaveRuntimeState &state)
 
std::expected< void, std::string > monopoly::optionsui::beginPendingSave (SaveRuntimeState &state, const rules::GameState &ruleState, int city, int system, std::string customBoardName, rules::PlayerNumber requester)
 
void monopoly::optionsui::clearPendingSave (SaveRuntimeState &state) noexcept
 
std::expected< void, std::string > monopoly::optionsui::persistPendingSave (SaveRuntimeState &state, std::span< const std::uint8_t > gameBlob)
 
std::expected< void, std::string > monopoly::optionsui::applySelectedMetadata (const SaveRuntimeState &state, rules::GameState &ruleState, int &city, int &system)
 
Rect monopoly::optionsui::saveSlotRect (std::size_t slot) noexcept
 
Rect monopoly::optionsui::dialogOkayRect (int width, int height) noexcept
 
Rect monopoly::optionsui::dialogCancelRect (int width, int height) noexcept
 

Variables

constexpr std::size_t monopoly::optionsui::SaveSlotCount = 5