mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 14:36:13 +01:00
Remove active bar, graph color based on context color.
This commit is contained in:
parent
5234bccba0
commit
1466694a77
4 changed files with 4 additions and 42 deletions
|
@ -584,18 +584,15 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
|||
} #endregion
|
||||
|
||||
static attributeSerialize = function() { #region
|
||||
var att = {};
|
||||
var att = variable_clone(attributes);
|
||||
att.separator = json_stringify(attributes.separator);
|
||||
att.w = attributes.w;
|
||||
att.h = attributes.h;
|
||||
return att;
|
||||
} #endregion
|
||||
|
||||
static attributeDeserialize = function(attr) { #region
|
||||
attributes = attr;
|
||||
if(struct_has(attr, "separator"))
|
||||
attributes.separator = json_parse(attr.separator);
|
||||
attributes.w = struct_try_get(attr, "w", 128);
|
||||
attributes.h = struct_try_get(attr, "h", 128);
|
||||
} #endregion
|
||||
|
||||
}
|
|
@ -140,7 +140,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
#endregion
|
||||
|
||||
#region --- attributes ----
|
||||
attributes = {
|
||||
attributes = {
|
||||
update_graph: true,
|
||||
show_update_trigger: false,
|
||||
color: -1,
|
||||
|
|
|
@ -1611,41 +1611,6 @@ function Panel_Animation() : PanelContent() constructor {
|
|||
|
||||
var _node = _cont.node;
|
||||
|
||||
if(_node.active_index > -1) { #region draw active region
|
||||
var active_inp = _node.inputs[| _node.active_index];
|
||||
var node_y = _cont.y + ui(2);
|
||||
|
||||
var ot = 0, ov = true;
|
||||
var x0 = 0, x1 = 0;
|
||||
|
||||
for( var j = 0; j < ds_list_size(active_inp.animator.values); j++ ) {
|
||||
var k = active_inp.animator.values[| j];
|
||||
|
||||
var t = k.time;
|
||||
var v = k.value;
|
||||
|
||||
if(t > ot && ov) {
|
||||
x0 = (ot + 1) * ui(timeline_scale) + timeline_shift;
|
||||
x1 = ( t + 1) * ui(timeline_scale) + timeline_shift;
|
||||
var aa = 0.25;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, x0, node_y - ui(4), x1 - x0, ui(8), _node.dopesheet_color, aa);
|
||||
}
|
||||
|
||||
ot = t;
|
||||
ov = v;
|
||||
}
|
||||
|
||||
t = TOTAL_FRAMES - 1;
|
||||
if(t > ot && ov) {
|
||||
x0 = (ot + 1) * ui(timeline_scale) + timeline_shift;
|
||||
x1 = ( t + 1) * ui(timeline_scale) + timeline_shift;
|
||||
var aa = 0.25;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, x0, node_y - ui(4), x1 - x0, ui(8), _node.dopesheet_color, aa);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
if(_cont.item.show)
|
||||
for( var j = 0, m = array_length(_cont.props); j < m; j++ ) {
|
||||
var prop = _cont.props[j];
|
||||
|
|
|
@ -1556,7 +1556,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
dragGraph();
|
||||
|
||||
var context = getCurrentContext();
|
||||
bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.color, 0.05);
|
||||
bg_color = context == noone? COLORS.panel_bg_clear : merge_color(COLORS.panel_bg_clear, context.getColor(), 0.05);
|
||||
draw_clear(bg_color);
|
||||
drawGrid();
|
||||
|
||||
|
|
Loading…
Reference in a new issue