mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-30 17:06:27 +01:00
24 lines
No EOL
589 B
Text
24 lines
No EOL
589 B
Text
/// @description init
|
|
if !ready exit;
|
|
|
|
#region destroy
|
|
selector.interactable = interactable;
|
|
if(selector.dropper_active) exit;
|
|
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))
|
|
instance_destroy(self);
|
|
}
|
|
doDrag();
|
|
|
|
if(sFOCUS && WIDGET_CURRENT == noone) {
|
|
if(keyboard_check_pressed(vk_enter)) {
|
|
onApply(gradient);
|
|
instance_destroy();
|
|
}
|
|
|
|
if(keyboard_check_pressed(vk_escape)) {
|
|
onApply(previous_gradient);
|
|
instance_destroy();
|
|
}
|
|
}
|
|
#endregion |