more test commands

This commit is contained in:
MihailRis
2024-05-13 21:28:55 +03:00
parent 5b2b89c778
commit 1f11290635
5 changed files with 36 additions and 4 deletions
+2 -2
View File
@@ -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" ");
+3
View File
@@ -64,6 +64,9 @@ int l_set_block(lua_State* L) {
if (id < 0 || size_t(id) >= scripting::indices->countBlockDefs()) {
return 0;
}
if (!scripting::level->chunks->get(x, y, z)) {
return 0;
}
scripting::level->chunks->set(x, y, z, id, states);
scripting::level->lighting->onBlockSet(x,y,z, id);
if (!noupdate)