// 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 "ui/UIBorder.hpp" #include "poker/PokerPlayer.hpp" #include "asset/AssetManager.hpp" #include "asset/assets/TrueTypeAsset.hpp" #include "display/animation/SimpleAnimation.hpp" #include "ui/PokerGameBorder.hpp" namespace Dawn { class PokerPlayerDisplay : public UIEmpty { private: SimpleAnimation animChips; int32_t animChipsValue; protected: PokerPlayer *player = nullptr; UILabel labelName; UILabel labelChips; UIEmpty borderInner; UIBorder border; TrueTypeAsset *font; void onPlayerChipsChanged(); void onSceneUpdate(); public: static std::vector getAssets(AssetManager *assMan) { std::vector assets; assets = PokerGameBorder::getAssets(assMan); assets.push_back(assMan->get("truetype_alice")); return assets; } PokerPlayerDisplay(UICanvas *canvas); void setPlayer(PokerPlayer *player); ~PokerPlayerDisplay(); }; }