mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-24 20:08:04 +01:00
array cactch
This commit is contained in:
parent
93e95d5a81
commit
c65e5bfef0
4 changed files with 17 additions and 14 deletions
|
@ -378,10 +378,10 @@ event_inherited();
|
|||
var _cont = PANEL_GRAPH.getCurrentContext();
|
||||
if(_cont != noone) array_append(sug, nodeReleatedQuery("context", instanceof(_cont)));
|
||||
|
||||
if(array_length(sug)) {
|
||||
if(!array_empty(sug)) {
|
||||
ds_list_add(_list, "Related");
|
||||
for( var i = 0, n = array_length(sug); i < n; i++ )
|
||||
ds_list_add(_list, ALL_NODES[? sug[i]]);
|
||||
ds_list_add(_list, ALL_NODES[? array_safe_get(sug, i)]);
|
||||
}
|
||||
|
||||
ds_list_add(_list, "Favourites");
|
||||
|
|
|
@ -1256,6 +1256,16 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
updateColor();
|
||||
} resetDisplay(); #endregion
|
||||
|
||||
static setColor = function(col) { #region
|
||||
color = col;
|
||||
updateColor();
|
||||
|
||||
if(value_from != noone)
|
||||
value_from.setColor(col);
|
||||
|
||||
return self;
|
||||
} #endregion
|
||||
|
||||
static updateColor = function(val = undefined) { #region
|
||||
INLINE
|
||||
|
||||
|
|
|
@ -439,7 +439,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
if(node_hover) node_hover.attributes.color = __temp_color;
|
||||
array_foreach(nodes_selecting, function(node) { node.attributes.color = __temp_color; });
|
||||
}
|
||||
|
||||
|
||||
var _clrs = COLORS.labels;
|
||||
var _item = array_create(array_length(_clrs));
|
||||
|
||||
|
@ -470,10 +470,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
|
||||
function setSelectingJuncColor(color) {
|
||||
if(__junction_hovering == noone) return;
|
||||
__junction_hovering.color = color;
|
||||
|
||||
if(__junction_hovering.value_from != noone)
|
||||
__junction_hovering.value_from.color = color;
|
||||
__junction_hovering.setColor(color);
|
||||
|
||||
for(var i = 0; i < array_length(nodes_selecting); i++) {
|
||||
var _node = nodes_selecting[i];
|
||||
|
@ -481,9 +478,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
for( var j = 0, m = ds_list_size(_node.inputs); j < m; j++ ) {
|
||||
var _input = _node.inputs[| j];
|
||||
if(_input.isLeaf()) continue;
|
||||
|
||||
_input.color = color;
|
||||
_input.value_from.color = color;
|
||||
_input.setColor(color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,13 +142,11 @@ function Panel_Inspector() : PanelContent() constructor {
|
|||
function setSelectingItemColor(color) {
|
||||
if(__dialog_junction == noone) return;
|
||||
|
||||
__dialog_junction.color = color;
|
||||
__dialog_junction.setColor(color);
|
||||
|
||||
if(__dialog_junction.value_from != noone)
|
||||
__dialog_junction.value_from.color = color;
|
||||
var _val_to = __dialog_junction.getJunctionTo();
|
||||
for( var i = 0, n = array_length(_val_to); i < n; i++ )
|
||||
_val_to[i].color = color;
|
||||
_val_to[i].setColor(color);
|
||||
}
|
||||
|
||||
var _clrs = COLORS.labels;
|
||||
|
|
Loading…
Reference in a new issue