// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "ui/UILabel.hpp" #include "ui/UIEmpty.hpp" #include "poker/PokerPlayer.hpp" #include "asset/AssetManager.hpp" #include "asset/assets/TrueTypeAsset.hpp" #include "display/animation/Animation.hpp" namespace Dawn { class PokerPlayerDisplay : public UIEmpty { private: Animation animChips; int32_t animChipsValue; protected: PokerPlayer *player = nullptr; UILabel labelName; UILabel labelChips; TrueTypeAsset *font; void onPlayerChipsChanged(); void onSceneUpdate(); public: static std::vector getAssets(AssetManager *assMan) { return std::vector{ assMan->get("truetype_ark") }; } PokerPlayerDisplay(UICanvas *canvas); void setPlayer(PokerPlayer *player); ~PokerPlayerDisplay(); }; }