Test back

This commit is contained in:
2023-06-18 13:46:15 -07:00
parent de7504a4b4
commit 0917851287
2 changed files with 8 additions and 6 deletions

View File

@ -10,6 +10,6 @@
using namespace Dawn; using namespace Dawn;
Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) { Scene * Dawn::dawnGameGetInitialScene(DawnGame *game) {
// return new HelloWorldScene(game); return new HelloWorldScene(game);
return new Scene1Prologue(game); // return new Scene1Prologue(game);
} }

View File

@ -25,16 +25,18 @@ namespace Dawn {
auto canvasItem = this->createSceneItem(); auto canvasItem = this->createSceneItem();
auto canvas = canvasItem->addComponent<UICanvas>(); auto canvas = canvasItem->addComponent<UICanvas>();
canvas->camera = camera; canvas->camera = camera;
auto vnTextbox = VNTextbox::prefabCreate(this); auto textboxItem = this->createSceneItem();
vnTextbox->transform.setParent(canvas->transform); auto textbox = textboxItem->addComponent<UIRichTextLabel>();
textbox->richText = "<font font=\"font_main\">Hello World</font>";
textbox->transform->setParent(canvas->transform);
} }
std::vector<Asset*> getRequiredAssets() override { std::vector<Asset*> getRequiredAssets() override {
auto assMan = &this->game->assetManager; auto assMan = &this->game->assetManager;
std::vector<Asset*> assets; std::vector<Asset*> assets;
vectorAppend(&assets, SimpleSpinningCubePrefab::getRequiredAssets(assMan)); vectorAppend(&assets, SimpleSpinningCubePrefab::getRequiredAssets(assMan));
vectorAppend(&assets, VNTextbox::prefabAssets(assMan)); assets.push_back(assMan->get<TrueTypeAsset>("font_main"));
return assets; return assets;
} }