Just breaking stuff
This commit is contained in:
25
archive/dawnpokergame/prefabs/ui/UIBorderPrefab.hpp
Normal file
25
archive/dawnpokergame/prefabs/ui/UIBorderPrefab.hpp
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2023 Dominic Masters
|
||||
//
|
||||
// This software is released under the MIT License.
|
||||
// https://opensource.org/licenses/MIT
|
||||
|
||||
#pragma once
|
||||
#include "prefab/UIPrefab.hpp"
|
||||
#include "ui/UIBorder.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class UIBorderPrefab : public UIPrefab<UIBorder, UIBorderPrefab> {
|
||||
public:
|
||||
static std::vector<Asset*> prefabAssets(AssetManager *man) {
|
||||
std::vector<Asset*> assets;
|
||||
assets.push_back(man->get<TextureAsset>("texture_test"));
|
||||
return assets;
|
||||
}
|
||||
|
||||
static void prefabApply(AssetManager *man, UIBorder *border) {
|
||||
auto text = man->get<TextureAsset>("texture_test");
|
||||
border->texture = &text->texture;
|
||||
border->setBorderSize(glm::vec2(4, 4));
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user