Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::ibar::ModernIBarSkin Class Referencefinal

#include <ModernIBarSkin.hpp>

Classes

struct  DeedDescriptor
 
struct  DeedFill
 
struct  DeedText
 
struct  DrawCardDescriptor
 
struct  IdleCardPresentation
 
struct  PropertyDescriptor
 

Public Types

enum class  DeedArtwork { Railroad , Electric , Water }
 
using TextRasterizer = std::function< std::expected< data::LegacyBitmapRGBA8, std::string >(std::string_view)>
 
using TokenImageProvider = std::function< std::shared_ptr< const data::LegacyBitmapRGBA8 >(std::uint8_t token)>
 
using DescriptorProvider = std::function< std::optional< PropertyDescriptor >(unsigned)>
 
using DeedPlacementProvider = std::function< std::optional< std::array< float, 4 > >(data::DataId, std::uint16_t priority, const sequence::Matrix2D &rasterToWorld)>
 
using DeedTextRasterizer = std::function< std::expected< data::LegacyBitmapRGBA8, std::string >(std::string_view, int, bool, bool)>
 
using IdleCardPresentationProvider = std::function< std::optional< IdleCardPresentation >(data::DataId, std::uint16_t, const sequence::Matrix2D &sequenceToWorld)>
 
using LayoutProvider = std::function< layout::ActionButtonLayout()>
 

Public Member Functions

 ModernIBarSkin (data::LanguageId language, TextRasterizer text)
 
void configureTokenImages (TokenImageProvider provider)
 
void configurePropertyDescriptors (DescriptorProvider provider, TextRasterizer text)
 
void configureDeedPlacementProvider (DeedPlacementProvider provider)
 
void configureDeedDescriptors (std::map< data::DataId, DeedDescriptor > descriptors, DeedTextRasterizer rasterizer)
 
void configureIdleCardPresentation (IdleCardPresentationProvider provider)
 
bool supportsIdleCardPresentation (data::DataId root) const noexcept
 
void configureDrawCardDescriptors (std::map< data::DataId, DrawCardDescriptor > descriptors, DeedTextRasterizer rasterizer)
 
void configurePresentationContext (std::function< bool()> predicate)
 
void configureActionText (TextRasterizer rasterizer)
 
void configureLayoutProvider (LayoutProvider provider)
 
bool supports (data::DataId root) const noexcept
 
bool supportsAuctionToken (data::DataId root) const noexcept
 
bool supportsCardFaceIn (data::DataId root) const noexcept
 
std::shared_ptr< const data::BitmapRuntimeAsset > substitute (data::DataId root, std::shared_ptr< const data::BitmapRuntimeAsset > original, bool principal=true, std::optional< sequence::Matrix2D > rasterToWorld={}, std::optional< std::uint16_t > priority={}, std::optional< sequence::Matrix2D > sequenceToWorld={})
 

Detailed Description

Definition at line 17 of file ModernIBarSkin.hpp.

Member Typedef Documentation

◆ DeedPlacementProvider

Definition at line 54 of file ModernIBarSkin.hpp.

◆ DeedTextRasterizer

using monopoly::ibar::ModernIBarSkin::DeedTextRasterizer = std::function<std::expected<data::LegacyBitmapRGBA8,std::string>( std::string_view, int, bool, bool)>

Definition at line 58 of file ModernIBarSkin.hpp.

◆ DescriptorProvider

Definition at line 33 of file ModernIBarSkin.hpp.

◆ IdleCardPresentationProvider

◆ LayoutProvider

◆ TextRasterizer

using monopoly::ibar::ModernIBarSkin::TextRasterizer = std::function<std::expected<data::LegacyBitmapRGBA8, std::string>(std::string_view)>

Definition at line 20 of file ModernIBarSkin.hpp.

◆ TokenImageProvider

Definition at line 24 of file ModernIBarSkin.hpp.

Member Enumeration Documentation

◆ DeedArtwork

Enumerator
Railroad 
Electric 
Water 

