diff --git a/scripts/collection_data/collection_data.gml b/scripts/collection_data/collection_data.gml index ebc4ad277..608c8e1f3 100644 --- a/scripts/collection_data/collection_data.gml +++ b/scripts/collection_data/collection_data.gml @@ -22,14 +22,13 @@ function refreshCollections() { COLLECTIONS.open = true; } -function searchCollection(_list, _search_str, _clear_list = true) { +function searchCollection(_list, _search_str, _toList = true) { if(_search_str == "") return; var search_lower = string_lower(_search_str); var st = ds_stack_create(); - var ll = ds_priority_create(); + var ll = _toList? ds_priority_create() : _list; - ds_list_clear(_list); ds_stack_push(st, COLLECTIONS); while(!ds_stack_empty(st)) { @@ -47,10 +46,13 @@ function searchCollection(_list, _search_str, _clear_list = true) { ds_stack_push(st, _st.subDir[| i]); } - repeat(ds_priority_size(ll)) - ds_list_add(_list, ds_priority_delete_max(ll)); + if(_toList) { + repeat(ds_priority_size(ll)) + ds_list_add(_list, ds_priority_delete_max(ll)); + + ds_priority_destroy(ll); + } - ds_priority_destroy(ll); ds_stack_destroy(st); } diff --git a/scripts/color_function/color_function.gml b/scripts/color_function/color_function.gml index 393af4ff2..843bcb10e 100644 --- a/scripts/color_function/color_function.gml +++ b/scripts/color_function/color_function.gml @@ -2,6 +2,8 @@ function cola(color, alpha = 1) { INLINE return int64((color & 0xFFFFFF) + (round(alpha * 255) << 24)); } function _cola(color, alpha) { INLINE return int64((color & 0xFFFFFF) + (alpha << 24)); } + function color_real(color) { INLINE return make_color_rgb(color_get_red(color), color_get_green(color), color_get_blue(color)); } + function color_get_alpha(color) { INLINE return (color & (0xFF << 24)) >> 24; } function _color_get_alpha(color) { INLINE return color_get_alpha(color) / 255; } diff --git a/scripts/node_pin/node_pin.gml b/scripts/node_pin/node_pin.gml index 485273964..20a395b1f 100644 --- a/scripts/node_pin/node_pin.gml +++ b/scripts/node_pin/node_pin.gml @@ -18,6 +18,20 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { newOutput(0, nodeValue_Output("Out", self, VALUE_TYPE.any, 0)); + inputs[0].setColor = function(_color) { + inputs[0].color = color_real(_color); outputs[0].color = color_real(_color); + inputs[0].updateColor(); outputs[0].updateColor(); + + return inputs[0]; + } + + outputs[0].setColor = function(_color) { + inputs[0].color = color_real(_color); outputs[0].color = color_real(_color); + inputs[0].updateColor(); outputs[0].updateColor(); + + return outputs[0]; + } + static update = function() { if(inputs[0].value_from != noone) { diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 1a67cd523..b05a64c26 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -1800,7 +1800,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru /////============= DRAW ============= static setColor = function(_color) { - color = _color; + color = color_real(_color); updateColor(); return self; } @@ -2505,6 +2505,8 @@ function drawJuncConnection(from, to, params) { break; } } + + draw_set_alpha(1); #endregion return hovering; diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index c4ad8992d..032bb2e9f 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -171,7 +171,7 @@ for( var i = 0, n = array_length(_clrs); i < n; i++ ) { _item[i] = [ [ THEME.timeline_color, i > 0, _clrs[i] ], - function(_data) { PANEL_GRAPH.setSelectingNodeColor(_data.color); }, "", { color: i == 0? -1 : _clrs[i] } + function(_data) /*=>*/ { PANEL_GRAPH.setSelectingNodeColor(_data.color); }, "", { color: i == 0? -1 : _clrs[i] } ]; } @@ -188,7 +188,7 @@ for( var i = 0, n = array_length(_clrs); i < n; i++ ) { _item[i] = [ [ THEME.timeline_color, i > 0, _clrs[i] ], - function(_data) { PANEL_GRAPH.setSelectingJuncColor(_data.color); }, "", { color: i == 0? -1 : _clrs[i] } + function(_data) /*=>*/ { PANEL_GRAPH.setSelectingJuncColor(_data.color); }, "", { color: i == 0? -1 : _clrs[i] } ]; } @@ -751,7 +751,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { array_foreach(nodes_selecting, function(node) { node.attributes.color = __temp_color; }); } - function setSelectingJuncColor(color) { + function setSelectingJuncColor(color) { if(__junction_hovering == noone) return; __junction_hovering.setColor(color);