Removed UI and restored debugGrid
This commit is contained in:
4
.github/workflows/build-helloworld-vita.yml
vendored
4
.github/workflows/build-helloworld-vita.yml
vendored
@ -5,9 +5,6 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
VITASDK: /usr/local/vitasdk
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -26,6 +23,7 @@ jobs:
|
||||
|
||||
- name: Build Game
|
||||
run: |
|
||||
export VITASDK=/usr/local/vitasdk
|
||||
export PATH=$VITASDK/bin:$PATH
|
||||
mkdir build
|
||||
cd build
|
||||
|
@ -28,7 +28,7 @@ void Scene::update() {
|
||||
this->itemsNotInitialized.clear();
|
||||
|
||||
#if DAWN_DEBUG_BUILD
|
||||
// this->debugGrid();
|
||||
this->debugGrid();
|
||||
this->debugOrigin();
|
||||
this->debugHitboxes();
|
||||
#endif
|
||||
|
@ -6,56 +6,23 @@
|
||||
#pragma once
|
||||
#include "scene/Scene.hpp"
|
||||
#include "prefabs/SimpleSpinningCubePrefab.hpp"
|
||||
#include "scene/components/ui/UILabel.hpp"
|
||||
#include "scene/components/ui/UIImage.hpp"
|
||||
#include "display/font/BitmapFont.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class HelloWorldScene : public Scene {
|
||||
protected:
|
||||
Camera *camera;
|
||||
SimpleSpinningCubePrefab *cube;
|
||||
UICanvas *canvas;
|
||||
UILabel *label;
|
||||
UIImage *image;
|
||||
BitmapFont font;
|
||||
|
||||
void stage() override {
|
||||
camera = Camera::create(this);
|
||||
camera->transform->lookAt(glm::vec3(0, 0, 8), glm::vec3(0, 0, 0));
|
||||
|
||||
camera->transform->lookAt(glm::vec3(3, 3, 3), glm::vec3(0, 0, 0));
|
||||
cube = SimpleSpinningCubePrefab::create(this);
|
||||
|
||||
canvas = UICanvas::create(this);
|
||||
|
||||
auto imageItem = this->createSceneItem();
|
||||
image = imageItem->addComponent<UIImage>();
|
||||
image->color = COLOR_BLACK;
|
||||
imageItem->transform.setParent(canvas->transform);
|
||||
|
||||
auto labelItem = this->createSceneItem();
|
||||
label = labelItem->addComponent<UILabel>();
|
||||
labelItem->transform.setParent(canvas->transform);
|
||||
|
||||
auto assMan = &this->game->assetManager;
|
||||
auto texture = assMan->get<TextureAsset>("testbitmap_texture");
|
||||
auto tileset = assMan->get<TilesetAsset>("testbitmap_tileset");
|
||||
this->font.texture = &texture->texture;
|
||||
this->font.tileset = &tileset->tileset;
|
||||
|
||||
label->text = "Hello World, how are you today? I hope you are doing well. I really like the fact I can ramble in my text for once.";
|
||||
label->font = &font;
|
||||
label->maxWidth = 220;
|
||||
|
||||
image->alignment = glm::vec4(0, 0, label->getContentWidth(), label->getContentHeight());
|
||||
}
|
||||
|
||||
std::vector<Asset*> getRequiredAssets() override {
|
||||
auto assMan = &this->game->assetManager;
|
||||
std::vector<Asset*> assets;
|
||||
vectorAppend(&assets, SimpleSpinningCubePrefab::getRequiredAssets(assMan));
|
||||
assets.push_back(assMan->get<TextureAsset>("testbitmap_texture"));
|
||||
assets.push_back(assMan->get<TilesetAsset>("testbitmap_tileset"));
|
||||
return assets;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user