// Copyright (c) 2022 Dominic Masters // // This software is released under the MIT License. // https://opensource.org/licenses/MIT #include "PokerVNScene.hpp" using namespace Dawn; PokerVNScene::PokerVNScene(DawnGame *game) : SimpleVNScene(game) { } std::vector<Asset*> PokerVNScene::getRequiredAssets() { auto assMan = &this->game->assetManager; std::vector<Asset*> assets; vectorAppend(&assets, SimpleVNScene::getRequiredAssets()); vectorAppend(&assets, PokerPlayerDisplay::getAssets(assMan)); return assets; } void PokerVNScene::vnStage() { auto pokerGameItem = this->createSceneItem(); this->pokerGame = pokerGameItem->addComponent<PokerGame>(); this->pokerPlayers = this->getPokerPlayers(); auto it = this->pokerPlayers.begin(); int32_t i = 0; while(it != this->pokerPlayers.end()) { auto player = *it; // auto uiPlayer = canvas->addElement<PokerPlayerDisplay>(); // uiPlayer->setTransform(UI_COMPONENT_ALIGN_START, UI_COMPONENT_ALIGN_START, glm::vec4(i * 220, 0, 220, 200), 0); // uiPlayer->setPlayer(player); ++it; ++i; } }