1.14pr8.3 update

This commit is contained in:
Tanasart 2023-04-05 20:13:27 +02:00
parent 8ec0e7b9c0
commit 2c3a1ada1a
19 changed files with 166 additions and 92 deletions

Binary file not shown.

View file

@ -476,7 +476,7 @@ event_inherited();
}
}
if(ADD_NODE_PAGE < 1)
if(ADD_NODE_PAGE == -1)
ds_list_destroy(_list);
return hh;
@ -527,7 +527,7 @@ event_inherited();
for(var i = 0; i < ds_list_size(NODE_CATEGORY); i++) {
var cat = NODE_CATEGORY[| i];
if(i == NODE_PAGE_DEFAULT)
if(!struct_has(cat, "list"))
continue;
if(array_length(cat.filter) && !array_exists(cat.filter, context))
continue;

View file

@ -62,6 +62,8 @@ event_inherited();
dialog_h = min(max_h, hh);
sc_content.resize(dialog_w, dialog_h);
resetPosition();
}
sc_content = new scrollPane(0, 0, function(_y, _m) {
@ -96,7 +98,7 @@ event_inherited();
draw_sprite_stretched_ext(THEME.textbox, 3, 0, _ly, _dw, hght, COLORS.dialog_menubox_highlight, 1);
if(sc_content.active && (mouse_press(mb_left) || keyboard_check_pressed(vk_enter))) {
initVal = i;
initVal = array_find(scrollbox.data, txt);
instance_destroy();
}
}

View file

@ -129,7 +129,6 @@ if(OS == os_windows && gameframe_is_minimized()) exit;
#endregion
#region frame
draw_set_color(COLORS._main_icon_dark);
draw_set_color(merge_color(COLORS._main_icon, COLORS._main_icon_dark, 0.95));
draw_rectangle(1, 1, WIN_W - 2, WIN_H - 2, true);
#endregion
#endregion

View file

@ -11,11 +11,11 @@ function __initCollection() {
var _l = root + "/version";
if(file_exists(_l)) {
var res = json_load_struct(_l);
if(!is_struct(res) || !struct_has(res, "version") || res.version < VERSION)
if(!is_struct(res) || !struct_has(res, "version") || res.version < COLLECTION_VERSION)
zip_unzip("data/Collections.zip", root);
} else
zip_unzip("data/Collections.zip", root);
json_save_struct(_l, { version: VERSION });
json_save_struct(_l, { version: COLLECTION_VERSION });
refreshCollections();

View file

@ -31,8 +31,11 @@
COLOR_KEYS = [];
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
globalvar COLLECTION_VERSION;
VERSION = 1140;
SAVEFILE_VERSION = 1400;
COLLECTION_VERSION = 1140.083;
VERSION_STRING = "1.14.0pr8.3";
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;

View file

@ -90,7 +90,7 @@ function MetaDataManager() constructor {
}
var _aut = "By " + author;
var _ver = get_text("meta_old_version", "Created on an older version");
var _ver = version < SAVEFILE_VERSION? get_text("meta_old_version", "Created on an older version") : get_text("meta_new_version", "Created on a newer version");
draw_set_font(f_h5);
_h += string_height_ext(name, -1, ww) - ui(4);
@ -119,7 +119,7 @@ function MetaDataManager() constructor {
_w = max(_w, string_width_ext(alias, -1, ww));
}
if(version < SAVEFILE_VERSION) {
if(version != SAVEFILE_VERSION) {
draw_set_font(f_p2);
_h += ui(8);
_h += string_height_ext(_ver, -1, ww);
@ -180,7 +180,7 @@ function MetaDataManager() constructor {
ty += string_height_ext(alias, -1, _w);
}
if(version < SAVEFILE_VERSION) {
if(version != SAVEFILE_VERSION) {
ty += ui(8);
draw_set_text(f_p2, fa_left, fa_top, COLORS._main_accent);
draw_text_ext(mx + ui(8), ty, _ver, -1, _w);

View file

@ -136,17 +136,17 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
var sw = (ww - sp_l - sp_r) / cw;
var sh = (hh - sp_t - sp_b) / ch;
draw_surface_part_ext_safe(_inSurf, 0, 0, sp_l, sp_t, 0, 0, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, 0, sp_r, sp_t, ww - sp_r, 0, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, in_h - sp_b, sp_l, sp_b, 0, hh - sp_b, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, in_h - sp_b, sp_r, sp_b, ww - sp_r, hh - sp_b, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, 0, sp_l, sp_t, 0, 0, 1, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, 0, sp_r, sp_t, ww - sp_r, 0, 1, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, in_h - sp_b, sp_l, sp_b, 0, hh - sp_b, 1, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, in_h - sp_b, sp_r, sp_b, ww - sp_r, hh - sp_b, 1, 1, 0, c_white, 1);
if(_fill == 0) {
draw_surface_part_ext_safe(_inSurf, sp_l, 0, cw, sp_t, sp_l, 0, sw, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, in_h - sp_b, cw, sp_b, sp_l, hh - sp_b, sw, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, 0, cw, sp_t, sp_l, 0, sw, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, in_h - sp_b, cw, sp_b, sp_l, hh - sp_b, sw, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, sp_t, sp_l, ch, 0, sp_t, 1, sh, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, sp_t, sp_r, ch, ww - sp_r, sp_t, 1, sh, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, sp_t, sp_l, ch, 0, sp_t, 1, sh, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, sp_t, sp_r, ch, ww - sp_r, sp_t, 1, sh, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, sp_t, cw, ch, sp_l, sp_t, sw, sh, c_white, 1);
} else if(_fill == 1) {
@ -155,15 +155,15 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
var _x = sp_l;
while(_x < _cw_max) {
draw_surface_part_ext_safe(_inSurf, sp_l, 0, min(cw, _cw_max - _x), sp_t, _x, 0, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, in_h - sp_b, min(cw, _cw_max - _x), sp_b, _x, hh - sp_b, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, 0, min(cw, _cw_max - _x), sp_t, _x, 0, 1, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, in_h - sp_b, min(cw, _cw_max - _x), sp_b, _x, hh - sp_b, 1, 1, 0, c_white, 1);
_x += cw;
}
var _y = sp_t;
while(_y < _ch_max) {
draw_surface_part_ext_safe(_inSurf, 0, sp_t, sp_l, min(ch, _ch_max - _y), 0, _y, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, sp_t, sp_r, min(ch, _ch_max - _y), ww - sp_r, _y, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, 0, sp_t, sp_l, min(ch, _ch_max - _y), 0, _y, 1, 1, 0, c_white, 1);
draw_surface_part_ext_safe(_inSurf, in_w - sp_r, sp_t, sp_r, min(ch, _ch_max - _y), ww - sp_r, _y, 1, 1, 0, c_white, 1);
_y += ch;
}
@ -172,7 +172,7 @@ function Node_9Slice(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
while(_x < _cw_max) {
_y = sp_t;
while(_y < _ch_max) {
draw_surface_part_ext_safe(_inSurf, sp_l, sp_t, min(cw, _cw_max - _x), min(ch, _ch_max - _y), _x, _y, 1, 1, c_white, 1);
draw_surface_part_ext_safe(_inSurf, sp_l, sp_t, min(cw, _cw_max - _x), min(ch, _ch_max - _y), _x, _y, 1, 1, 0, c_white, 1);
_y += ch;
}
_x += cw;

View file

@ -354,11 +354,16 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
ind = hov.surface_index;
if(ind != -1) {
for( var j = 1; j < data_length; j++ )
for( var j = 1; j < data_length; j++ ) {
if(ind + j >= ds_list_size(inputs)) break;
inputs[| ind + j].drawNameBG(_s);
}
for( var j = 1; j < data_length; j++ )
for( var j = 1; j < data_length; j++ ) {
if(ind + j >= ds_list_size(inputs)) break;
inputs[| ind + j].drawName(_s, _mx, _my);
}
} else if(show_input_name) {
for( var i = 0; i < getInputAmount(); i++ ) {
var idx = getInputIndex(i);

View file

@ -794,7 +794,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
preview_drop_y = preview_my;
}
static getNodeDimension = function() {
static getNodeDimension = function(showFormat = true) {
if(!is_surface(preview_surface)) {
if(ds_list_size(outputs))
return "[" + array_shape(outputs[| 0].getValue()) + "]";
@ -809,14 +809,15 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
if(preview_amount) txt = string(preview_amount) + " x " + txt;
switch(format) {
case surface_rgba4unorm : txt += "4RGBA"; break;
case surface_rgba8unorm : txt += "8RGBA"; break;
case surface_rgba16float : txt += "16RGBA"; break;
case surface_rgba32float : txt += "32RGBA"; break;
case surface_r8unorm : txt += "8BW"; break;
case surface_r16float : txt += "16BW"; break;
case surface_r32float : txt += "32BW"; break;
case surface_rgba4unorm : txt += showFormat? "4RGBA" : "4R"; break;
case surface_rgba8unorm : txt += showFormat? "8RGBA" : "8R"; break;
case surface_rgba16float : txt += showFormat? "16RGBA" : "16R"; break;
case surface_rgba32float : txt += showFormat? "32RGBA" : "32R"; break;
case surface_r8unorm : txt += showFormat? "8BW" : "8B"; break;
case surface_r16float : txt += showFormat? "16BW" : "16B"; break;
case surface_r32float : txt += showFormat? "32BW" : "32B"; break;
}
txt += "]";
return txt;
@ -831,7 +832,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
var ty = yy + (h + 4) * _s;
if(PANEL_GRAPH.show_dimension) {
var txt = string(getNodeDimension());
var txt = string(getNodeDimension(_s > 0.65));
draw_text(round(tx), round(ty), txt);
ty += string_height(txt) - 4 * _s;
}

View file

@ -16,17 +16,47 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 4;
inputs[| 5] = nodeValue("Pad mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_button, [ "Pad out", "Pad to size" ]);
inputs[| 6] = nodeValue("Target dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2)
.setDisplay(VALUE_DISPLAY.vector)
inputs[| 7] = nodeValue("Horizontal alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]);
inputs[| 8] = nodeValue("Vertical alignment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_valign, THEME.inspector_surface_valign, THEME.inspector_surface_valign ]);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [ 4,
["Surface", true], 0,
["Padding", false], 1, 2, 3
["Padding", false], 5, 1, 6, 7, 8,
["Filling", false], 2, 3,
];
attribute_surface_depth();
static step = function() {
var mode = inputs[| 5].getValue();
inputs[| 1].setVisible(mode == 0);
inputs[| 6].setVisible(mode == 1);
inputs[| 7].setVisible(mode == 1);
inputs[| 8].setVisible(mode == 1);
}
static process_data = function(_outSurf, _data, _output_index, _array_index) {
var mode = _data[5];
var padding = _data[1];
var dim = _data[6];
var halign = _data[7];
var valign = _data[8];
var fill = _data[2];
var fillClr = _data[3];
var cDep = attrDepth();
@ -36,24 +66,54 @@ function Node_Padding(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var ww = surface_get_width(_data[0]);
var hh = surface_get_height(_data[0]);
var sw = ww + padding[0] + padding[2];
var sh = hh + padding[1] + padding[3];
if(mode == 0) {
var sw = ww + padding[0] + padding[2];
var sh = hh + padding[1] + padding[3];
if(sw > 1 && sh > 1) {
_outSurf = surface_verify(_outSurf, sw, sh, cDep);
if(sw > 1 && sh > 1) {
_outSurf = surface_verify(_outSurf, sw, sh, cDep);
surface_set_target(_outSurf);
if(fill == 0) {
DRAW_CLEAR
BLEND_OVERRIDE;
} else if(fill == 1)
draw_clear_alpha(fillClr, 1);
draw_surface_safe(_data[0], padding[2], padding[1]);
BLEND_NORMAL;
surface_reset_target();
}
} else if(mode == 1) {
_outSurf = surface_verify(_outSurf, dim[0], dim[1], cDep);
surface_set_target(_outSurf);
if(fill == 0) {
DRAW_CLEAR
BLEND_OVERRIDE;
} else if(fill == 1) {
draw_clear_alpha(fillClr, 1);
}
draw_surface_safe(_data[0], padding[2], padding[1]);
BLEND_NORMAL;
if(fill == 0) {
DRAW_CLEAR
BLEND_OVERRIDE;
} else if(fill == 1)
draw_clear_alpha(fillClr, 1);
var sx = 0;
var sy = 0;
switch(halign) {
case fa_left : sx = 0; break;
case fa_center : sx = (dim[0] - ww) / 2; break;
case fa_right : sx = dim[0] - ww; break;
}
switch(valign) {
case fa_top : sy = 0; break;
case fa_center : sy = (dim[1] - hh) / 2; break;
case fa_bottom: sy = dim[1] - hh; break;
}
draw_surface_safe(_data[0], sx, sy);
BLEND_NORMAL;
surface_reset_target();
}
return _outSurf;
}
}

View file

@ -1355,35 +1355,31 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
drag_sx = 0;
drag_sy = 0;
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
if(value_from != noone) return;
if(type != VALUE_TYPE.integer && type != VALUE_TYPE.float) return -1;
switch(type) {
case VALUE_TYPE.integer :
case VALUE_TYPE.float :
switch(display_type) {
case VALUE_DISPLAY._default :
var _angle = argument_count > 8? argument[ 8] : 0;
var _scale = argument_count > 9? argument[ 9] : 1;
var _spr = argument_count > 10? argument[10] : THEME.anchor_selector;
return preview_overlay_scalar(active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr);
switch(display_type) {
case VALUE_DISPLAY._default :
var _angle = argument_count > 8? argument[ 8] : 0;
var _scale = argument_count > 9? argument[ 9] : 1;
var _spr = argument_count > 10? argument[10] : THEME.anchor_selector;
return preview_overlay_scalar(value_from != noone, active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr);
case VALUE_DISPLAY.rotation :
var _rad = argument_count > 8? argument[ 8] : 64;
return preview_overlay_rotation(active, _x, _y, _s, _mx, _my, _snx, _sny, _rad);
case VALUE_DISPLAY.rotation :
var _rad = argument_count > 8? argument[ 8] : 64;
return preview_overlay_rotation(value_from != noone, active, _x, _y, _s, _mx, _my, _snx, _sny, _rad);
case VALUE_DISPLAY.vector :
var _spr = argument_count > 8? argument[8] : THEME.anchor_selector;
var _sca = argument_count > 9? argument[9] : 1;
return preview_overlay_vector(active, _x, _y, _s, _mx, _my, _snx, _sny, _spr);
case VALUE_DISPLAY.vector :
var _spr = argument_count > 8? argument[8] : THEME.anchor_selector;
var _sca = argument_count > 9? argument[9] : 1;
return preview_overlay_vector(value_from != noone, active, _x, _y, _s, _mx, _my, _snx, _sny, _spr);
case VALUE_DISPLAY.area :
return preview_overlay_area(active, _x, _y, _s, _mx, _my, _snx, _sny, display_data);
case VALUE_DISPLAY.area :
return preview_overlay_area(value_from != noone, active, _x, _y, _s, _mx, _my, _snx, _sny, display_data);
case VALUE_DISPLAY.puppet_control :
return preview_overlay_puppet(active, _x, _y, _s, _mx, _my, _snx, _sny);
}
break;
case VALUE_DISPLAY.puppet_control :
return preview_overlay_puppet(value_from != noone, active, _x, _y, _s, _mx, _my, _snx, _sny);
}
return -1;
}

View file

@ -500,10 +500,12 @@ function Panel_Preview() : PanelContent() constructor {
right_menu_y += string_height("l");
draw_text(w - ui(8), right_menu_y, "x" + string(canvas_s));
right_menu_y += string_height("l");
var mpx = floor((mx - canvas_x) / canvas_s);
var mpy = floor((my - canvas_y) / canvas_s);
draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]");
if(pHOVER) {
right_menu_y += string_height("l");
var mpx = floor((mx - canvas_x) / canvas_s);
var mpy = floor((my - canvas_y) / canvas_s);
draw_text(w - ui(8), right_menu_y, "[" + string(mpx) + ", " + string(mpy) + "]");
}
right_menu_y += string_height("l");

View file

@ -1,4 +1,4 @@
function preview_overlay_area_padding(active, _x, _y, _s, _mx, _my, _snx, _sny, display_data) {
function preview_overlay_area_padding(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, display_data) {
var _val = showValue();
var hover = -1;
@ -26,6 +26,8 @@ function preview_overlay_area_padding(active, _x, _y, _s, _mx, _my, _snx, _sny,
case AREA_SHAPE.elipse : draw_ellipse(x0, y0, x1, y1, true); break;
}
if(!interact) return -1;
draw_sprite_ui_uniform(THEME.anchor, 0, xc, yc);
draw_sprite_ui_uniform(THEME.anchor_solid_hori, 0, xc, y0,,,, 0);
draw_sprite_ui_uniform(THEME.anchor_solid_hori, 0, xc, y1,,,, 0);
@ -130,7 +132,7 @@ function preview_overlay_area_padding(active, _x, _y, _s, _mx, _my, _snx, _sny,
return hover;
}
function preview_overlay_area_two_point(active, _x, _y, _s, _mx, _my, _snx, _sny) {
function preview_overlay_area_two_point(interact, active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _val = showValue();
var hover = -1;
@ -154,6 +156,8 @@ function preview_overlay_area_two_point(active, _x, _y, _s, _mx, _my, _snx, _sny
case AREA_SHAPE.elipse : draw_ellipse(x0, y0, x1, y1, true); break;
}
if(!interact) return -1;
draw_sprite_ui_uniform(THEME.anchor, 1, xc, yc);
draw_sprite_ui_uniform(THEME.anchor_selector, 0, x0, y0);
draw_sprite_ui_uniform(THEME.anchor_selector, 0, x1, y1);
@ -236,7 +240,7 @@ function preview_overlay_area_two_point(active, _x, _y, _s, _mx, _my, _snx, _sny
return hover;
}
function preview_overlay_area_span(active, _x, _y, _s, _mx, _my, _snx, _sny) {
function preview_overlay_area_span(interact, active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _val = showValue();
var hover = -1;
@ -257,6 +261,8 @@ function preview_overlay_area_span(active, _x, _y, _s, _mx, _my, _snx, _sny) {
case AREA_SHAPE.elipse : draw_ellipse(_ax - _aw, _ay - _ah, _ax + _aw, _ay + _ah, true); break;
}
if(!interact) return -1;
draw_sprite_ui_uniform(THEME.anchor, 0, _ax, _ay);
draw_sprite_ui_uniform(THEME.anchor_selector, 0, _ax + _aw, _ay + _ah);
@ -331,19 +337,18 @@ function preview_overlay_area_span(active, _x, _y, _s, _mx, _my, _snx, _sny) {
return hover;
}
function preview_overlay_area(active, _x, _y, _s, _mx, _my, _snx, _sny, display_data) {
function preview_overlay_area(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, display_data) {
var _val = getValue();
var hover = -1;
if(is_array(_val[0])) return hover;
var mode = editWidget.mode;
if(mode == AREA_MODE.area)
hover = preview_overlay_area_span(active, _x, _y, _s, _mx, _my, _snx, _sny);
hover = preview_overlay_area_span(interact, active, _x, _y, _s, _mx, _my, _snx, _sny);
else if(mode == AREA_MODE.padding)
hover = preview_overlay_area_padding(active, _x, _y, _s, _mx, _my, _snx, _sny, display_data)
hover = preview_overlay_area_padding(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, display_data)
else if(mode == AREA_MODE.two_point)
hover = preview_overlay_area_two_point(active, _x, _y, _s, _mx, _my, _snx, _sny);
hover = preview_overlay_area_two_point(interact, active, _x, _y, _s, _mx, _my, _snx, _sny);
return hover;
}

View file

@ -1,4 +1,4 @@
function preview_overlay_puppet(active, _x, _y, _s, _mx, _my, _snx, _sny) {
function preview_overlay_puppet(interact, active, _x, _y, _s, _mx, _my, _snx, _sny) {
var _val = getValue();
var hover = -1;
if(is_array(_val[0])) return hover;
@ -167,7 +167,7 @@ function preview_overlay_puppet(active, _x, _y, _s, _mx, _my, _snx, _sny) {
}
}
if(point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
draw_sprite_ui_uniform(THEME.anchor_selector, 1, _ax, _ay);
if(mouse_press(mb_left, active)) {
@ -179,7 +179,7 @@ function preview_overlay_puppet(active, _x, _y, _s, _mx, _my, _snx, _sny) {
}
}
if(_val[PUPPET_CONTROL.mode] == PUPPET_FORCE_MODE.move && point_in_circle(_mx, _my, _ax1, _ay1, 8)) {
if(interact && _val[PUPPET_CONTROL.mode] == PUPPET_FORCE_MODE.move && point_in_circle(_mx, _my, _ax1, _ay1, 8)) {
hover = 2;
draw_sprite_ui_uniform(THEME.anchor_selector, 0, _ax1, _ay1);
if(mouse_press(mb_left, active)) {

View file

@ -1,4 +1,4 @@
function preview_overlay_rotation(active, _x, _y, _s, _mx, _my, _snx, _sny, _rad) {
function preview_overlay_rotation(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, _rad) {
var _val = getValue();
var hover = -1;
if(is_array(_val)) return hover;
@ -27,7 +27,7 @@ function preview_overlay_rotation(active, _x, _y, _s, _mx, _my, _snx, _sny, _rad
}
}
if(point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
draw_set_color(COLORS._main_accent);
draw_set_alpha(0.5);
draw_circle(_x, _y, _rad, true);

View file

@ -1,4 +1,4 @@
function preview_overlay_scalar(active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr) {
function preview_overlay_scalar(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, _angle, _scale, _spr) {
var _val = getValue();
var hover = -1;
if(is_array(_val)) return hover;
@ -25,7 +25,7 @@ function preview_overlay_scalar(active, _x, _y, _s, _mx, _my, _snx, _sny, _angle
}
}
if(point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
index = 1;
if(mouse_press(mb_left, active)) {

View file

@ -1,4 +1,4 @@
function preview_overlay_vector(active, _x, _y, _s, _mx, _my, _snx, _sny, _spr) {
function preview_overlay_vector(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, _spr) {
var _val = getValue();
var hover = -1;
if(is_array(_val[0])) return hover;
@ -32,7 +32,7 @@ function preview_overlay_vector(active, _x, _y, _s, _mx, _my, _snx, _sny, _spr)
}
}
if(point_in_circle(_mx, _my, _ax, _ay, 8)) {
if(interact && point_in_circle(_mx, _my, _ax, _ay, 8)) {
hover = 1;
draw_sprite_ui_uniform(_spr, 1, _ax, _ay);
if(mouse_press(mb_left, active)) {

View file

@ -9,6 +9,7 @@ function string_decimal(str) {
return (neg? "-" : "") + (dec? string_digits(pre) + "." + string_digits(pos) : string_digits(str));
}
gml_pragma("forceinline");
function toNumber(str) {
if(is_real(str)) return str;