mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 06:23:55 +01:00
- [Graph Panel] Fix junction not updating its initial position when a node is created while playing.
This commit is contained in:
parent
57118535eb
commit
687013714d
@ -600,7 +600,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||||||
return output_display_list[index];
|
return output_display_list[index];
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static updateIO = function() { #region
|
static updateIO = function() {
|
||||||
for( var i = 0, n = ds_list_size(inputs); i < n; i++ )
|
for( var i = 0, n = ds_list_size(inputs); i < n; i++ )
|
||||||
inputs[| i].visible_in_list = false;
|
inputs[| i].visible_in_list = false;
|
||||||
|
|
||||||
@ -621,7 +621,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||||||
|
|
||||||
outputs_amount = output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list);
|
outputs_amount = output_display_list == -1? ds_list_size(outputs) : array_length(output_display_list);
|
||||||
outputs_index = array_create_ext(outputs_amount, function(index) { return getOutputJunctionIndex(index); });
|
outputs_index = array_create_ext(outputs_amount, function(index) { return getOutputJunctionIndex(index); });
|
||||||
} #endregion
|
} run_in(1, function() /*=>*/ { updateIO() });
|
||||||
|
|
||||||
static setHeight = function() { #region
|
static setHeight = function() { #region
|
||||||
w = show_parameter? attributes.node_param_width : min_w;
|
w = show_parameter? attributes.node_param_width : min_w;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$GMScript":"v1",
|
"$GMScript":"",
|
||||||
"%Name":"node_data",
|
"%Name":"node_data",
|
||||||
"isCompatibility":false,
|
"isCompatibility":false,
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
|
@ -107,7 +107,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||||||
static onValueFromUpdate = function() { _inSurf = noone; }
|
static onValueFromUpdate = function() { _inSurf = noone; }
|
||||||
static onValueUpdate = function() { _inSurf = noone; }
|
static onValueUpdate = function() { _inSurf = noone; }
|
||||||
|
|
||||||
function getSpritePosition(index) { #region
|
function getSpritePosition(index) {
|
||||||
var _dim = curr_dim;
|
var _dim = curr_dim;
|
||||||
var _off = curr_off;
|
var _off = curr_off;
|
||||||
var _spa = surf_space;
|
var _spa = surf_space;
|
||||||
@ -131,9 +131,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||||||
var _y = _off[1] + _irow * (_dim[1] + _spa[1]);
|
var _y = _off[1] + _irow * (_dim[1] + _spa[1]);
|
||||||
|
|
||||||
return [ _x, _y ];
|
return [ _x, _y ];
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
var _inSurf = getInputData(0);
|
var _inSurf = getInputData(0);
|
||||||
if(!is_surface(_inSurf)) return;
|
if(!is_surface(_inSurf)) return;
|
||||||
|
|
||||||
@ -281,18 +281,18 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static step = function() { #region
|
static step = function() {
|
||||||
var _out = getInputData(7);
|
var _out = getInputData(7);
|
||||||
var _flty = getInputData(13);
|
var _flty = getInputData(13);
|
||||||
|
|
||||||
inputs[| 11].setVisible(!_out);
|
inputs[| 11].setVisible(!_out);
|
||||||
inputs[| 8].setVisible(!_out);
|
inputs[| 8].setVisible(!_out);
|
||||||
inputs[| 14].setVisible(_flty);
|
inputs[| 14].setVisible(_flty);
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static spliceSprite = function() { #region
|
static spliceSprite = function() {
|
||||||
var _inSurf = getInputData(0);
|
var _inSurf = getInputData(0);
|
||||||
if(!is_surface(_inSurf)) return;
|
if(!is_surface(_inSurf)) return;
|
||||||
|
|
||||||
@ -410,9 +410,9 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||||||
|
|
||||||
if(_out == 1) outputs[| 0].setValue(surf_array);
|
if(_out == 1) outputs[| 0].setValue(surf_array);
|
||||||
outputs[| 1].setValue(atls_array);
|
outputs[| 1].setValue(atls_array);
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) {
|
||||||
spliceSprite();
|
spliceSprite();
|
||||||
|
|
||||||
var _out = getInputData(7);
|
var _out = getInputData(7);
|
||||||
@ -428,5 +428,5 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||||||
var ind = safe_mod(CURRENT_FRAME * _spd, array_length(surf_array));
|
var ind = safe_mod(CURRENT_FRAME * _spd, array_length(surf_array));
|
||||||
outputs[| 0].setValue(array_safe_get_fast(surf_array, ind));
|
outputs[| 0].setValue(array_safe_get_fast(surf_array, ind));
|
||||||
}
|
}
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user