Lots of UI Component Updates

This commit is contained in:
2022-10-27 08:16:55 -07:00
parent 57b3354d4c
commit 942de96e16
25 changed files with 387 additions and 56 deletions

View File

@ -0,0 +1,8 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Subdirs
add_subdirectory(ui)

View File

@ -0,0 +1,10 @@
# Copyright (c) 2022 Dominic Masters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Sources
target_sources(${DAWN_TARGET_NAME}
PRIVATE
VisualNovelTextbox.cpp
)

View File

@ -0,0 +1,21 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "VisualNovelTextbox.hpp"
using namespace Dawn;
VisualNovelTextbox::VisualNovelTextbox(UICanvas &canvas) :
UIComponent(canvas),
border(canvas),
label(canvas)
{
this->addChild(&this->border);
this->addChild(&this->label);
}
void VisualNovelTextbox::drawSelf(UIShader &shader, glm::mat4 self) {
}

View File

@ -0,0 +1,22 @@
// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "ui/UISprite.hpp"
#include "ui/UIBorder.hpp"
#include "ui/UILabel.hpp"
namespace Dawn {
class VisualNovelTextbox : public UIComponent {
private:
UIBorder border;
UILabel label;
glm::vec2 labelPadding = glm::vec2(0, 0);
public:
VisualNovelTextbox(UICanvas &canvas);
void drawSelf(UIShader &shader, glm::mat4 selfTransform) override;
};
}