Pixel-Composer/objects/o_dialog_exit/Create_0.gml

30 lines
679 B
Text
Raw Normal View History

2022-09-27 06:37:28 +02:00
/// @description init
event_inherited();
#region data
2023-07-06 19:49:16 +02:00
project = PROJECT;
2023-11-22 10:21:50 +01:00
2023-07-06 19:49:16 +02:00
dialog_w = ui(440);
2022-11-03 11:44:49 +01:00
dialog_h = ui(140);
2024-09-12 05:08:48 +02:00
function resetPosition() {
if(!active) return;
dialog_x = xstart - dialog_w / 2;
dialog_y = ystart - dialog_h / 2;
dialog_x = round(clamp(dialog_x, 2, WIN_SW - dialog_w - 2));
dialog_y = round(clamp(dialog_y, 2, WIN_SH - dialog_h - 2));
if(PREFERENCES.multi_window) {
var _wx = WIN_X + dialog_x;
var _wy = WIN_Y + dialog_y;
var _cfg = winwin_config_ext("Exit", winwin_kind_borderless, false, false);
window = winwin_create_ext(_wx, _wy, dialog_w, dialog_h, _cfg);
dialog_x = 0;
dialog_y = 0;
}
}
2022-09-27 06:37:28 +02:00
#endregion