Definition at line 46 of file ModernIBarSkin.hpp.

Constructor & Destructor Documentation

◆ ModernIBarSkin()

monopoly::ibar::ModernIBarSkin::ModernIBarSkin ( data::LanguageId  language,
TextRasterizer  text 
)
inline

Definition at line 22 of file ModernIBarSkin.hpp.

Member Function Documentation

◆ configureActionText()

void monopoly::ibar::ModernIBarSkin::configureActionText ( TextRasterizer  rasterizer)
inline

Definition at line 88 of file ModernIBarSkin.hpp.

◆ configureDeedDescriptors()

void monopoly::ibar::ModernIBarSkin::configureDeedDescriptors ( std::map< data::DataId, DeedDescriptor >  descriptors,
DeedTextRasterizer  rasterizer 
)
inline

Definition at line 62 of file ModernIBarSkin.hpp.

◆ configureDeedPlacementProvider()

void monopoly::ibar::ModernIBarSkin::configureDeedPlacementProvider ( DeedPlacementProvider  provider)
inline

Definition at line 56 of file ModernIBarSkin.hpp.

◆ configureDrawCardDescriptors()

void monopoly::ibar::ModernIBarSkin::configureDrawCardDescriptors ( std::map< data::DataId, DrawCardDescriptor >  descriptors,
DeedTextRasterizer  rasterizer 
)
inline

Definition at line 80 of file ModernIBarSkin.hpp.

◆ configureIdleCardPresentation()

void monopoly::ibar::ModernIBarSkin::configureIdleCardPresentation ( IdleCardPresentationProvider  provider)
inline

Definition at line 77 of file ModernIBarSkin.hpp.

◆ configureLayoutProvider()

void monopoly::ibar::ModernIBarSkin::configureLayoutProvider ( LayoutProvider  provider)
inline

Definition at line 91 of file ModernIBarSkin.hpp.

◆ configurePresentationContext()

void monopoly::ibar::ModernIBarSkin::configurePresentationContext ( std::function< bool()>  predicate)
inline

Definition at line 85 of file ModernIBarSkin.hpp.

◆ configurePropertyDescriptors()

void monopoly::ibar::ModernIBarSkin::configurePropertyDescriptors ( DescriptorProvider  provider,
TextRasterizer  text 
)
inline

Definition at line 36 of file ModernIBarSkin.hpp.

◆ configureTokenImages()

void monopoly::ibar::ModernIBarSkin::configureTokenImages ( TokenImageProvider  provider)
inline

Definition at line 25 of file ModernIBarSkin.hpp.

◆ substitute()

std::shared_ptr< const data::BitmapRuntimeAsset > monopoly::ibar::ModernIBarSkin::substitute ( data::DataId  root,
std::shared_ptr< const data::BitmapRuntimeAsset >  original,
bool  principal = true,
std::optional< sequence::Matrix2D >  rasterToWorld = {},
std::optional< std::uint16_t >  priority = {},
std::optional< sequence::Matrix2D >  sequenceToWorld = {} 
)

Definition at line 1357 of file ModernIBarSkin.cpp.

◆ supports()

bool monopoly::ibar::ModernIBarSkin::supports ( data::DataId  root) const
noexcept

Definition at line 1336 of file ModernIBarSkin.cpp.

◆ supportsAuctionToken()

bool monopoly::ibar::ModernIBarSkin::supportsAuctionToken ( data::DataId  root) const
noexcept

Definition at line 1331 of file ModernIBarSkin.cpp.

◆ supportsCardFaceIn()

bool monopoly::ibar::ModernIBarSkin::supportsCardFaceIn ( data::DataId  root) const
noexcept

Definition at line 1325 of file ModernIBarSkin.cpp.

◆ supportsIdleCardPresentation()

bool monopoly::ibar::ModernIBarSkin::supportsIdleCardPresentation ( data::DataId  root) const
noexcept

Definition at line 1351 of file ModernIBarSkin.cpp.


The documentation for this class was generated from the following files: