mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Panels scrolling, scissors test fix
This commit is contained in:
parent
e6c9a38f0c
commit
be807535f5
10 changed files with 97 additions and 15 deletions
|
|
@ -59,12 +59,14 @@ void Label::size(vec2 sizenew) {
|
|||
// ================================= Button ===================================
|
||||
Button::Button(shared_ptr<UINode> content, glm::vec4 padding) : Panel(vec2(32,32), padding, 0) {
|
||||
add(content);
|
||||
scrollable(false);
|
||||
}
|
||||
|
||||
Button::Button(wstring text, glm::vec4 padding) : Panel(vec2(32,32), padding, 0) {
|
||||
Label* label = new Label(text);
|
||||
label->align(Align::center);
|
||||
add(shared_ptr<UINode>(label));
|
||||
scrollable(false);
|
||||
}
|
||||
|
||||
void Button::drawBackground(Batch2D* batch, Assets* assets) {
|
||||
|
|
@ -117,6 +119,7 @@ void TextBox::drawBackground(Batch2D* batch, Assets* assets) {
|
|||
label->color(vec4(1.0f));
|
||||
label->text(input);
|
||||
}
|
||||
scrollable(false);
|
||||
}
|
||||
|
||||
void TextBox::typed(unsigned int codepoint) {
|
||||
|
|
@ -163,6 +166,7 @@ InputBindBox::InputBindBox(Binding& binding, vec4 padding)
|
|||
binding(binding) {
|
||||
label = new Label(L"");
|
||||
add(label);
|
||||
scrollable(false);
|
||||
}
|
||||
|
||||
shared_ptr<UINode> InputBindBox::getAt(vec2 pos, shared_ptr<UINode> self) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue