pen scroll

This commit is contained in:
Tanasart 2024-07-28 18:55:57 +07:00
parent 121d3cd76b
commit e1a5d54b8a
57 changed files with 342 additions and 171 deletions

View file

@ -337,6 +337,8 @@ event_inherited();
var _hov = false; var _hov = false;
if(sHOVER && catagory_pane.hover && point_in_rectangle(_m[0], _m[1], 0, _y + hh, ww, _y + hh + hg - 1)) { if(sHOVER && catagory_pane.hover && point_in_rectangle(_m[0], _m[1], 0, _y + hh, ww, _y + hh + hg - 1)) {
catagory_pane.hover_content = true;
BLEND_OVERRIDE BLEND_OVERRIDE
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y + hh, ww, hg, CDEF.main_white, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y + hh, ww, hg, CDEF.main_white, 1);
BLEND_NORMAL BLEND_NORMAL
@ -522,6 +524,8 @@ event_inherited();
} }
if(_hoverContent && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) { if(_hoverContent && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
content_pane.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 0, _boxx, yy, grid_size, grid_size, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, _boxx, yy, grid_size, grid_size, COLORS._main_accent, 1);
if(mouse_release(mb_left, sFOCUS)) if(mouse_release(mb_left, sFOCUS))
buildNode(_node); buildNode(_node);
@ -531,6 +535,8 @@ event_inherited();
if(_node.getTooltip() != "" || _node.tooltip_spr != noone) { if(_node.getTooltip() != "" || _node.tooltip_spr != noone) {
if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) { if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) {
content_pane.hover_content = true;
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0); draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0);
node_tooltip = _node; node_tooltip = _node;
node_tooltip_x = content_pane.x + _nx; node_tooltip_x = content_pane.x + _nx;
@ -644,6 +650,8 @@ event_inherited();
} }
if(_hoverContent && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) { if(_hoverContent && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
content_pane.hover_content = true;
if(_node.getTooltip() != "" || _node.tooltip_spr != noone) { if(_node.getTooltip() != "" || _node.tooltip_spr != noone) {
node_tooltip = _node; node_tooltip = _node;
node_tooltip_x = content_pane.x + ui(16); node_tooltip_x = content_pane.x + ui(16);
@ -894,6 +902,7 @@ event_inherited();
} }
if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_size, yy + grid_size)) { if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_size, yy + grid_size)) {
search_pane.hover_content = true;
node_selecting = i; node_selecting = i;
if(mouse_release(mb_left, sFOCUS)) if(mouse_release(mb_left, sFOCUS))
buildNode(_node, _param); buildNode(_node, _param);
@ -910,6 +919,8 @@ event_inherited();
if(struct_has(_node, "tooltip") && (_node.getTooltip() != "" || _node.tooltip_spr != noone)) { if(struct_has(_node, "tooltip") && (_node.getTooltip() != "" || _node.tooltip_spr != noone)) {
if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) { if(point_in_rectangle(_m[0], _m[1], _boxx, yy, _boxx + ui(16), yy + ui(16))) {
search_pane.hover_content = true;
draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0); draw_sprite_ui_uniform(THEME.info, 0, _boxx + ui(8), yy + ui(8), 0.7, COLORS._main_icon, 1.0);
node_tooltip = _node; node_tooltip = _node;
node_tooltip_x = search_pane.x + _nx; node_tooltip_x = search_pane.x + _nx;
@ -1024,6 +1035,8 @@ event_inherited();
} }
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) { if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
search_pane.hover_content = true;
if(struct_has(_node, "tooltip") && (_node.getTooltip() != "" || _node.tooltip_spr != noone)) { if(struct_has(_node, "tooltip") && (_node.getTooltip() != "" || _node.tooltip_spr != noone)) {
node_tooltip = _node; node_tooltip = _node;
node_tooltip_x = search_pane.x + 0; node_tooltip_x = search_pane.x + 0;

View file

@ -31,8 +31,10 @@ event_inherited();
var ind = 0; var ind = 0;
if(sHOVER && sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly + 1, _dw, _ly + hght - 1)) if(sHOVER && sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly + 1, _dw, _ly + hght - 1)) {
selecting = i; selecting = i;
sc_content.hover_content = true;
}
if(selecting == i) { if(selecting == i) {
draw_sprite_stretched_ext(THEME.textbox, 3, 0, _ly, _dw, hght, COLORS.dialog_menubox_highlight, 1); draw_sprite_stretched_ext(THEME.textbox, 3, 0, _ly, _dw, hght, COLORS.dialog_menubox_highlight, 1);

View file

@ -2,10 +2,10 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_arrayBox", "%Name":"o_dialog_arrayBox",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":2,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":2,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_arrayBox", "name":"o_dialog_arrayBox",

View file

@ -70,6 +70,8 @@ event_inherited();
_y += hg; _y += hg;
} }
folderPane.hover_content = true;
return hh + 8; return hh + 8;
}); });
folderPane.always_scroll = true; folderPane.always_scroll = true;
@ -127,6 +129,7 @@ event_inherited();
} }
if(sHOVER && contentPane.hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + grid_size, yy + grid_size)) { if(sHOVER && contentPane.hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + grid_size, yy + grid_size)) {
contentPane.hover_content = true;
TOOLTIP = [ spr, "sprite" ]; TOOLTIP = [ spr, "sprite" ];
draw_sprite_stretched_ext(THEME.node_active, 0, xx, yy, grid_size, grid_size, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, xx, yy, grid_size, grid_size, COLORS._main_accent, 1);

View file

@ -2,9 +2,9 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_assetbox", "%Name":"o_dialog_assetbox",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_assetbox", "name":"o_dialog_assetbox",

View file

@ -65,7 +65,10 @@ event_inherited();
var isHover = _hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + _height); var isHover = _hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + _height);
draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), _height); draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), _height);
if(isHover) draw_sprite_stretched_ext(THEME.ui_panel_fg, 1, ui(4), yy, sp_preset_w - ui(16), _height, COLORS._main_accent, 1); if(isHover) {
draw_sprite_stretched_ext(THEME.ui_panel_fg, 1, ui(4), yy, sp_preset_w - ui(16), _height, COLORS._main_accent, 1);
sp_presets.hover_content = true;
}
var x0 = ui(16) + (i == -1) * ui(8 + 6); var x0 = ui(16) + (i == -1) * ui(8 + 6);
var cc = i == preset_selecting? COLORS._main_accent : COLORS._main_text_sub; var cc = i == preset_selecting? COLORS._main_accent : COLORS._main_text_sub;

View file

@ -2,10 +2,10 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_color_selector", "%Name":"o_dialog_color_selector",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_color_selector", "name":"o_dialog_color_selector",

View file

@ -20,6 +20,8 @@ event_inherited();
var _h = array_length(data) * hght; var _h = array_length(data) * hght;
var _dw = sc_content.surface_w; var _dw = sc_content.surface_w;
sc_content.hover_content = true;
for(var i = 0; i < array_length(data); i++) { for(var i = 0; i < array_length(data); i++) {
var _ly = _y + i * hght; var _ly = _y + i * hght;
var fullpath = data[i]; var fullpath = data[i];

View file

@ -101,8 +101,10 @@ event_inherited();
var isHover = point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + hg); var isHover = point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + hg);
draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), hg); draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), hg);
if(_hover && isHover) if(_hover && isHover) {
sp_presets.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_preset_w - ui(16), hg, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_preset_w - ui(16), hg, COLORS._main_accent, 1);
}
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
draw_text(ui(16), yy + ui(8), _gradient.name); draw_text(ui(16), yy + ui(8), _gradient.name);
@ -177,8 +179,10 @@ event_inherited();
var isHover = _hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_palette_w - ui(16), yy + _height); var isHover = _hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_palette_w - ui(16), yy + _height);
draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_palette_w - ui(16), _height); draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_palette_w - ui(16), _height);
if(isHover) if(isHover) {
sp_palettes.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_palette_w - ui(16), _height, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_palette_w - ui(16), _height, COLORS._main_accent, 1);
}
var x0 = ui(16) + (i == -1) * ui(8 + 6); var x0 = ui(16) + (i == -1) * ui(8 + 6);
var cc = i == palette_selecting? COLORS._main_accent : COLORS._main_text_sub; var cc = i == palette_selecting? COLORS._main_accent : COLORS._main_text_sub;

View file

@ -2,10 +2,10 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_gradient", "%Name":"o_dialog_gradient",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_gradient", "name":"o_dialog_gradient",

View file

@ -55,6 +55,7 @@ event_inherited();
if(dragging == noone) { if(dragging == noone) {
var aa = 0.5; var aa = 0.5;
if(sHOVER && point_in_rectangle(_m[0], _m[1], 0 + padd, _y + padd, hg - padd, _y + hg - padd)) { if(sHOVER && point_in_rectangle(_m[0], _m[1], 0 + padd, _y + padd, hg - padd, _y + hg - padd)) {
sc_group.hover_content = true;
aa = 1; aa = 1;
if(mouse_press(mb_left, sFOCUS)) dragging = display_list[i]; if(mouse_press(mb_left, sFOCUS)) dragging = display_list[i];
} }
@ -102,6 +103,7 @@ event_inherited();
} }
if(dragging != noone) { if(dragging != noone) {
sc_group.hover_content = true;
array_remove(display_list, dragging); array_remove(display_list, dragging);
array_insert(display_list, hovr, dragging); array_insert(display_list, hovr, dragging);

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_group_input_order", "%Name":"o_dialog_group_input_order",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_group_input_order", "name":"o_dialog_group_input_order",

View file

@ -40,6 +40,7 @@ event_inherited();
if(dragging == noone) { if(dragging == noone) {
var aa = 0.5; var aa = 0.5;
if(sHOVER && point_in_rectangle(_m[0], _m[1], 0 + padd, _y + padd, hg - padd, _y + hg - padd)) { if(sHOVER && point_in_rectangle(_m[0], _m[1], 0 + padd, _y + padd, hg - padd, _y + hg - padd)) {
sc_group.hover_content = true;
aa = 1; aa = 1;
if(mouse_press(mb_left, sFOCUS)) dragging = display_list[i]; if(mouse_press(mb_left, sFOCUS)) dragging = display_list[i];
} }
@ -64,6 +65,7 @@ event_inherited();
} }
if(dragging != noone) { if(dragging != noone) {
sc_group.hover_content = true;
array_remove(display_list, dragging); array_remove(display_list, dragging);
array_insert(display_list, hovr, dragging); array_insert(display_list, hovr, dragging);

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_group_output_order", "%Name":"o_dialog_group_output_order",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_group_output_order", "name":"o_dialog_group_output_order",

View file

@ -60,6 +60,7 @@ event_inherited();
draw_sprite_stretched_add(THEME.ui_panel_fg, 0, xx, yy, ww, hh, c_white, 0.3); draw_sprite_stretched_add(THEME.ui_panel_fg, 0, xx, yy, ww, hh, c_white, 0.3);
if(sHOVER && sp_content.hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + hh)) { if(sHOVER && sp_content.hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + hh)) {
sp_content.hover_content = true;
inb_hover = index; inb_hover = index;
if(dragging == -1 || dragging == index) if(dragging == -1 || dragging == index)
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, xx, yy, ww, hh, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.ui_panel_active, 0, xx, yy, ww, hh, COLORS._main_accent, 1);

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_image_array_edit", "%Name":"o_dialog_image_array_edit",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_image_array_edit", "name":"o_dialog_image_array_edit",

View file

@ -53,14 +53,14 @@ event_inherited();
BLEND_OVERRIDE; BLEND_OVERRIDE;
if(sp_note.hover && point_in_rectangle(_m[0], _m[1], 0, yy, sp_note.surface_w, yy + hh)) { if(sp_note.hover && point_in_rectangle(_m[0], _m[1], 0, yy, sp_note.surface_w, yy + hh)) {
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yy, sp_note.hover_content = true;
sp_note.surface_w, hh, COLORS.dialog_lua_ref_bg_hover, 1);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yy, sp_note.surface_w, hh, COLORS.dialog_lua_ref_bg_hover, 1);
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))
is_open[i] = !array_get(is_open, i); is_open[i] = !array_get(is_open, i);
} else } else
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yy, draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yy, sp_note.surface_w, hh, COLORS.dialog_lua_ref_bg, 1);
sp_note.surface_w, hh, COLORS.dialog_lua_ref_bg, 1);
BLEND_NORMAL; BLEND_NORMAL;
draw_sprite_ui(THEME.arrow, is_open[i]? 3 : 0, ui(16), yy + pad + line_get_height() / 2,,,, COLORS._main_icon); draw_sprite_ui(THEME.arrow, is_open[i]? 3 : 0, ui(16), yy + pad + line_get_height() / 2,,,, COLORS._main_icon);

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_lua_reference", "%Name":"o_dialog_lua_reference",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_lua_reference", "name":"o_dialog_lua_reference",

View file

@ -25,6 +25,7 @@ event_inherited();
var _yy = _y + hh * i; var _yy = _y + hh * i;
if(sHOVER && sc_outputs.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_outputs.w, _yy + hh - 1)) { if(sHOVER && sc_outputs.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_outputs.w, _yy + hh - 1)) {
sc_outputs.hover_content = true;
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_sprite_stretched(THEME.node_bg, 0, ui(2), _yy + ui(2), ui(32 - 4), hh - ui(4)); draw_sprite_stretched(THEME.node_bg, 0, ui(2), _yy + ui(2), ui(32 - 4), hh - ui(4));
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_output_visibility", "%Name":"o_dialog_output_visibility",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_output_visibility", "name":"o_dialog_output_visibility",

View file

@ -78,8 +78,10 @@ event_inherited();
} : PALETTES[i]; } : PALETTES[i];
var isHover = sHOVER && sp_presets.hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + hg); var isHover = sHOVER && sp_presets.hover && point_in_rectangle(_m[0], _m[1], ui(4), yy, ui(4) + sp_preset_w - ui(16), yy + hg);
draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), hg); draw_sprite_stretched(THEME.ui_panel_bg, 3, ui(4), yy, sp_preset_w - ui(16), hg);
if(isHover) if(isHover) {
sp_presets.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_preset_w - ui(16), hg, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 1, ui(4), yy, sp_preset_w - ui(16), hg, COLORS._main_accent, 1);
}
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
draw_text(ui(16), yy + ui(8), pal.name); draw_text(ui(16), yy + ui(8), pal.name);

View file

@ -2,10 +2,10 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_palette", "%Name":"o_dialog_palette",
"eventList":[ "eventList":[
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_palette", "name":"o_dialog_palette",

View file

@ -51,6 +51,7 @@ event_inherited();
else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner); else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner);
if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hg)) { if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hg)) {
sp_page.hover_content = true;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yl, ww, hg, CDEF.main_white, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yl, ww, hg, CDEF.main_white, 1);
if(i != page_current && mouse_click(mb_left, sFOCUS)) { if(i != page_current && mouse_click(mb_left, sFOCUS)) {
@ -70,6 +71,7 @@ event_inherited();
draw_set_text(f_p1, fa_left, fa_center, section_current == sect[0]? COLORS._main_text : COLORS._main_text_sub); draw_set_text(f_p1, fa_left, fa_center, section_current == sect[0]? COLORS._main_text : COLORS._main_text_sub);
if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hs - 1)) { if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hs - 1)) {
sp_page.hover_content = true;
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))
sect[1].scroll_y_to = -sect[2]; sect[1].scroll_y_to = -sect[2];
@ -579,6 +581,7 @@ event_inherited();
var b = buttonInstant(THEME.button_def, cx, yy + cp, cw, ch, _m, sFOCUS, sHOVER && sp_colors.hover); var b = buttonInstant(THEME.button_def, cx, yy + cp, cw, ch, _m, sFOCUS, sHOVER && sp_colors.hover);
draw_sprite_stretched_ext(THEME.palette_mask, 1, cx + ui(2), yy + ui(2), cw - ui(4), ch - ui(4), val, 1); draw_sprite_stretched_ext(THEME.palette_mask, 1, cx + ui(2), yy + ui(2), cw - ui(4), ch - ui(4), val, 1);
if(b) sp_colors.hover_content = true;
if(b == 2) { if(b == 2) {
var dialog = dialogCall(o_dialog_color_selector, WIN_W / 2, WIN_H / 2); var dialog = dialogCall(o_dialog_color_selector, WIN_W / 2, WIN_H / 2);
dialog.setDefault(val); dialog.setDefault(val);
@ -683,7 +686,8 @@ event_inherited();
var params = new widgetParam(widget_x, widget_y, widget_w, widget_h, val, {}, _m, sp_hotkey.x, sp_hotkey.y); var params = new widgetParam(widget_x, widget_y, widget_w, widget_h, val, {}, _m, sp_hotkey.x, sp_hotkey.y);
var _th = _pref[2].drawParam(params) ?? 0; var _th = _pref[2].drawParam(params) ?? 0;
if(_pref[2].inBBOX(_m)) sp_hotkey.hover_content = true;
hh += _th + padd + ui(8); hh += _th + padd + ui(8);
} }
@ -744,7 +748,10 @@ event_inherited();
} else { } else {
var bx = key_x1 - ui(40) - kw; var bx = key_x1 - ui(40) - kw;
var by = _yy; var by = _yy;
if(buttonInstant(THEME.button_hide, bx, by, kw + ui(32), th, _m, sFOCUS, sHOVER && sp_hotkey.hover) == 2) { var b = buttonInstant(THEME.button_hide, bx, by, kw + ui(32), th, _m, sFOCUS, sHOVER && sp_hotkey.hover)
if(b) sp_hotkey.hover_content = true;
if(b == 2) {
hk_editing = key; hk_editing = key;
keyboard_lastchar = pkey; keyboard_lastchar = pkey;
} }
@ -760,7 +767,9 @@ event_inherited();
modified = true; modified = true;
var bx = x1 - ui(32); var bx = x1 - ui(32);
var by = _yy; var by = _yy;
if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16) == 2) { var b = buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16);
if(b) sp_hotkey.hover_content = true;
if(b == 2) {
key.key = dkey; key.key = dkey;
key.modi = dmod; key.modi = dmod;
@ -819,7 +828,10 @@ event_inherited();
} else { } else {
var bx = key_x1 - ui(40) - kw; var bx = key_x1 - ui(40) - kw;
var by = _yy; var by = _yy;
if(buttonInstant(THEME.button_hide, bx, by, kw + ui(32), th, _m, sFOCUS, sHOVER && sp_hotkey.hover) == 2) { var b = buttonInstant(THEME.button_hide, bx, by, kw + ui(32), th, _m, sFOCUS, sHOVER && sp_hotkey.hover)
if(b) sp_hotkey.hover_content = true;
if(b == 2) {
hk_editing = key; hk_editing = key;
keyboard_lastchar = key.key; keyboard_lastchar = key.key;
} }
@ -835,8 +847,10 @@ event_inherited();
modified = true; modified = true;
var bx = x1 - ui(32); var bx = x1 - ui(32);
var by = _yy; var by = _yy;
var b = buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16)
if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, sFOCUS, sHOVER && sp_hotkey.hover, __txt("Reset"), THEME.refresh_16) == 2) { if(b) sp_hotkey.hover_content = true;
if(b == 2) {
key.key = key.dKey; key.key = key.dKey;
key.modi = key.dModi; key.modi = key.dModi;
@ -1000,6 +1014,7 @@ event_inherited();
if(instanceof(_pref.editWidget) == "checkBox") params.halign = fa_center; if(instanceof(_pref.editWidget) == "checkBox") params.halign = fa_center;
var th = _pref.editWidget.drawParam(params) ?? 0; var th = _pref.editWidget.drawParam(params) ?? 0;
if(_pref.editWidget.inBBOX(_m)) sp_pref.hover_content = true;
if(_pref.getDefault != noone) { if(_pref.getDefault != noone) {
var _defVal = is_method(_pref.getDefault)? _pref.getDefault() : _pref.getDefault; var _defVal = is_method(_pref.getDefault)? _pref.getDefault() : _pref.getDefault;

View file

@ -3,8 +3,8 @@
"%Name":"o_dialog_preference", "%Name":"o_dialog_preference",
"eventList":[ "eventList":[
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_preference", "name":"o_dialog_preference",

View file

@ -43,6 +43,7 @@ event_inherited();
var _yy = _y + (hh + ui(4)) * i; var _yy = _y + (hh + ui(4)) * i;
if(sHOVER && sc_presets.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_presets.w, _yy + hh)) { if(sHOVER && sc_presets.hover && point_in_rectangle(_m[0], _m[1], 0, _yy, sc_presets.w, _yy + hh)) {
sc_presets.hover_content = true;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _yy, sc_presets.w - ui(12), hh, COLORS._main_icon, 0.85); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _yy, sc_presets.w - ui(12), hh, COLORS._main_icon, 0.85);
if(mouse_click(mb_left, sFOCUS)) { if(mouse_click(mb_left, sFOCUS)) {

View file

@ -99,6 +99,7 @@ event_inherited();
if(clickable) { if(clickable) {
if(sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly, _dw, _ly + hght - 1)) { if(sc_content.hover && point_in_rectangle(_m[0], _m[1], 0, _ly, _dw, _ly + hght - 1)) {
sc_content.hover_content = true;
selecting = i; selecting = i;
hovering = data[i]; hovering = data[i];

View file

@ -171,6 +171,7 @@ event_inherited();
if(clickable) { if(clickable) {
if(sc_content.hover && point_in_rectangle(_m[0], _m[1], _lx, _ly, _lx + _dw, _ly + hght - 1)) { if(sc_content.hover && point_in_rectangle(_m[0], _m[1], _lx, _ly, _lx + _dw, _ly + hght - 1)) {
sc_content.hover_content = true;
_hov = true; _hov = true;
selecting = i; selecting = i;
hovering = data[i]; hovering = data[i];

View file

@ -81,6 +81,7 @@ event_inherited();
} }
if(sHOVER && sp_recent.hover && point_in_rectangle(_m[0], _m[1], fx, _y, fx + ww, _y + hg)) { if(sHOVER && sp_recent.hover && point_in_rectangle(_m[0], _m[1], fx, _y, fx + ww, _y + hg)) {
sp_recent.hover_content = true;
TOOLTIP = [ _dat.getThumbnail(), VALUE_TYPE.surface ]; TOOLTIP = [ _dat.getThumbnail(), VALUE_TYPE.surface ];
draw_sprite_stretched_ext(THEME.node_active, 0, fx, _y, ww, hg, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, fx, _y, ww, hg, COLORS._main_accent, 1);
@ -154,9 +155,13 @@ event_inherited();
draw_sprite_stretched_ext(THEME.group_label, _hov, mtx, mty, mtw, mth, _sel? c_white : COLORS._main_icon, 1); draw_sprite_stretched_ext(THEME.group_label, _hov, mtx, mty, mtw, mth, _sel? c_white : COLORS._main_icon, 1);
BLEND_NORMAL BLEND_NORMAL
if(_hov && mouse_press(mb_left)) { if(_hov) {
if(_sel) array_remove(meta_filter, tg); sp_sample.hover_content = true;
else array_push(meta_filter, tg);
if(mouse_press(mb_left)) {
if(_sel) array_remove(meta_filter, tg);
else array_push(meta_filter, tg);
}
} }
draw_text(mtx + ui(8), mty + mth / 2, tg); draw_text(mtx + ui(8), mty + mth / 2, tg);
@ -228,6 +233,8 @@ event_inherited();
if(yy > -grid_heigh && yy < sp_sample.surface_h) { if(yy > -grid_heigh && yy < sp_sample.surface_h) {
draw_sprite_stretched(THEME.node_bg, 0, _boxx, yy, grid_width, grid_heigh); draw_sprite_stretched(THEME.node_bg, 0, _boxx, yy, grid_width, grid_heigh);
if(sHOVER && sp_sample.hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_heigh)) { if(sHOVER && sp_sample.hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_heigh)) {
sp_sample.hover_content = true;
var _meta = _project.getMetadata(); var _meta = _project.getMetadata();
if(txt == "Workshop") if(txt == "Workshop")
TOOLTIP = _meta; TOOLTIP = _meta;
@ -338,9 +345,13 @@ event_inherited();
var _coll = array_exists(PREFERENCES.welcome_file_closed, lb.text); var _coll = array_exists(PREFERENCES.welcome_file_closed, lb.text);
draw_sprite_ui(THEME.arrow, _coll? 0 : 3, pd + ui(16), _yy + ui(12), 1, 1, 0, CDEF.main_ltgrey, 1); draw_sprite_ui(THEME.arrow, _coll? 0 : 3, pd + ui(16), _yy + ui(12), 1, 1, 0, CDEF.main_ltgrey, 1);
if(_hov && mouse_press(mb_left)) { if(_hov) {
if(_coll) array_remove(PREFERENCES.welcome_file_closed, lb.text); sp_sample.hover_content = true;
else array_push(PREFERENCES.welcome_file_closed, lb.text);
if(mouse_press(mb_left)) {
if(_coll) array_remove(PREFERENCES.welcome_file_closed, lb.text);
else array_push(PREFERENCES.welcome_file_closed, lb.text);
}
} }
draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey); draw_set_text(f_p2, fa_left, fa_center, CDEF.main_ltgrey);
@ -400,6 +411,7 @@ event_inherited();
spr_h *= ss; spr_h *= ss;
if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], bx - spr_w / 2, _y + sy, bx + spr_w / 2, _y + sy + spr_h)) { if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], bx - spr_w / 2, _y + sy, bx + spr_w / 2, _y + sy + spr_h)) {
sp_contest.hover_content = true;
TOOLTIP = "Go to Pixel Composer Discord server"; TOOLTIP = "Go to Pixel Composer Discord server";
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))
@ -451,6 +463,7 @@ event_inherited();
} }
if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], tx, ty, tx + grid_width, ty + grid_heigh)) { if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], tx, ty, tx + grid_width, ty + grid_heigh)) {
sp_contest.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 0, tx, ty, grid_width, grid_heigh, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, tx, ty, grid_width, grid_heigh, COLORS._main_accent, 1);
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))
@ -630,6 +643,7 @@ event_inherited();
draw_text_add(sp_contest.surface_w - ui(44), ui(8 + 28), __txt("Submissions")); draw_text_add(sp_contest.surface_w - ui(44), ui(8 + 28), __txt("Submissions"));
if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], ui(20 - 16), ui(36 - 16), ui(20 + 16), ui(36 + 16))) { if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], ui(20 - 16), ui(36 - 16), ui(20 + 16), ui(36 + 16))) {
sp_contest.hover_content = true;
draw_sprite_ui(THEME.arrow_back_32, 0, ui(20), ui(36),,,, c_white); draw_sprite_ui(THEME.arrow_back_32, 0, ui(20), ui(36),,,, c_white);
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))
contest_viewing = noone; contest_viewing = noone;
@ -640,6 +654,7 @@ event_inherited();
var by = ui(36); var by = ui(36);
if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], bx - ui(16), by - ui(16), bx + ui(16), by + ui(16))) { if(sHOVER && sp_contest.hover && point_in_rectangle(_m[0], _m[1], bx - ui(16), by - ui(16), bx + ui(16), by + ui(16))) {
sp_contest.hover_content = true;
TOOLTIP = __txtx("contest_open_discord", "Open in Discord"); TOOLTIP = __txtx("contest_open_discord", "Open in Discord");
draw_sprite_ui(THEME.discord, 0, bx, by,,,, c_white); draw_sprite_ui(THEME.discord, 0, bx, by,,,, c_white);

View file

@ -16,11 +16,10 @@ draw_sprite_stretched_ext(THEME.textbox, 3, x, y + h, w, _h_bot, COLORS._main_i
//draw_sprite_stretched_ext(THEME.textbox, 3, x, y, w, h, c_white, 0.9); //draw_sprite_stretched_ext(THEME.textbox, 3, x, y, w, h, c_white, 0.9);
draw_sprite_stretched_ext(THEME.textbox, 1, x, _y, w, _h, c_white, 1.0); draw_sprite_stretched_ext(THEME.textbox, 1, x, _y, w, _h, c_white, 1.0);
var _mulp = 1; var _mulp = text.slide_int? 10 : 1;
if(key_mod_press(CTRL) && !text.slide_snap) _mulp *= 10; if(key_mod_press(CTRL) && !text.slide_snap) _mulp *= 10;
if(key_mod_press(ALT)) _mulp /= 10; if(key_mod_press(ALT)) _mulp /= 10;
if(anim == 0) { if(anim == 0) {
draw_set_text(f_p4, fa_center, fa_bottom, text.slider_mulp == 1? COLORS._main_text_accent : COLORS._main_icon); draw_set_text(f_p4, fa_center, fa_bottom, text.slider_mulp == 1? COLORS._main_text_accent : COLORS._main_icon);
draw_text(x + w / 2, y, string(10 * _mulp)); draw_text(x + w / 2, y, string(10 * _mulp));

View file

@ -27,19 +27,19 @@ function colorSelector(onApply = noone) constructor {
if(!interactable) return; if(!interactable) return;
hue = clamp(_val, 0, 255); hue = clamp(_val, 0, 255);
setHSV(); setHSV();
}); }).setSlideType(1);
tb_sat = slider(0, 255, 1, function(_val) { tb_sat = slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
sat = clamp(_val, 0, 255); sat = clamp(_val, 0, 255);
setHSV(); setHSV();
}); }).setSlideType(1);
tb_val= slider(0, 255, 1, function(_val) { tb_val= slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
val = clamp(_val, 0, 255); val = clamp(_val, 0, 255);
setHSV(); setHSV();
}); }).setSlideType(1);
tb_red = slider(0, 255, 1, function(_val) { tb_red = slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
@ -50,7 +50,7 @@ function colorSelector(onApply = noone) constructor {
current_color = make_color_rgba(r, g, b, a); current_color = make_color_rgba(r, g, b, a);
resetHSV(); resetHSV();
}); }).setSlideType(1);
tb_green = slider(0, 255, 1, function(_val) { tb_green = slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
@ -61,7 +61,7 @@ function colorSelector(onApply = noone) constructor {
current_color = make_color_rgba(r, g, b, a); current_color = make_color_rgba(r, g, b, a);
resetHSV(); resetHSV();
}); }).setSlideType(1);
tb_blue = slider(0, 255, 1, function(_val) { tb_blue = slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
@ -72,7 +72,7 @@ function colorSelector(onApply = noone) constructor {
current_color = make_color_rgba(r, g, b, a); current_color = make_color_rgba(r, g, b, a);
resetHSV(); resetHSV();
}); }).setSlideType(1);
tb_alpha = slider(0, 255, 1, function(_val) { tb_alpha = slider(0, 255, 1, function(_val) {
if(!interactable) return; if(!interactable) return;
@ -80,7 +80,7 @@ function colorSelector(onApply = noone) constructor {
current_color = _cola(current_color, alp); current_color = _cola(current_color, alp);
resetHSV(); resetHSV();
}); }).setSlideType(1);
tb_hue.hdw = ui(16); tb_hue.hdw = ui(16);
tb_sat.hdw = ui(16); tb_sat.hdw = ui(16);

View file

@ -108,8 +108,6 @@ function curveBox(_onModify) : widget() constructor {
curve_surface = surface_verify(curve_surface, cw, ch); curve_surface = surface_verify(curve_surface, cw, ch);
if(node_dragging != -1) { #region editing if(node_dragging != -1) { #region editing
if(parent) parent.pen_scroll_lock = true;
show_coord = true; show_coord = true;
_data = array_clone(_data); _data = array_clone(_data);

View file

@ -38,7 +38,7 @@
LATEST_VERSION = 11700; LATEST_VERSION = 11700;
VERSION = 11780; VERSION = 11780;
SAVE_VERSION = 11700; SAVE_VERSION = 11700;
VERSION_STRING = "1.17.9.001"; VERSION_STRING = "1.17.9.004";
BUILD_NUMBER = 11780; BUILD_NUMBER = 11780;
globalvar HOTKEYS, HOTKEY_CONTEXT; globalvar HOTKEYS, HOTKEY_CONTEXT;

View file

@ -11,6 +11,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry
var hh = 0; var hh = 0;
var lb_h = line_get_height(f_p0) + ui(8); var lb_h = line_get_height(f_p0) + ui(8);
var padd = ui(8); var padd = ui(8);
var chov = false;
var _node = PROJECT.globalNode; var _node = PROJECT.globalNode;
@ -55,8 +56,9 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry
var bx = wd_x + ui(10); var bx = wd_x + ui(10);
var by = yy + ui(16); var by = yy + ui(16);
if(hover && point_in_rectangle(_m[0], _m[1], bx - ui(12), by - ui(12), bx + ui(12), by + ui(12))) { if(hover && point_in_rectangle(_m[0], _m[1], bx - ui(12), by - ui(12), bx + ui(12), by + ui(12))) {
chov = true;
draw_sprite_stretched_ext(THEME.group_label, 0, bx - ui(12), by - ui(12), ui(24), ui(24), COLORS._main_icon_light, 1); draw_sprite_stretched_ext(THEME.group_label, 0, bx - ui(12), by - ui(12), ui(24), ui(24), COLORS._main_icon_light, 1);
if(mouse_press(mb_left, _foc)) { if(mouse_press(mb_left, _foc)) {
var_drag_disp = j; var_drag_disp = j;
var_dragging = j; var_dragging = j;
@ -115,6 +117,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry
var widg = drawWidget(xx, yy, ww, _m, _node.inputs[| j], true, focus, hover, _scrollPane, rx, ry); var widg = drawWidget(xx, yy, ww, _m, _node.inputs[| j], true, focus, hover, _scrollPane, rx, ry);
var widH = widg[0]; var widH = widg[0];
var mbRight = widg[1]; var mbRight = widg[1];
var widHov = widg[2];
if(hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + widH)) if(hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + ww, yy + widH))
_HOVERING_ELEMENT = _node.inputs[| j]; _HOVERING_ELEMENT = _node.inputs[| j];
@ -124,5 +127,5 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry
} }
} }
return hh; return [ hh, chov ];
} }

View file

@ -25,16 +25,17 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var _name = jun.getName(); var _name = jun.getName();
var wid = jun.editWidget; var wid = jun.editWidget;
var cHov = false;
switch(instanceof(wid)) { #region switch(instanceof(wid)) {
case "textArea" : case "textArea" :
case "controlPointBox" : case "controlPointBox" :
case "transformBox" : case "transformBox" :
breakLine = true; breakLine = true;
} #endregion }
var butx = xx; var butx = xx;
if(jun.connect_type == JUNCTION_CONNECT.input && jun.isAnimable() && !jun.expUse) { #region animation if(jun.connect_type == JUNCTION_CONNECT.input && jun.isAnimable() && !jun.expUse) { // animation
var index = jun.hasJunctionFrom()? 2 : jun.is_anim; var index = jun.hasJunctionFrom()? 2 : jun.is_anim;
var cc = c_white; var cc = c_white;
@ -43,6 +44,8 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
draw_sprite_ui_uniform(THEME.animate_clock, index, butx, lb_y, 1, cc, 0.8); draw_sprite_ui_uniform(THEME.animate_clock, index, butx, lb_y, 1, cc, 0.8);
if(_hover && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) { if(_hover && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
cHov = true;
if(anim_hold != noone) if(anim_hold != noone)
jun.setAnim(anim_hold); jun.setAnim(anim_hold);
@ -59,16 +62,18 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
} }
} }
} }
} #endregion }
if(anim_hold != noone && mouse_release(mb_left)) if(anim_hold != noone && mouse_release(mb_left))
anim_hold = noone; anim_hold = noone;
butx += ui(20); butx += ui(20);
if(!global_var) { #region visibility if(!global_var) { // visibility
index = jun.visible; index = jun.visible;
draw_sprite_ui_uniform(THEME.junc_visible, index, butx, lb_y, 1,, 0.8); draw_sprite_ui_uniform(THEME.junc_visible, index, butx, lb_y, 1,, 0.8);
if(_hover && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) { if(_hover && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
cHov = true;
if(visi_hold != noone && jun.visible != visi_hold) { if(visi_hold != noone && jun.visible != visi_hold) {
jun.visible = visi_hold; jun.visible = visi_hold;
jun.node.refreshNodeDisplay(); jun.node.refreshNodeDisplay();
@ -83,7 +88,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
jun.node.refreshNodeDisplay(); jun.node.refreshNodeDisplay();
} }
} }
#endregion
} else } else
draw_sprite_ui_uniform(THEME.node_use_expression, 0, butx, lb_y, 1,, 0.8); draw_sprite_ui_uniform(THEME.node_use_expression, 0, butx, lb_y, 1,, 0.8);
@ -107,13 +112,13 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var lb_w = ui(40 + 16) + string_width(_name); var lb_w = ui(40 + 16) + string_width(_name);
var lb_x = ui(40) + xx; var lb_x = ui(40) + xx;
if(jun.color != -1) { #region if(jun.color != -1) {
draw_sprite_ext(THEME.timeline_color, 1, lb_x + ui(8), lb_y, 1, 1, 0, jun.color, 1); draw_sprite_ext(THEME.timeline_color, 1, lb_x + ui(8), lb_y, 1, 1, 0, jun.color, 1);
lb_x += ui(24); lb_x += ui(24);
lb_w += ui(24); lb_w += ui(24);
} #endregion }
if(!jun.active) { #region if(!jun.active) {
draw_set_text(_font, fa_left, fa_center, COLORS._main_text_sub_inner); draw_set_text(_font, fa_left, fa_center, COLORS._main_text_sub_inner);
draw_text_add(lb_x, lb_y - ui(2), _name); draw_text_add(lb_x, lb_y - ui(2), _name);
@ -122,14 +127,16 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var ty = lb_y - ui(1); var ty = lb_y - ui(1);
if(point_in_circle(_m[0], _m[1], tx, ty, ui(10))) { if(point_in_circle(_m[0], _m[1], tx, ty, ui(10))) {
cHov = true;
TOOLTIP = jun.active_tooltip; TOOLTIP = jun.active_tooltip;
draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 1); draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 1);
} else } else
draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 0.75); draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 0.75);
} }
return [ 0, true ]; return [ 0, true, cHov ];
} #endregion }
draw_text_over(lb_x, lb_y, _name); draw_text_over(lb_x, lb_y, _name);
@ -139,6 +146,8 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var ty = lb_y - ui(1); var ty = lb_y - ui(1);
if(point_in_circle(_m[0], _m[1], tx, ty, ui(10))) { if(point_in_circle(_m[0], _m[1], tx, ty, ui(10))) {
cHov = true;
if(is_string(jun.tooltip)) if(is_string(jun.tooltip))
TOOLTIP = jun.tooltip; TOOLTIP = jun.tooltip;
else if(mouse_click(mb_left, _focus)) else if(mouse_click(mb_left, _focus))
@ -155,7 +164,10 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
if(jun.connect_type == JUNCTION_CONNECT.input && breakLine && jun.is_anim) { if(jun.connect_type == JUNCTION_CONNECT.input && breakLine && jun.is_anim) {
var bx = xx + ww - ui(12); var bx = xx + ww - ui(12);
var by = lb_y; var by = lb_y;
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, "", THEME.prop_keyframe, 2) == 2) { var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, "", THEME.prop_keyframe, 2)
if(b) cHov = true;
if(b == 2) {
for(var j = 0; j < ds_list_size(jun.animator.values); j++) { for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j]; var _key = jun.animator.values[| j];
if(_key.time > CURRENT_FRAME) { if(_key.time > CURRENT_FRAME) {
@ -175,9 +187,12 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
break; break;
} }
} }
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, kfFocus? __txtx("panel_inspector_remove_key", "Remove keyframe") : var _tlp = kfFocus? __txtx("panel_inspector_remove_key", "Remove keyframe") : __txtx("panel_inspector_add_key", "Add keyframe");
__txtx("panel_inspector_add_key", "Add keyframe"), THEME.prop_keyframe, 1, cc) == 2) { var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, _tlp, THEME.prop_keyframe, 1, cc)
if(b) cHov = true;
if(b == 2) {
var _add = false; var _add = false;
for(var j = 0; j < ds_list_size(jun.animator.values); j++) { for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j]; var _key = jun.animator.values[| j];
@ -196,7 +211,10 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
} }
bx -= ui(26); bx -= ui(26);
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, "", THEME.prop_keyframe, 0) == 2) { var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, "", THEME.prop_keyframe, 0)
if(b) cHov = true;
if(b == 2) {
var _t = -1; var _t = -1;
for(var j = 0; j < ds_list_size(jun.animator.values); j++) { for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j]; var _key = jun.animator.values[| j];
@ -215,8 +233,11 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
bx -= ui(26 + 12); bx -= ui(26 + 12);
tooltip_loop_type.index = jun.on_end; tooltip_loop_type.index = jun.on_end;
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, tooltip_loop_type, THEME.prop_on_end, jun.on_end) == 2)
jun.on_end = safe_mod(jun.on_end + 1, sprite_get_number(THEME.prop_on_end)); var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, tooltip_loop_type, THEME.prop_on_end, jun.on_end)
if(b) cHov = true;
if(b == 2) jun.on_end = safe_mod(jun.on_end + 1, sprite_get_number(THEME.prop_on_end));
} }
#endregion #endregion
@ -227,14 +248,19 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
bx -= ui(28); bx -= ui(28);
if(jun.is_modified) { if(jun.is_modified) {
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_16, 0, COLORS._main_icon) == 2) var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_16, 0, COLORS._main_icon)
jun.resetValue(); if(b) cHov = true;
if(b == 2) jun.resetValue();
} else } else
draw_sprite_ui(THEME.refresh_16, 0, bx, by,,,, COLORS._main_icon, 0.5); draw_sprite_ui(THEME.refresh_16, 0, bx, by,,,, COLORS._main_icon, 0.5);
bx -= ui(28); bx -= ui(28);
var ic_b = jun.expUse? c_white : COLORS._main_icon; var ic_b = jun.expUse? c_white : COLORS._main_icon;
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_use_expression", "Use expression"), THEME.node_use_expression, jun.expUse, ic_b) == 2) { var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_use_expression", "Use expression"), THEME.node_use_expression, jun.expUse, ic_b)
if(b) cHov = true;
if(b == 2) {
jun.setUseExpression(!jun.expUse); jun.setUseExpression(!jun.expUse);
if(!jun.expUse) WIDGET_CURRENT = noone; if(!jun.expUse) WIDGET_CURRENT = noone;
@ -243,14 +269,19 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
if(jun.expUse) { if(jun.expUse) {
bx -= ui(28); bx -= ui(28);
var cc = NODE_DROPPER_TARGET == jun? COLORS._main_value_positive : COLORS._main_icon; var cc = NODE_DROPPER_TARGET == jun? COLORS._main_value_positive : COLORS._main_icon;
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_dropper", "Node Dropper"), THEME.node_dropper, 0, cc) == 2) var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_dropper", "Node Dropper"), THEME.node_dropper, 0, cc)
NODE_DROPPER_TARGET = NODE_DROPPER_TARGET == jun? noone : jun;
if(b) cHov = true;
if(b == 2) NODE_DROPPER_TARGET = NODE_DROPPER_TARGET == jun? noone : jun;
} }
if(jun.expUse || jun.type == VALUE_TYPE.text) { if(jun.expUse || jun.type == VALUE_TYPE.text) {
bx -= ui(28); bx -= ui(28);
var cc = jun.popup_dialog == noone? COLORS._main_icon : COLORS._main_value_positive; var cc = jun.popup_dialog == noone? COLORS._main_icon : COLORS._main_value_positive;
if(buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_pop_text", "Pop up Editor"), THEME.text_popup, 0, cc) == 2) { var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _focus, _hover, __txtx("panel_inspector_pop_text", "Pop up Editor"), THEME.text_popup, 0, cc)
if(b) cHov = true;
if(b == 2) {
if(jun.expUse) jun.popup_dialog = dialogPanelCall(new Panel_Text_Editor(jun.express_edit, function() { return context.expression; }, jun)); if(jun.expUse) jun.popup_dialog = dialogPanelCall(new Panel_Text_Editor(jun.express_edit, function() { return context.expression; }, jun));
else jun.popup_dialog = dialogPanelCall(new Panel_Text_Editor(jun.editWidget, function() { return context.showValue(); }, jun)); else jun.popup_dialog = dialogPanelCall(new Panel_Text_Editor(jun.editWidget, function() { return context.showValue(); }, jun));
jun.popup_dialog.content.title = $"{jun.node.name} - {_name}"; jun.popup_dialog.content.title = $"{jun.node.name} - {_name}";
@ -280,7 +311,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var widH = widExtend? editBoxH : 0; var widH = widExtend? editBoxH : 0;
var mbRight = true; var mbRight = true;
if(jun.expUse) { #region expression editor if(jun.expUse) { // expression editor
var expValid = jun.expTree != noone && jun.expTree.validate(); var expValid = jun.expTree != noone && jun.expTree.validate();
jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative; jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative;
jun.express_edit.rx = rx; jun.express_edit.rx = rx;
@ -290,17 +321,16 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
if(_focus) jun.express_edit.register(_scrollPane); if(_focus) jun.express_edit.register(_scrollPane);
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m); var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
widH = wd_h - (TEXTBOX_HEIGHT * !widExtend); widH = wd_h - (TEXTBOX_HEIGHT * !widExtend);
cHov |= jun.express_edit.inBBOX(_m);
var un = jun.unit; var un = jun.unit;
if(un.reference != noone) { if(un.reference != noone) {
un.triggerButton.icon_index = un.mode; un.triggerButton.icon_index = un.mode;
un.triggerButton.tooltip.index = un.mode; un.triggerButton.tooltip.index = un.mode;
} }
#endregion
} else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget } else if(wid && jun.display_type != VALUE_DISPLAY.none) { // edit widget
wid.setFocusHover(_focus, _hover); wid.setFocusHover(_focus, _hover);
if(jun.connect_type == JUNCTION_CONNECT.input) { if(jun.connect_type == JUNCTION_CONNECT.input) {
@ -357,18 +387,19 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
} }
var _widH = wid.drawParam(param) ?? 0; var _widH = wid.drawParam(param) ?? 0;
widH = _widH - (TEXTBOX_HEIGHT * !widExtend); widH = _widH - (TEXTBOX_HEIGHT * !widExtend);
cHov |= wid.inBBOX(_m)
mbRight &= wid.right_click_block; mbRight &= wid.right_click_block;
#endregion
} else if(jun.display_type == VALUE_DISPLAY.label) { #region label } else if(jun.display_type == VALUE_DISPLAY.label) { // label
draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub); draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub);
draw_text_add(xx + ui(16), _hsy, jun.display_data.data); draw_text_add(xx + ui(16), _hsy, jun.display_data.data);
widH = string_height(jun.display_data.data); widH = string_height(jun.display_data.data);
#endregion
} else } else
widH = 0; widH = 0;
return [ widH, mbRight ]; return [ widH, mbRight, cHov ];
} }

View file

@ -31,7 +31,7 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
input_display_list = [ 5, 0, input_display_list = [ 5, 0,
["Palette", false, 2], 1, 3, 4, 7, 8, ["Palette", false, 2], 1, 3, 4, 7, 8,
["Alpha", false, 6], ["Alpha", false], 6,
]; ];
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);

View file

@ -38,9 +38,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
name_custom = false; name_custom = false;
switch(type) { switch(type) {
case VALUE_TYPE.PCXnode : case VALUE_TYPE.color :
accept_array = false; if(is_array(_value)) {
for (var i = 0, n = array_length(_value); i < n; i++)
_value[i] = cola(_value[i]);
} else
_value = cola(_value);
break; break;
case VALUE_TYPE.PCXnode : accept_array = false; break;
} }
if(struct_has(node, "inputMap")) { if(struct_has(node, "inputMap")) {

View file

@ -11,7 +11,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru
inputs[| 5] = nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range) inputs[| 5] = nodeValue("rotatorRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.rotation_range)
inputs[| 6] = nodeValue("rotatorRandom", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random) inputs[| 6] = nodeValue("rotatorRandom", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.rotation_random)
inputs[| 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider) inputs[| 7] = nodeValue("slider", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider)
inputs[| 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [0, 0]) .setDisplay(VALUE_DISPLAY.slider_range) inputs[| 8] = nodeValue("sliderRange", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ]) .setDisplay(VALUE_DISPLAY.slider_range)
inputs[| 9] = nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA) .setDisplay(VALUE_DISPLAY.area) inputs[| 9] = nodeValue("areaBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, DEF_AREA) .setDisplay(VALUE_DISPLAY.area)
inputs[| 10] = nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding) inputs[| 10] = nodeValue("paddingBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.padding)
inputs[| 11] = nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner) inputs[| 11] = nodeValue("cornerBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0, 0 ]) .setDisplay(VALUE_DISPLAY.corner)

View file

@ -99,6 +99,8 @@ function Panel_Action_Create() : PanelContent() constructor {
var _nd = nodes[i]; var _nd = nodes[i];
var _hv = pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _lh + ui(4)); var _hv = pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _lh + ui(4));
if(_hv) sc_node_content.hover_content = true;
draw_sprite_stretched_ext(THEME.group_label, _hv, 0, yy, _w, _lh + ui(4), CDEF.main_grey); draw_sprite_stretched_ext(THEME.group_label, _hv, 0, yy, _w, _lh + ui(4), CDEF.main_grey);
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text);
@ -124,7 +126,11 @@ function Panel_Action_Create() : PanelContent() constructor {
var _by = yy + _lh / 2; var _by = yy + _lh / 2;
var _tg = struct_has(_vali, "value"); _ttg |= _tg; var _tg = struct_has(_vali, "value"); _ttg |= _tg;
var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6); var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6);
if(_hv) TOOLTIP = "Save value"; if(_hv) {
TOOLTIP = "Save value";
sc_node_content.hover_content = true;
}
draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg)); draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg));
if(mouse_press(mb_left, _hv)) { if(mouse_press(mb_left, _hv)) {
if(_tg) struct_remove(_vali, "value"); if(_tg) struct_remove(_vali, "value");
@ -135,7 +141,11 @@ function Panel_Action_Create() : PanelContent() constructor {
if(_in.expUse) { if(_in.expUse) {
var _tg = struct_has(_vali, "expression"); _ttg |= _tg; var _tg = struct_has(_vali, "expression"); _ttg |= _tg;
var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6); var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6);
if(_hv) TOOLTIP = "Save expression"; if(_hv) {
TOOLTIP = "Save expression";
sc_node_content.hover_content = true;
}
draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg)); draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg));
if(mouse_press(mb_left, _hv)) { if(mouse_press(mb_left, _hv)) {
if(_tg) struct_remove(_vali, "expression"); if(_tg) struct_remove(_vali, "expression");
@ -147,7 +157,11 @@ function Panel_Action_Create() : PanelContent() constructor {
if(_in.unit.reference != noone) { if(_in.unit.reference != noone) {
var _tg = struct_has(_vali, "unit"); _ttg |= _tg; var _tg = struct_has(_vali, "unit"); _ttg |= _tg;
var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6); var _hv = pHOVER && point_in_circle(_m[0], _m[1], _bx, _by, 6);
if(_hv) TOOLTIP = "Save unit"; if(_hv) {
TOOLTIP = "Save unit";
sc_node_content.hover_content = true;
}
draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg)); draw_sprite_ext(THEME.circle_toggle_8, _tg, _bx, _by, 1, 1, 0, _tg? c_white : COLORS._main_icon, .5 + .5 * (_hv || _tg));
if(mouse_press(mb_left, _hv)) { if(mouse_press(mb_left, _hv)) {
if(_tg) struct_remove(_vali, "unit"); if(_tg) struct_remove(_vali, "unit");

View file

@ -68,8 +68,11 @@ function Panel_Addon() : PanelContent() constructor {
if(_addon.open) draw_sprite_stretched_ext(THEME.ui_panel_bg, 3, 0, by, ww, hh, COLORS._main_icon_light, 1); if(_addon.open) draw_sprite_stretched_ext(THEME.ui_panel_bg, 3, 0, by, ww, hh, COLORS._main_icon_light, 1);
if(hover) draw_sprite_stretched_ext(THEME.group_label, 0, 0, by, ww, hg, COLORS.panel_inspector_group_hover, 1); if(hover) {
else draw_sprite_stretched_ext(THEME.group_label, 0, 0, by, ww, hg, COLORS.panel_inspector_group_bg, 1); sc_addon.hover_content = true;
draw_sprite_stretched_ext(THEME.group_label, 0, 0, by, ww, hg, COLORS.panel_inspector_group_hover, 1);
} else
draw_sprite_stretched_ext(THEME.group_label, 0, 0, by, ww, hg, COLORS.panel_inspector_group_bg, 1);
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text); draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text);
draw_text_add(ui(44), by + hg / 2, _addon.name); draw_text_add(ui(44), by + hg / 2, _addon.name);
@ -81,6 +84,8 @@ function Panel_Addon() : PanelContent() constructor {
var _onStart = array_exists(ADDONS_ON_START, _addon.name); var _onStart = array_exists(ADDONS_ON_START, _addon.name);
if(pHOVER && point_in_rectangle(_m[0], _m[1], chx0, chy0, chx1, chy1)) { if(pHOVER && point_in_rectangle(_m[0], _m[1], chx0, chy0, chx1, chy1)) {
sc_addon.hover_content = true;
if(!_act) TOOLTIP = __txtx("panel_addon_not_activated", "Not activated"); if(!_act) TOOLTIP = __txtx("panel_addon_not_activated", "Not activated");
else if(!_onStart) TOOLTIP = __txtx("panel_addon_activated", "Activated"); else if(!_onStart) TOOLTIP = __txtx("panel_addon_activated", "Activated");
else TOOLTIP = __txtx("panel_addon_run_on_start", "Run on start"); else TOOLTIP = __txtx("panel_addon_run_on_start", "Run on start");

View file

@ -222,6 +222,7 @@ function Panel_Collection() : PanelContent() constructor {
meta = _node.getMetadata(); meta = _node.getMetadata();
if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) { if(_hover && point_in_rectangle(_m[0], _m[1], _nx, yy, _nx + grid_width, yy + grid_size)) {
contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 0, _boxx, yy, grid_size, grid_size, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, _boxx, yy, grid_size, grid_size, COLORS._main_accent, 1);
if(mouse_press(mb_left, pFOCUS)) { if(mouse_press(mb_left, pFOCUS)) {
@ -314,6 +315,8 @@ function Panel_Collection() : PanelContent() constructor {
} }
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) { if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, list_width, yy + list_height - 1)) {
contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 0, ui(4), yy, list_width - ui(8), list_height, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 0, ui(4), yy, list_width - ui(8), list_height, COLORS._main_accent, 1);
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))
DRAGGING = { type : _node.type == FILE_TYPE.collection? "Collection" : "Asset", data : _node } DRAGGING = { type : _node.type == FILE_TYPE.collection? "Collection" : "Asset", data : _node }
@ -360,6 +363,7 @@ function Panel_Collection() : PanelContent() constructor {
var hh = ui(8); var hh = ui(8);
_y += ui(8); _y += ui(8);
folderPane.hover_content = true;
if(pHOVER && folderPane.hover && point_in_rectangle(_m[0], _m[1], ui(32), _y - ui(2), group_w - ui(32), _y + ui(24))) { if(pHOVER && folderPane.hover && point_in_rectangle(_m[0], _m[1], ui(32), _y - ui(2), group_w - ui(32), _y + ui(24))) {
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, ui(32), _y - ui(2), group_w - ui(64), ui(24), CDEF.main_white, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, ui(32), _y - ui(2), group_w - ui(64), ui(24), CDEF.main_white, 1);
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))

View file

@ -272,6 +272,8 @@ function Panel_File_Explorer() : PanelContent() constructor {
context_hovering = noone; context_hovering = noone;
draggable = true; draggable = true;
contentPane.hover_content = true;
var _h = drawDir(rootFile, 0, _y, contentPane.surface_w, _m); var _h = drawDir(rootFile, 0, _y, contentPane.surface_w, _m);
if(frame_dragging) draw_sprite_stretched_points_clamp(THEME.ui_selection, 0, frame_drag_mx, frame_drag_my, _m[0], _m[1], COLORS._main_accent); if(frame_dragging) draw_sprite_stretched_points_clamp(THEME.ui_selection, 0, frame_drag_mx, frame_drag_my, _m[0], _m[1], COLORS._main_accent);

View file

@ -19,15 +19,17 @@ function Panel_Globalvar() : PanelContent() constructor {
} }
contentPane = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) { contentPane = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) {
var _hover = pHOVER && contentPane.hover;
draw_clear_alpha(COLORS.panel_bg_clear, 0); draw_clear_alpha(COLORS.panel_bg_clear, 0);
var _hover = pHOVER && contentPane.hover;
var hh = 0; var hh = 0;
var yy = _y; var yy = _y;
var _x = ui(8); var _x = ui(8);
var gvh = globalvar_viewer_draw(_x, yy, contentPane.surface_w - _x - ui(8), _m, pFOCUS, _hover, contentPane, x + _x + ui(padding), y + ui(title_height)); var glPar = globalvar_viewer_draw(_x, yy, contentPane.surface_w - _x - ui(8), _m, pFOCUS, _hover, contentPane, x + _x + ui(padding), y + ui(title_height));
var gvh = glPar[0];
if(glPar[1]) contentPane.hover_content = true;
yy += gvh + ui(8); yy += gvh + ui(8);
hh += gvh + ui(8); hh += gvh + ui(8);

View file

@ -38,8 +38,10 @@ function Panel_Gradient() : PanelContent() constructor {
var isHover = pHOVER && point_in_rectangle(_m[0], _m[1], xx, max(0, yy), xx + gw - ui(8), min(sp_gradient.h, yy + hg)); var isHover = pHOVER && point_in_rectangle(_m[0], _m[1], xx, max(0, yy), xx + gw - ui(8), min(sp_gradient.h, yy + hg));
draw_sprite_stretched(THEME.ui_panel_bg, 3, xx, yy, gw - ui(8), hg); draw_sprite_stretched(THEME.ui_panel_bg, 3, xx, yy, gw - ui(8), hg);
if(isHover) if(isHover) {
sp_gradient.hover_content = true;
draw_sprite_stretched_ext(THEME.node_active, 1, xx, yy, gw - ui(8), hg, COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.node_active, 1, xx, yy, gw - ui(8), hg, COLORS._main_accent, 1);
}
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub); draw_set_text(f_p2, fa_left, fa_top, COLORS._main_text_sub);
draw_text(xx + ui(10), yy + ui(2), preset.name); draw_text(xx + ui(10), yy + ui(2), preset.name);

View file

@ -2069,7 +2069,9 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
var nh = _node.h * ss; var nh = _node.h * ss;
draw_set_color(_node.getColor()); draw_set_color(_node.getColor());
draw_roundrect_ext(nx, ny, nx + nw, ny + nh, THEME_VALUE.minimap_corner_radius, THEME_VALUE.minimap_corner_radius, false); draw_set_alpha(0.2 + 0.8 * (!is_instanceof(_node, Node_Frame)));
draw_rectangle(nx, ny, nx + nw, ny + nh, false);
draw_set_alpha(1);
} }
draw_set_alpha(1); draw_set_alpha(1);
@ -2115,7 +2117,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
} }
if(pHOVER && point_in_rectangle(mx, my, mx0, my0, mx0 + ui(16), my0 + ui(16))) { if(pHOVER && point_in_rectangle(mx, my, mx0, my0, mx0 + ui(16), my0 + ui(16))) {
draw_sprite_ui(THEME.node_resize, 0, mx0 + ui(2), my0 + ui(2), 0.5, 0.5, 180, c_white, 0.75); draw_sprite_ui(THEME.node_resize, 0, mx0 + ui(10), my0 + ui(10), 0.5, 0.5, 180, c_white, 0.75);
if(mouse_press(mb_left, pFOCUS)) { if(mouse_press(mb_left, pFOCUS)) {
minimap_dragging = true; minimap_dragging = true;
minimap_drag_sx = minimap_w; minimap_drag_sx = minimap_w;
@ -2124,7 +2126,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
minimap_drag_my = my; minimap_drag_my = my;
} }
} else } else
draw_sprite_ui(THEME.node_resize, 0, mx0 + ui(2), my0 + ui(2), 0.5, 0.5, 180, c_white, 0.3); draw_sprite_ui(THEME.node_resize, 0, mx0 + ui(10), my0 + ui(10), 0.5, 0.5, 180, c_white, 0.3);
} #endregion } #endregion
function drawSearch() { function drawSearch() {

View file

@ -116,6 +116,8 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
case "buttonColor" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m); break; case "buttonColor" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m); break;
case "scrollBox" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m, sc_settings.x + x, sc_settings.y + y); break; case "scrollBox" : _wid.draw(_tx - _ww, ty + wh * i - _hh / 2, _ww, _hh, _dat, _m, sc_settings.x + x, sc_settings.y + y); break;
} }
if(_wid.inBBOX(_m)) sc_settings.hover_content = true;
} }
var _h = wh * array_length(widgets) + _hh; var _h = wh * array_length(widgets) + _hh;

