EventThread: Add 'recenter' parameter to window resize request

If true, centers the window on the current screen with the
new size.
This commit is contained in:
Amaryllis Kulla 2021-11-05 17:49:16 +01:00
parent d09fec941b
commit a92adee7f8
3 changed files with 37 additions and 7 deletions

View file

@ -201,9 +201,10 @@ RB_METHOD(graphicsResizeWindow)
RB_UNUSED_PARAM;
int width, height;
rb_get_args(argc, argv, "ii", &width, &height RB_ARG_END);
bool recenter = false;
rb_get_args(argc, argv, "ii|b", &width, &height, &recenter RB_ARG_END);
shState->eThread().requestWindowResize(width, height);
shState->eThread().requestWindowResize(width, height, recenter);
return Qnil;
}