Improved the standardization of UI

This commit is contained in:
2022-12-08 23:00:33 -08:00
parent eb6c4c8076
commit a2ee1e139d
8 changed files with 85 additions and 36 deletions

View File

@ -142,12 +142,6 @@ void VisualNovelTextbox::drawSelf(UIShader *shader, glm::mat4 self) {
}
void VisualNovelTextbox::setBorder(Texture *texture, glm::vec2 dimensions) {
this->border.texture = texture;
this->border.setBorderSize(dimensions);
this->updatePositions();
}
void VisualNovelTextbox::setFont(Font *font) {
this->label.setFont(font);
this->label.updateMesh();

View File

@ -19,8 +19,6 @@ namespace Dawn {
int32_t lineCurrent = 0;
glm::vec2 labelPadding = glm::vec2(0, 0);
UIEmpty selfParent;
UIBorder border;
UILabel label;
float_t timeCharacter = 0.0f;
bool_t visible = false;
@ -41,6 +39,9 @@ namespace Dawn {
int32_t getCountOfVisibleLines();
public:
UIBorder border;
UILabel label;
Event<> eventCharacterRevealed;
Event<> eventCurrentCharactersRevealed;
Event<> eventNewPage;
@ -66,14 +67,6 @@ namespace Dawn {
*/
void setFont(Font *font);
/**
* Sets the border information for this textbox.
*
* @param texture Texture to use for the border.
* @param dimensions Dimensions of the border.
*/
void setBorder(Texture *texture, glm::vec2 dimensions);
/**
* Sets the string (label) for this textbox.
*