View file

@ -33,9 +33,7 @@ function Panel_History() : PanelContent() constructor {
} }
refreshList(); refreshList();
onResize = function() { onResize = function() { sc_history.resize(w - padding * 2, h - padding * 2); }
sc_history.resize(w - padding * 2, h - padding * 2);
}
sc_history = new scrollPane(w - padding * 2, h - padding * 2, function(_y, _m) { sc_history = new scrollPane(w - padding * 2, h - padding * 2, function(_y, _m) {
draw_clear_alpha(COLORS._main_text, 0); draw_clear_alpha(COLORS._main_text, 0);
@ -81,6 +79,7 @@ function Panel_History() : PanelContent() constructor {
BLEND_OVERRIDE; BLEND_OVERRIDE;
if(pHOVER && sc_history.hover && point_in_rectangle(_m[0], _m[1], ui(32), yy - ui(4), lw, yy + hh + ui(4) - 1)) { if(pHOVER && sc_history.hover && point_in_rectangle(_m[0], _m[1], ui(32), yy - ui(4), lw, yy + hh + ui(4) - 1)) {
sc_history.hover_content = true;
draw_sprite_stretched_ext(THEME.node_bg, 0, ui(32), yy - ui(2), lw, hh + ui(4), COLORS._main_icon_light, 1); draw_sprite_stretched_ext(THEME.node_bg, 0, ui(32), yy - ui(2), lw, hh + ui(4), COLORS._main_icon_light, 1);
_hover = i; _hover = i;

View file

@ -280,6 +280,7 @@ function Panel_Inspector() : PanelContent() constructor {
if(_b != noone) { if(_b != noone) {
_b.setFocusHover(pFOCUS, _hover); _b.setFocusHover(pFOCUS, _hover);
_b.draw(_x1, yy + ui(2), ui(28), lbh - ui(4), _m, THEME.button_hide_fill); _b.draw(_x1, yy + ui(2), ui(28), lbh - ui(4), _m, THEME.button_hide_fill);
if(_b.inBBOX(_m)) contentPane.hover_content = true;
} }
draw_sprite_ui(THEME.arrow, meta_display[i][1]? 0 : 3, ui(16), yy + lbh / 2, 1, 1, 0, COLORS.panel_inspector_group_bg, 1); draw_sprite_ui(THEME.arrow, meta_display[i][1]? 0 : 3, ui(16), yy + lbh / 2, 1, 1, 0, COLORS.panel_inspector_group_bg, 1);
@ -290,9 +291,7 @@ function Panel_Inspector() : PanelContent() constructor {
yy += lbh + ui(viewMode? 8 : 6); yy += lbh + ui(viewMode? 8 : 6);
hh += lbh + ui(viewMode? 8 : 6); hh += lbh + ui(viewMode? 8 : 6);
if(meta_display[i][1]) { if(meta_display[i][1]) continue;
continue;
}
var _font = viewMode == INSP_VIEW_MODE.spacious? f_p0 : f_p2; var _font = viewMode == INSP_VIEW_MODE.spacious? f_p0 : f_p2;
@ -336,6 +335,7 @@ function Panel_Inspector() : PanelContent() constructor {
_param.font = _font; _param.font = _font;
wh = editW.drawParam(_param); wh = editW.drawParam(_param);
if(editW.inBBOX(_m)) contentPane.hover_content = true;
var jun = PANEL_GRAPH.value_dragging; var jun = PANEL_GRAPH.value_dragging;
var widw = con_w - ui(16); var widw = con_w - ui(16);
@ -393,6 +393,7 @@ function Panel_Inspector() : PanelContent() constructor {
} }
wh = meta_tb[j].drawParam(_param); wh = meta_tb[j].drawParam(_param);
if(meta_tb[j].inBBOX(_m)) contentPane.hover_content = true;
if(viewMode == INSP_VIEW_MODE.spacious) { if(viewMode == INSP_VIEW_MODE.spacious) {
yy += wh + ui(8); yy += wh + ui(8);
@ -421,6 +422,7 @@ function Panel_Inspector() : PanelContent() constructor {
_param.font = _font; _param.font = _font;
wh = meta_steam_avatar.drawParam(_param); wh = meta_steam_avatar.drawParam(_param);
if(meta_steam_avatar.inBBOX(_m)) contentPane.hover_content = true;
yy += wh + ui(6); hh += wh + ui(6); yy += wh + ui(6); hh += wh + ui(6);
if(viewMode == INSP_VIEW_MODE.spacious) { yy += ui(2); hh += ui(2); } if(viewMode == INSP_VIEW_MODE.spacious) { yy += ui(2); hh += ui(2); }
@ -435,7 +437,11 @@ function Panel_Inspector() : PanelContent() constructor {
continue; continue;
} }
var gvh = globalvar_viewer_draw(ui(16), yy, contentPane.surface_w - ui(24), _m, pFOCUS, _hover, contentPane, ui(16) + x, top_bar_h + y); if(_m[1] > yy) contentPane.hover_content = true;
var glPar = globalvar_viewer_draw(ui(16), yy, contentPane.surface_w - ui(24), _m, pFOCUS, _hover, contentPane, ui(16) + x, top_bar_h + y);
var gvh = glPar[0];
yy += gvh + ui(8); yy += gvh + ui(8);
hh += gvh + ui(8); hh += gvh + ui(8);
@ -568,6 +574,7 @@ function Panel_Inspector() : PanelContent() constructor {
edt[2].text = edt[0]; edt[2].text = edt[0];
edt[2].draw(ui(8), yy, con_w - ui(16), hg, _m); edt[2].draw(ui(8), yy, con_w - ui(16), hg, _m);
if(edt[2].inBBOX(_m)) contentPane.hover_content = true;
yy += hg + ui(8); yy += hg + ui(8);
hh += hg + ui(8); hh += hg + ui(8);
continue; continue;
@ -581,6 +588,7 @@ function Panel_Inspector() : PanelContent() constructor {
var _wh = edt[2].drawParam(_param); var _wh = edt[2].drawParam(_param);
var _hg = max(hg, _wh); var _hg = max(hg, _wh);
if(edt[2].inBBOX(_m)) contentPane.hover_content = true;
yy += _hg + ui(8); yy += _hg + ui(8);
hh += _hg + ui(8); hh += _hg + ui(8);
} }
@ -682,6 +690,7 @@ function Panel_Inspector() : PanelContent() constructor {
var ltx = lbx + ui(32); var ltx = lbx + ui(32);
if(_hover && point_in_rectangle(_m[0], _m[1], lbx, yy, con_w, yy + lbh)) { if(_hover && point_in_rectangle(_m[0], _m[1], lbx, yy, con_w, yy + lbh)) {
contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.group_label, 0, lbx, yy, lbw, lbh, COLORS.panel_inspector_group_hover, 1); draw_sprite_stretched_ext(THEME.group_label, 0, lbx, yy, lbw, lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))
@ -698,6 +707,7 @@ function Panel_Inspector() : PanelContent() constructor {
if(togl != noone) { if(togl != noone) {
if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, ui(32), yy + lbh)) { if(_hover && point_in_rectangle(_m[0], _m[1], 0, yy, ui(32), yy + lbh)) {
contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, ui(32), lbh, COLORS.panel_inspector_group_hover, 1); draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, ui(32), lbh, COLORS.panel_inspector_group_hover, 1);
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))
@ -785,9 +795,15 @@ function Panel_Inspector() : PanelContent() constructor {
var widg = drawWidget(ui(16), yy, contentPane.surface_w - ui(24), _m, jun, false, pHOVER && contentPane.hover, pFOCUS, contentPane, ui(16) + x, top_bar_h + y); var widg = drawWidget(ui(16), yy, contentPane.surface_w - ui(24), _m, jun, false, pHOVER && contentPane.hover, pFOCUS, contentPane, ui(16) + x, top_bar_h + y);
var widH = widg[0]; var widH = widg[0];
var mbRight = widg[1]; var mbRight = widg[1];
var widHov = widg[2];
var lbHov = point_in_rectangle(_m[0], _m[1], lb_x, _selY + ui(2), lb_x + lb_w, _selY + lb_h - ui(4)); var lbHov = point_in_rectangle(_m[0], _m[1], lb_x, _selY + ui(2), lb_x + lb_w, _selY + lb_h - ui(4));
if(lbHov) draw_sprite_stretched_ext(THEME.button_hide, 1, lb_x, _selY + ui(2), lb_w, lb_h - ui(6), COLORS._main_icon, 1); if(lbHov) {
contentPane.hover_content = true;
draw_sprite_stretched_ext(THEME.button_hide, 1, lb_x, _selY + ui(2), lb_w, lb_h - ui(4), COLORS._main_icon, 1);
}
if(widHov) contentPane.hover_content = true;
hh += lb_h + widH + padd; hh += lb_h + widH + padd;
@ -809,12 +825,12 @@ function Panel_Inspector() : PanelContent() constructor {
} }
#endregion #endregion
if(jun.connect_type == JUNCTION_CONNECT.input && jun.type == VALUE_TYPE.color && jun.display_type == VALUE_DISPLAY._default) { #region color picker if(jun.connect_type == JUNCTION_CONNECT.input && jun.type == VALUE_TYPE.color && jun.display_type == VALUE_DISPLAY._default) { // color picker
pickers[color_picker_index] = jun; pickers[color_picker_index] = jun;
color_picker_index++; color_picker_index++;
} #endregion }
if(_hover && point_in_rectangle(_m[0], _m[1], ui(4), _selY, contentPane.surface_w - ui(4), _selY + _selH)) { #region mouse in widget if(_hover && point_in_rectangle(_m[0], _m[1], ui(4), _selY, contentPane.surface_w - ui(4), _selY + _selH)) { // mouse in widget
_HOVERING_ELEMENT = jun; _HOVERING_ELEMENT = jun;
var hov = PANEL_GRAPH.value_dragging != noone || (NODE_DROPPER_TARGET != noone && NODE_DROPPER_TARGET != jun); var hov = PANEL_GRAPH.value_dragging != noone || (NODE_DROPPER_TARGET != noone && NODE_DROPPER_TARGET != jun);
@ -870,7 +886,7 @@ function Panel_Inspector() : PanelContent() constructor {
var dia = menuCall("inspector_value_menu",,, _menuItem,, jun); var dia = menuCall("inspector_value_menu",,, _menuItem,, jun);
__dialog_junction = jun; __dialog_junction = jun;
} #endregion } #endregion
} #endregion }
} }
#region color picker #region color picker
@ -1140,6 +1156,7 @@ function Panel_Inspector() : PanelContent() constructor {
if(!locked && PANEL_GRAPH.getFocusingNode() && inspecting != PANEL_GRAPH.getFocusingNode()) if(!locked && PANEL_GRAPH.getFocusingNode() && inspecting != PANEL_GRAPH.getFocusingNode())
setInspecting(PANEL_GRAPH.getFocusingNode()); setInspecting(PANEL_GRAPH.getFocusingNode());
} #endregion } #endregion
//// =========== Serialize =========== //// =========== Serialize ===========

View file

@ -43,6 +43,8 @@ function Panel_Nodes() : PanelContent() constructor {
node_collapse[? node.node_id] = false; node_collapse[? node.node_id] = false;
if(pHOVER && point_in_rectangle(_m[0], _m[1], _x0, _y, _x1 - _x0 - ui(32), _y + hg)) { if(pHOVER && point_in_rectangle(_m[0], _m[1], _x0, _y, _x1 - _x0 - ui(32), _y + hg)) {
sc_nodes.hover_content = true;
var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25); var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, cc, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, cc, 1);
@ -90,13 +92,11 @@ function Panel_Nodes() : PanelContent() constructor {
return _h; return _h;
} }
#region content sc_nodes = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding + 40), function(_y, _m) {
sc_nodes = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding + 40), function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear, 0);
draw_clear_alpha(COLORS.panel_bg_clear, 0); var _h = drawNodeList(PROJECT.nodes, 0, sc_nodes.surface_w, _y, _m);
var _h = drawNodeList(PROJECT.nodes, 0, sc_nodes.surface_w, _y, _m); return _h;
return _h; });
})
#endregion
function drawContent(panel) { function drawContent(panel) {
draw_clear_alpha(COLORS.panel_bg_clear, 0); draw_clear_alpha(COLORS.panel_bg_clear, 0);

View file

@ -35,7 +35,6 @@ function Panel_Notification() : PanelContent() constructor {
function onResize() { function onResize() {
PANEL_PADDING PANEL_PADDING
sp_noti.resize(w - ui(padding + padding), h - ui(title_height + padding)); sp_noti.resize(w - ui(padding + padding), h - ui(title_height + padding));
} }
@ -67,6 +66,7 @@ function Panel_Notification() : PanelContent() constructor {
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg, 1); draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg, 1);
if(pHOVER && pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h)) { if(pHOVER && pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h)) {
sp_noti.hover_content = true;
draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg_hover, 1); draw_sprite_stretched_ext(THEME.group_label, 0, 0, yy, _w, _h, COLORS.dialog_notification_bg_hover, 1);
if(noti.tooltip != "") if(noti.tooltip != "")

View file

@ -129,6 +129,8 @@ function Panel_Palette() : PanelContent() constructor {
} }
if(isHover) { if(isHover) {
sp_palettes.hover_content = true;
if(_palRes.hoverIndex > noone) { if(_palRes.hoverIndex > noone) {
var _box = _palRes.hoverBBOX; var _box = _palRes.hoverBBOX;
draw_sprite_stretched_add(THEME.menu_button_mask, 1, _box[0] + 1, _box[1] + 1, _box[2] - 2, _box[3] - 2, c_white, 0.3); draw_sprite_stretched_add(THEME.menu_button_mask, 1, _box[0] + 1, _box[1] + 1, _box[2] - 2, _box[3] - 2, c_white, 0.3);

View file

@ -61,9 +61,12 @@ function Panel_Presets(_node) : PanelContent() constructor {
draw_set_text(f_p2, fa_center, fa_center, _hov? COLORS._main_value_positive : COLORS._main_icon); draw_set_text(f_p2, fa_center, fa_center, _hov? COLORS._main_value_positive : COLORS._main_icon);
draw_text_add(_ww / 2, _y + _add_h / 2, __txt("New preset")); draw_text_add(_ww / 2, _y + _add_h / 2, __txt("New preset"));
if(_hov && mouse_press(mb_left, pFOCUS)) { if(_hov) {
if(!adding) tb_add.activate(); sc_presets.hover_content = true;
adding = true; if(mouse_press(mb_left, pFOCUS)) {
if(!adding) tb_add.activate();
adding = true;
}
} }
_h += _add_h + ui(4); _h += _add_h + ui(4);

View file

@ -75,6 +75,7 @@ function Panel_Tunnels() : PanelContent() constructor {
var node = arr[i]; var node = arr[i];
if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + hg)) { if(point_in_rectangle(_m[0], _m[1], 0, _y, ww, _y + hg)) {
sc_tunnel.hover_content = true;
var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25); var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25);
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, cc, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, _y, ww, hg, cc, 1);
tunnel_hover = node; tunnel_hover = node;

View file

@ -28,7 +28,7 @@ function scrollPane(_w, _h, ondraw) : widget() constructor {
pen_scroll_my = 0; pen_scroll_my = 0;
pen_scroll_sy = 0; pen_scroll_sy = 0;
pen_scroll_py = 0; pen_scroll_py = 0;
pen_scroll_lock = false; hover_content = false;
scroll_s = sprite_get_width(THEME.ui_scrollbar); scroll_s = sprite_get_width(THEME.ui_scrollbar);
scroll_w = scroll_s; scroll_w = scroll_s;
@ -52,6 +52,9 @@ function scrollPane(_w, _h, ondraw) : widget() constructor {
hover &= point_in_rectangle( mx, my, 0, 0, surface_w, surface_h); hover &= point_in_rectangle( mx, my, 0, 0, surface_w, surface_h);
hover &= pen_scrolling != 2; hover &= pen_scrolling != 2;
surface = surface_verify(surface, surface_w, surface_h); surface = surface_verify(surface, surface_w, surface_h);
hover_content = false;
//// Draw
surface_set_target(surface); surface_set_target(surface);
draw_clear(COLORS.panel_bg_clear); draw_clear(COLORS.panel_bg_clear);
@ -75,25 +78,28 @@ function scrollPane(_w, _h, ondraw) : widget() constructor {
if(mouse_wheel_up()) scroll_y_to += scroll_step * SCROLL_SPEED; if(mouse_wheel_up()) scroll_y_to += scroll_step * SCROLL_SPEED;
} }
// if(pen_scroll_lock) pen_scrolling = 0; //// Pen scroll
// else if(hover && PEN_USE && mouse_press(mb_left)) {
// pen_scrolling = 1; if(pen_scrolling == 0 && mouse_press(mb_left, !hover_content && hover && PEN_USE)) {
// pen_scroll_my = 0; pen_scrolling = 1;
// } pen_scroll_my = 0;
}
if(pen_scrolling == 1) { if(pen_scrolling == 1) {
pen_scroll_my += PEN_Y_DELTA; pen_scroll_my += PEN_Y_DELTA;
if(abs(pen_scroll_my) > 16) if(abs(pen_scroll_my) > 0)
pen_scrolling = 2; pen_scrolling = 2;
if(mouse_release(mb_left)) pen_scrolling = 0; if(mouse_release(mb_left)) pen_scrolling = 0;
} else if(pen_scrolling == 2) { } else if(pen_scrolling == 2) {
scroll_y_to = clamp(scroll_y_to + PEN_Y_DELTA * 2, -content_h, 0); scroll_y_to = clamp(scroll_y_to + PEN_Y_DELTA * 2, -content_h, 0);
scroll_y_raw = scroll_y_to; scroll_y_raw = scroll_y_to;
scroll_y = round(scroll_y_raw); scroll_y = round(scroll_y_raw);
pen_scroll_py = abs(PEN_Y_DELTA) > abs(pen_scroll_py)? PEN_Y_DELTA : lerp_float(pen_scroll_py, PEN_Y_DELTA, 10); pen_scroll_py = abs(PEN_Y_DELTA) > abs(pen_scroll_py)? PEN_Y_DELTA : lerp_float(pen_scroll_py, PEN_Y_DELTA, 10);
if(mouse_release(mb_left)) pen_scrolling = 0; if(mouse_release(mb_left))
pen_scrolling = 0;
} else { } else {
pen_scroll_py = lerp_float(pen_scroll_py, 0, 30, 1); pen_scroll_py = lerp_float(pen_scroll_py, 0, 30, 1);
@ -109,7 +115,6 @@ function scrollPane(_w, _h, ondraw) : widget() constructor {
} }
scroll_lock = false; scroll_lock = false;
pen_scroll_lock = false;
} }
static draw_scroll = function(scr_x, scr_y, is_vert, scr_s, scr_prog, scr_ratio, bg_col, bar_col, bar_hcol, mx, my, bar_spr_w) { static draw_scroll = function(scr_x, scr_y, is_vert, scr_s, scr_prog, scr_ratio, bg_col, bar_col, bar_hcol, mx, my, bar_spr_w) {

View file

@ -7,10 +7,10 @@ function sliderRange(_step, _int, _range, _onModify) : widget() constructor {
onModify = _onModify; onModify = _onModify;
tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 0)}) tb_value_min = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 0)})
.setSlideType(_int).setSlideStep(_step).setSlideRange(_range); .setSlideType(_int).setSlideStep(_step).setSlideRange(_range[0], _range[1]);
tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 1)}) tb_value_max = new textBox(TEXTBOX_INPUT.number, function(val) /*=>*/ {return onModify(clamp(val, curr_range[0], curr_range[1]), 1)})
.setSlideType(_int).setSlideStep(_step).setSlideRange(_range); .setSlideType(_int).setSlideStep(_step).setSlideRange(_range[0], _range[1]);
tb_value_min.hide = true; tb_value_min.hide = true;
tb_value_max.hide = true; tb_value_max.hide = true;

View file

@ -718,14 +718,12 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
if(target != undefined) { if(target != undefined) {
if(!click_block) { if(!click_block) {
if(mouse_press(mb_left, active) && HOVER != o_dialog_textbox_autocomplete.id) { if(mouse_press(mb_left, active) && HOVER != o_dialog_textbox_autocomplete.id) {
if(parent) parent.pen_scroll_lock = true;
cursor_select = target; cursor_select = target;
cursor = target; cursor = target;
o_dialog_textbox_autocomplete.deactivate(self); o_dialog_textbox_autocomplete.deactivate(self);
} else if(mouse_click(mb_left, active)) { } else if(mouse_click(mb_left, active)) {
if(parent) parent.pen_scroll_lock = true;
cursor = target; cursor = target;
} }
} }
@ -997,7 +995,6 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
var bar_y = scr_y + (scr_h - bar_h) * abs(text_y / text_y_max); var bar_y = scr_y + (scr_h - bar_h) * abs(text_y / text_y_max);
if(text_scrolling) { if(text_scrolling) {
if(parent) parent.pen_scroll_lock = true;
text_y_to = text_scroll_sy - (_m[1] - text_scroll_my) / bar_h * scr_h; text_y_to = text_scroll_sy - (_m[1] - text_scroll_my) / bar_h * scr_h;
text_y_to = clamp(text_y_to, -text_y_max, 0); text_y_to = clamp(text_y_to, -text_y_max, 0);

View file

@ -535,7 +535,6 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h); var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
if(sliding > 0) { #region slide if(sliding > 0) { #region slide
if(parent) parent.pen_scroll_lock = true;
slide_delta += PEN_USE? PEN_X_DELTA : window_mouse_get_delta_x(); slide_delta += PEN_USE? PEN_X_DELTA : window_mouse_get_delta_x();
slide_delta += PEN_USE? PEN_Y_DELTA : window_mouse_get_delta_y(); slide_delta += PEN_USE? PEN_Y_DELTA : window_mouse_get_delta_y();
@ -551,7 +550,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
slider_dy = 0; slider_dy = 0;
slider_mulp = 0; slider_mulp = 0;
if(!slidePen) { if(!slidePen && PREFERENCES.slider_lock_mouse) {
CURSOR_LOCK_X = mouse_mx; CURSOR_LOCK_X = mouse_mx;
CURSOR_LOCK_Y = mouse_my; CURSOR_LOCK_Y = mouse_my;
} }
@ -571,8 +570,10 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
slider_dy += slidePen? PEN_Y_DELTA : window_mouse_get_delta_y(); slider_dy += slidePen? PEN_Y_DELTA : window_mouse_get_delta_y();
var _mulp = slider_mulp; var _mulp = slider_mulp;
if(slider_dy < -160 * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp + 1, -2, 2); slider_dy = 0; } var _stpH = slidePen || !PREFERENCES.slider_lock_mouse? 24 : 160;
else if(slider_dy > 160 * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp - 1, -2, 2); slider_dy = 0; }
if(slider_dy < -_stpH * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp + 1, -2, 2); slider_dy = 0; }
else if(slider_dy > _stpH * (1 + abs(slider_mulp) * .5)) { slider_mulp = clamp(slider_mulp - 1, -2, 2); slider_dy = 0; }
if(_mulp != slider_mulp) { if(_mulp != slider_mulp) {
slider_dx = 0; slider_dx = 0;
@ -589,28 +590,32 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
} else { } else {
MOUSE_BLOCK = true; MOUSE_BLOCK = true;
var _s = slide_speed; var _s = slide_speed;
var _sc = power(10, slider_mulp); // print($"{_s} : {slide_range} | {_w} / {_s * _w} - {slider_cur_del}");
if(!PREFERENCES.slider_lock_mouse)
_s = slide_range != noone? (slide_range[1] - slide_range[0]) / _w * 2 : 1 / 100;
var _sc = power(10, slider_mulp + slide_int);
_s *= _sc; _s *= _sc;
if(key_mod_press(CTRL) && !slide_snap) _s *= 10; if(key_mod_press(CTRL) && !slide_snap) _s *= 10;
if(key_mod_press(ALT)) _s /= 10; if(key_mod_press(ALT)) _s /= 10;
var _slider_cur_val = slider_cur_val; if(abs(_mdx) > abs(_mdy)) {
slider_dx += _mdx / w; slider_dx += _mdx / w;
slider_cur_del += _mdx; slider_cur_del += _mdx;
slider_cur_val = slider_def_val + slider_cur_del * _s; slider_cur_val = slider_def_val + slider_cur_del * _s;
if(slide_range != noone) if(slide_range != noone)
slider_cur_val = clamp(slider_cur_val, curr_range[0], curr_range[1]); slider_cur_val = clamp(slider_cur_val, curr_range[0], curr_range[1]);
var _val = value_snap(slider_cur_val, _sc / 100); var _val = value_snap(slider_cur_val, _sc / 100);
// print($"{_slider_cur_val} > {slider_cur_val} : {curr_range} > {_val} [{_sc / 100}]");
if(key_mod_press(CTRL) && slide_snap) _val = value_snap(slider_cur_val, slide_snap);
if(key_mod_press(CTRL) && slide_snap) _val = value_snap(slider_cur_val, slide_snap); if(slide_int) _val = round(_val);
if(slide_int) _val = round(_val);
_input_text = string_real(_val);
_input_text = string_real(_val); }
if(apply()) UNDO_HOLDING = true; if(apply()) UNDO_HOLDING = true;
} }

View file

@ -8,6 +8,8 @@ function widget() constructor {
keyframe = noone; keyframe = noone;
interactable = true; interactable = true;
hover_content = false;
right_click_block = true; right_click_block = true;
side_button = noone; side_button = noone;
@ -98,6 +100,8 @@ function widget() constructor {
hover = false; hover = false;
} }
static inBBOX = function(_m) { return point_in_rectangle(_m[0], _m[1], x, y, x + w, y + h); }
static clone = function() { return variable_clone(self); } static clone = function() { return variable_clone(self); }
static drawParam = function(params) {} static drawParam = function(params) {}