Just breaking stuff

This commit is contained in:
2023-03-14 22:27:46 -07:00
parent 795e69237c
commit 09cb20271b
156 changed files with 4218 additions and 4389 deletions

View File

@ -0,0 +1,32 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "prefab/SceneItemPrefab.hpp"
#include "scene/components/ui/UILabel.hpp"
namespace Dawn {
class SimpleLabel : public SceneItemPrefab<SimpleLabel> {
public:
static std::vector<Asset*> prefabAssets(AssetManager *ass) {
return { ass->get<TrueTypeAsset>("truetype_bizudp") };
}
//
UILabel *label;
SimpleLabel(Scene *s, sceneitemid_t i) :
SceneItemPrefab<SimpleLabel>(s, i)
{
}
void prefabInit(AssetManager *man) override {
auto font = man->get<TrueTypeAsset>("truetype_bizudp");
label = this->addComponent<UILabel>();
label->font = &font->font;
}
};
}