mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-27 20:37:11 +00:00
lua: Add "bounds" parameter to Dialog:show() function
This commit is contained in:
parent
568aadbfc8
commit
6c7f1ff05b
@ -179,6 +179,17 @@ int Dialog_show(lua_State* L)
|
||||
if (type == LUA_TBOOLEAN)
|
||||
wait = lua_toboolean(L, -1);
|
||||
lua_pop(L, 1);
|
||||
|
||||
type = lua_getfield(L, 2, "bounds");
|
||||
if (type != LUA_TNONE &&
|
||||
type != LUA_TNIL) {
|
||||
const auto rc = convert_args_into_rect(L, -1);
|
||||
if (!rc.isEmpty()) {
|
||||
dlg->window.remapWindow();
|
||||
dlg->window.setBounds(rc);
|
||||
}
|
||||
}
|
||||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
if (wait)
|
||||
|
Loading…
x
Reference in New Issue
Block a user