Lots of UI Component Updates
This commit is contained in:
8
src/dawn/visualnovel/CMakeLists.txt
Normal file
8
src/dawn/visualnovel/CMakeLists.txt
Normal 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)
|
10
src/dawn/visualnovel/ui/CMakeLists.txt
Normal file
10
src/dawn/visualnovel/ui/CMakeLists.txt
Normal 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
|
||||
)
|
21
src/dawn/visualnovel/ui/VisualNovelTextbox.cpp
Normal file
21
src/dawn/visualnovel/ui/VisualNovelTextbox.cpp
Normal 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) {
|
||||
|
||||
}
|
22
src/dawn/visualnovel/ui/VisualNovelTextbox.hpp
Normal file
22
src/dawn/visualnovel/ui/VisualNovelTextbox.hpp
Normal 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;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user