mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
more test commands
This commit is contained in:
parent
5b2b89c778
commit
1f11290635
5 changed files with 36 additions and 4 deletions
|
|
@ -78,7 +78,7 @@ void TextBox::drawBackground(const DrawContext* pctx, Assets*) {
|
|||
batch->texture(nullptr);
|
||||
|
||||
auto subctx = pctx->sub();
|
||||
subctx.setScissors(glm::vec4(pos.x, pos.y, size.x, size.y));
|
||||
subctx.setScissors(glm::vec4(pos.x, pos.y-0.5, size.x, size.y+1));
|
||||
|
||||
if (valid) {
|
||||
if (isFocused() && !multiline) {
|
||||
|
|
@ -334,10 +334,10 @@ void TextBox::performEditingKeyboardEvents(keycode key) {
|
|||
if (multiline) {
|
||||
paste(L"\n");
|
||||
} else {
|
||||
defocus();
|
||||
if (validate() && consumer) {
|
||||
consumer(label->getText());
|
||||
}
|
||||
defocus();
|
||||
}
|
||||
} else if (key == keycode::TAB) {
|
||||
paste(L" ");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue