mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 22:24:48 +01:00
[AreaBox] Fix converting to padding type swap left and right values.
This commit is contained in:
parent
57dfbc66dd
commit
3e30c496a5
9 changed files with 31 additions and 36 deletions
Binary file not shown.
|
@ -159,9 +159,9 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
|||
break;
|
||||
|
||||
case AREA_MODE.padding :
|
||||
onModify(x0, 0);
|
||||
onModify(ss[0] - x1, 0);
|
||||
onModify(y0, 1);
|
||||
onModify(ss[0] - x1, 2);
|
||||
onModify(x0, 2);
|
||||
onModify(ss[1] - y1, 3);
|
||||
break;
|
||||
|
||||
|
@ -232,6 +232,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
|||
onModify(cnvt? 0.5 : ss[0] / 2, 2);
|
||||
onModify(cnvt? 0.5 : ss[1] / 2, 3);
|
||||
break;
|
||||
|
||||
case AREA_MODE.padding :
|
||||
var ss = onSurfaceSize();
|
||||
onModify(0, 0);
|
||||
|
@ -239,6 +240,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
|
|||
onModify(0, 2);
|
||||
onModify(0, 3);
|
||||
break;
|
||||
|
||||
case AREA_MODE.two_point :
|
||||
var ss = onSurfaceSize();
|
||||
onModify(0, 0);
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
LATEST_VERSION = 1_18_00_0;
|
||||
VERSION = 1_18_09_0;
|
||||
SAVE_VERSION = 1_18_09_1;
|
||||
VERSION_STRING = MAC? "1.18.003m" : "1.18.9.1.001";
|
||||
BUILD_NUMBER = 118091.001;
|
||||
VERSION_STRING = MAC? "1.18.003m" : "1.18.10.001";
|
||||
BUILD_NUMBER = 118101.001;
|
||||
PREF_VERSION = 1_17_1;
|
||||
|
||||
var _vsp = string_split(VERSION_STRING, ".");
|
||||
|
|
|
@ -345,6 +345,11 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
|||
|
||||
if(will_refresh) refreshNodes();
|
||||
doStepBegin();
|
||||
|
||||
if(toRefreshNodeDisplay) {
|
||||
refreshNodeDisplay();
|
||||
toRefreshNodeDisplay = false;
|
||||
}
|
||||
}
|
||||
|
||||
static step = function() {
|
||||
|
|
|
@ -792,7 +792,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
inputDisplayList = [];
|
||||
|
||||
var iamo = getInputAmount();
|
||||
if(iamo && input_display_dynamic != -1) {
|
||||
if(input_display_dynamic != -1 && iamo) {
|
||||
|
||||
for(var i = 0; i < array_length(input_display_list_raw); i++) {
|
||||
var ind = input_display_list_raw[i];
|
||||
|
@ -823,7 +823,6 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
|
||||
} else {
|
||||
var amo = input_display_list == -1? array_length(inputs) : array_length(input_display_list);
|
||||
// print($"Amo = {amo}");
|
||||
|
||||
for(var i = 0; i < amo; i++) {
|
||||
var ind = getInputJunctionIndex(i);
|
||||
|
@ -831,21 +830,13 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
|
||||
var jun = array_safe_get(inputs, ind, noone);
|
||||
if(jun == noone || is_undefined(jun)) continue;
|
||||
|
||||
// print($"{i}: {jun.isVisible()}");
|
||||
// print($" {jun.visible_manual}, {jun.visible}, {jun.index}, {jun.visible_in_list}");
|
||||
|
||||
if(!jun.isVisible()) continue;
|
||||
|
||||
array_push(inputDisplayList, jun);
|
||||
}
|
||||
|
||||
// print($"{inputDisplayList}\n");
|
||||
}
|
||||
|
||||
if(auto_input && dummy_input) array_push(inputDisplayList, dummy_input);
|
||||
|
||||
// print(inputDisplayList);
|
||||
}
|
||||
|
||||
static onValidate = function() {
|
||||
|
@ -1467,6 +1458,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
|
|||
}
|
||||
|
||||
static refreshNodeDisplay = function() {
|
||||
|
||||
updateIO();
|
||||
setHeight();
|
||||
getJunctionList();
|
||||
|
|
|
@ -115,7 +115,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
|
||||
newInput(12, nodeValue_Vec2("Gizmo Position", self, [ 0, 0 ]));
|
||||
|
||||
newInput(13, nodeValue_Vec2("Gizmo Scale", self, 1));
|
||||
newInput(13, nodeValue_Float("Gizmo Scale", self, 1));
|
||||
|
||||
inputs[10].setFrom_condition = function(_valueFrom) {
|
||||
if(is_instanceof(_valueFrom.node, Node_Group_Input)) return true;
|
||||
|
@ -246,14 +246,7 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
case 7 : _vis = _val <= _vto; break;
|
||||
}
|
||||
|
||||
var _v = inParent.visible;
|
||||
if(_v && !_vis) inParent.visible = false;
|
||||
inParent.show_in_inspector = _vis;
|
||||
|
||||
if(_v != _vis) {
|
||||
group.setHeight();
|
||||
group.getJunctionList();
|
||||
}
|
||||
inParent.setVisible(_vis, _vis);
|
||||
}
|
||||
|
||||
static onValueUpdate = function(index = 0) {
|
||||
|
@ -495,6 +488,8 @@ function Node_Group_Input(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
__data = noone;
|
||||
|
||||
static update = function(frame = CURRENT_FRAME) {
|
||||
visibleCheck();
|
||||
|
||||
if(!is(inParent, NodeValue)) return;
|
||||
outputs[0].setValue(inParent.getValue());
|
||||
|
||||
|
|
|
@ -205,6 +205,18 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
|
||||
}
|
||||
|
||||
if(_posMode == 0) {
|
||||
hv = inputs[3].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
|
||||
} else if(_posMode == 1) {
|
||||
_px = _x + _pos[0] * _s;
|
||||
_py = _y + _pos[1] * _s;
|
||||
|
||||
hv = inputs[16].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
hv = inputs[17].drawOverlay(_int, active, _px, _py, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
|
||||
}
|
||||
|
||||
if(inputs[9].show_in_inspector && _posMode != 2) { // corner
|
||||
var _px = _x + _pos[0] * _s;
|
||||
var _py = _y + _pos[1] * _s;
|
||||
|
@ -234,18 +246,6 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
hv = inputs[9].drawOverlay(_int, active, _x0, _y0, _s, _mx, _my, _snx, _sny, aa, _max_s, 1); _hov |= hv; _int &= !_hov;
|
||||
}
|
||||
|
||||
if(_posMode == 0) {
|
||||
hv = inputs[3].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
|
||||
} else if(_posMode == 1) {
|
||||
_px = _x + _pos[0] * _s;
|
||||
_py = _y + _pos[1] * _s;
|
||||
|
||||
hv = inputs[16].drawOverlay(_int, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
hv = inputs[17].drawOverlay(_int, active, _px, _py, _s, _mx, _my, _snx, _sny); _hov |= hv; _int &= !_hov;
|
||||
|
||||
}
|
||||
|
||||
return _hov;
|
||||
}
|
||||
|
||||
|
|
|
@ -558,6 +558,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
}
|
||||
|
||||
if(value_from) return true;
|
||||
if(!show_in_inspector) return false;
|
||||
if(visible_manual != 0) return visible_manual == 1;
|
||||
if(!visible) return false;
|
||||
if(index == -1) return true;
|
||||
|
|
|
@ -856,7 +856,7 @@ function Panel_Animation() : PanelContent() constructor {
|
|||
}
|
||||
}
|
||||
|
||||
if(pHOVER && point_in_rectangle(mx, my, bar_x, 8, bar_x + bar_w, 8 + 16)) { //top bar
|
||||
if(pHOVER && point_in_rectangle(mx, my, bar_x, ui(8), bar_x + bar_w, ui(8 + 16))) { //top bar
|
||||
if(mx < bar_int_x && mouse_press(mb_left, pFOCUS) && timeline_draggable) {
|
||||
timeline_scubbing = true;
|
||||
timeline_scub_st = CURRENT_FRAME;
|
||||
|
|
Loading…
Add table
Reference in a new issue