more test commands
This commit is contained in:
@@ -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" ");
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user