Test back
This commit is contained in:
@ -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);
|
||||||
}
|
}
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user