Pixel-Composer/objects/o_dialog_gradient/Step_1.gml

24 lines
589 B
Plaintext
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description init
if !ready exit;
#region destroy
2023-02-28 09:43:01 +01:00
selector.interactable = interactable;
2022-11-18 03:20:31 +01:00
if(selector.dropper_active) exit;
2022-12-10 05:06:01 +01:00
if(sHOVER && !point_in_rectangle(mouse_mx, mouse_my, dialog_x, dialog_y, dialog_x + dialog_w, dialog_y + dialog_h)) {
if(destroy_on_click_out && mouse_press(mb_left))
2022-11-18 03:20:31 +01:00
instance_destroy(self);
2022-01-13 05:24:03 +01:00
}
2022-11-18 03:20:31 +01:00
doDrag();
2023-12-31 14:09:49 +01:00
if(sFOCUS && WIDGET_CURRENT == noone) {
2023-12-31 14:09:49 +01:00
if(keyboard_check_pressed(vk_enter)) {
onApply(gradient);
instance_destroy();
}
if(keyboard_check_pressed(vk_escape)) {
onApply(previous_gradient);
instance_destroy();
}
}
2022-01-13 05:24:03 +01:00
#endregion