// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #pragma once #include "ui/UIBorder.hpp" #include "asset/assets/TextureAsset.hpp" #include "game/DawnGame.hpp" namespace Dawn { class PokerGameBorder { public: static std::vector<Asset*> getAssets(AssetManager *man) { return std::vector<Asset*>{ man->get<TextureAsset>("texture_test") }; } static void apply(UIBorder *border) { auto text = border->getGame()->assetManager.get<TextureAsset>("texture_test"); border->texture = &text->texture; border->setBorderSize(glm::vec2(16, 16)); } static UIBorder * create(UICanvas *canvas) { auto border = canvas->addElement<UIBorder>(); PokerGameBorder::apply(border); return border; } }; }