VN System improved.
This commit is contained in:
@ -5,10 +5,28 @@
|
||||
|
||||
#pragma once
|
||||
#include "visualnovel/ui/VisualNovelTextbox.hpp"
|
||||
#include "asset/assets/TextureAsset.hpp"
|
||||
#include "asset/assets/TrueTypeAsset.hpp"
|
||||
|
||||
namespace Dawn {
|
||||
class PokerGameTextbox {
|
||||
public:
|
||||
static std::shared_ptr<VisualNovelTextbox> makeTextbox();
|
||||
static VisualNovelTextbox * create(UICanvas *canvas) {
|
||||
auto textbox = canvas->addElement<VisualNovelTextbox>();
|
||||
|
||||
auto assetFont = canvas->getGame()->assetManager.load<TrueTypeAsset>("truetype_ark");
|
||||
auto assetTexture = canvas->getGame()->assetManager.load<TextureAsset>("texture_test");
|
||||
|
||||
textbox->setBorder(&assetTexture->texture, glm::vec2(16, 16));
|
||||
textbox->setFont(&assetFont->font);
|
||||
textbox->setFontSize(40);
|
||||
textbox->setLabelPadding(glm::vec2(10, 8));
|
||||
textbox->setTransform(
|
||||
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_END,
|
||||
glm::vec4(0, 238, 0, 0),
|
||||
0.0f
|
||||
);
|
||||
return textbox;
|
||||
}
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user