mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
1.17.1.1
This commit is contained in:
parent
394549d490
commit
6bf7646951
10 changed files with 46 additions and 12 deletions
|
@ -51,6 +51,8 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
|
|||
y = _y;
|
||||
w = _w;
|
||||
|
||||
right_click_block = true;
|
||||
|
||||
var _bs = min(_h, ui(32));
|
||||
hovering = hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
|
||||
|
||||
|
@ -129,6 +131,7 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
|
|||
var _cw = _w - ui(4);
|
||||
var _ch = h - _ggh - ui(4 + 2);
|
||||
var _ks = ui(16);
|
||||
var _hv = noone;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.menu_button_mask, 0, _ggx, _cy, _ggw, _ch, CDEF.main_mdblack, 1);
|
||||
|
||||
|
@ -154,6 +157,7 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
|
|||
|
||||
if(hover && point_in_rectangle(_m[0], _m[1], _kx - _ks / 2, _ky - _ks / 2, _kx + _ks / 2, _ky + _ks / 2)) {
|
||||
_ka = 1;
|
||||
_hv = _k;
|
||||
|
||||
if(mouse_press(mb_left, active)) {
|
||||
drag_color_index = _k;
|
||||
|
@ -174,6 +178,28 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
|
|||
BLEND_NORMAL
|
||||
}
|
||||
}
|
||||
|
||||
if(_hv != noone) {
|
||||
right_click_block = false;
|
||||
if(array_length(_gradient.keys) > 1 && mouse_press(mb_right, active)) {
|
||||
array_remove(_gradient.keys, _hv);
|
||||
_gradient.refresh();
|
||||
apply(_gradient);
|
||||
}
|
||||
|
||||
} else if(point_in_rectangle(_m[0], _m[1], _ggx, _cy, _ggx + _ggw, _cy + _ch)) {
|
||||
if(mouse_press(mb_left, active)) {
|
||||
var _ti = clamp((_m[0] - _ggx) / _ggw, 0, 1);
|
||||
var _va = _gradient.eval(_ti);
|
||||
var _nk = new gradientKey(_ti, _va);
|
||||
|
||||
_gradient.add(_nk);
|
||||
|
||||
drag_color_index = _nk;
|
||||
edit_color_mx = _m[0];
|
||||
edit_color_sx = _ti;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(drag_color_index != -1) {
|
||||
|
|
|
@ -125,6 +125,8 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
|
|||
var _cy = _y + _pph + ui(4);
|
||||
var _cw = _w - ui(4);
|
||||
var _ch = h - _pph - ui(4 + 2);
|
||||
var _pd = ui(2);
|
||||
var _pd2 = _pd / 2;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.menu_button_mask, 0, _cx, _cy, _cw, _ch, CDEF.main_mdblack, 1);
|
||||
|
||||
|
@ -135,11 +137,11 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
|
|||
var _ccw = _cw;
|
||||
var _cch = _colr_h;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.palette_mask, 1, _ccx + ui(2), _ccy + ui(2), _ccw - ui(4), _cch - ui(4), _c, 1);
|
||||
draw_sprite_stretched_ext(THEME.palette_mask, 1, _ccx + _pd2, _ccy + _pd2, _ccw - _pd, _cch - _pd, _c, 1);
|
||||
|
||||
if(hover && point_in_rectangle(_m[0], _m[1], _ccx, _ccy, _ccx + _ccw, _ccy + _cch - 1)) {
|
||||
BLEND_ADD
|
||||
draw_sprite_stretched_ext(THEME.menu_button_mask, 1, _ccx + ui(2), _ccy + ui(2), _ccw - ui(4), _cch - ui(4), c_white, .3);
|
||||
draw_sprite_stretched_ext(THEME.menu_button_mask, 1, _ccx + _pd2, _ccy + _pd2, _ccw - _pd, _cch - _pd, c_white, .3);
|
||||
BLEND_NORMAL
|
||||
|
||||
if(mouse_press(mb_left, active))
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||
|
||||
LATEST_VERSION = 11700;
|
||||
VERSION = 11710;
|
||||
VERSION = 11711;
|
||||
SAVE_VERSION = 11690;
|
||||
VERSION_STRING = "1.17.1.0";
|
||||
BUILD_NUMBER = 11710;
|
||||
VERSION_STRING = "1.17.1.1";
|
||||
BUILD_NUMBER = 11711;
|
||||
|
||||
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
||||
HOTKEYS = ds_map_create();
|
||||
|
|
|
@ -332,7 +332,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
case VALUE_TYPE.surface :
|
||||
param.h = breakLine? ui(96) : ui(48);
|
||||
break;
|
||||
|
||||
|
||||
case VALUE_TYPE.curve :
|
||||
param.h = breakLine? ui(160) : ui(100);
|
||||
if(point_in_rectangle(_m[0], _m[1], ui(32), _hsy, ui(32) + ww - ui(16), _hsy + param.h))
|
||||
|
@ -342,6 +342,8 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
|
||||
var _widH = wid.drawParam(param) ?? 0;
|
||||
widH = _widH - (TEXTBOX_HEIGHT * !breakLine);
|
||||
|
||||
mbRight &= wid.right_click_block;
|
||||
#endregion
|
||||
} else if(jun.display_type == VALUE_DISPLAY.label) { #region label
|
||||
draw_set_text(f_p1, fa_left, fa_top, COLORS._main_text_sub);
|
||||
|
|
|
@ -128,8 +128,6 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
|
||||
txt = $"{rn}";
|
||||
}
|
||||
|
||||
txt += string(rn);
|
||||
|
||||
if(_hover && point_in_rectangle(_m[0], _m[1], _x + 8, _yy, _x + _w - 8, _yy + hh)) {
|
||||
draw_sprite_stretched_ext(THEME.timeline_node, 0, _x + 8, _tgy, _w - 16, _tgh, c_white, 0.1);
|
||||
|
@ -226,12 +224,12 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
|
||||
read_ase(path, content);
|
||||
|
||||
layers = [];
|
||||
layers = [];
|
||||
var vis = attributes.layer_visible;
|
||||
var frames = content[? "Frames"];
|
||||
|
||||
for( var i = 0, n = array_length(frames); i < n; i++ ) {
|
||||
var frame = frames[i];
|
||||
var frame = frames[i];
|
||||
var chunks = frame[? "Chunks"];
|
||||
|
||||
for( var j = 0; j < array_length(chunks); j++ ) {
|
||||
|
@ -255,11 +253,13 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const
|
|||
array_push(p_arr, make_color_rgb(plt[k][0], plt[k][1], plt[k][2]));
|
||||
outputs[| 3].setValue(p_arr);
|
||||
break;
|
||||
|
||||
case 0x2004: //layer
|
||||
var name = chunk[? "Name"];
|
||||
array_push(layers, new ase_layer(name));
|
||||
array_push(vis, true);
|
||||
break;
|
||||
|
||||
case 0x2005: //cel
|
||||
var _layer = chunk[? "Layer index"];
|
||||
var cel = new ase_cel(layers[_layer], chunk, content);
|
||||
|
|
|
@ -726,7 +726,7 @@ function __initNodes() {
|
|||
addNodeObject(generator, "Grid", s_node_grid, "Node_Grid", [1, Node_Grid], ["tile"], "Generate grid pattern.");
|
||||
addNodeObject(generator, "Triangular Grid", s_node_grid_tri, "Node_Grid_Tri", [1, Node_Grid_Tri],, "Generate triangular grid pattern.");
|
||||
addNodeObject(generator, "Hexagonal Grid", s_node_grid_hex, "Node_Grid_Hex", [1, Node_Grid_Hex],, "Generate hexagonal grid pattern.");
|
||||
addNodeObject(generator, "Pentagonal Grid", s_node_grid_pentagonal, "Node_Grid_Pentagonal", [1, Node_Grid_Pentagonal],, "Generate Pentagonal grid pattern.").patreonExtra();
|
||||
addNodeObject(generator, "Pentagonal Grid", s_node_grid_pentagonal, "Node_Grid_Pentagonal", [1, Node_Grid_Pentagonal],, "Generate Pentagonal grid pattern.").patreonExtra();
|
||||
addNodeObject(generator, "Pytagorean Tile", s_node_pytagorean_tile, "Node_Pytagorean_Tile", [1, Node_Pytagorean_Tile],, "Generate Pytagorean tile pattern.").patreonExtra();
|
||||
addNodeObject(generator, "Herringbone Tile", s_node_herringbone_tile, "Node_Herringbone_Tile", [1, Node_Herringbone_Tile],, "Generate Herringbone tile pattern.").patreonExtra();
|
||||
addNodeObject(generator, "Random Tile", s_node_random_tile, "Node_Random_Tile", [1, Node_Random_Tile],, "Generate Random tile pattern.").patreonExtra();
|
||||
|
|
|
@ -873,7 +873,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
break; #endregion
|
||||
}
|
||||
|
||||
if(struct_has(display_data, "side_button") && editWidget.side_button == noone)
|
||||
if(is_struct(display_data) && struct_has(display_data, "side_button") && editWidget.side_button == noone)
|
||||
editWidget.side_button = display_data.side_button;
|
||||
|
||||
editWidgetRaw = editWidget;
|
||||
|
|
|
@ -149,6 +149,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
menuItem(__txtx("panel_menu_render_all_nodes", "Render all nodes"), function() {
|
||||
RENDER_ALL_REORDER
|
||||
}, [ THEME.sequence_control, 1 ], ["", "Render all"]),
|
||||
|
||||
menuItem(__txtx("panel_menu_execute_exports", "Execute all export nodes"), function() {
|
||||
var key = ds_map_find_first(PROJECT.nodeMap);
|
||||
repeat(ds_map_size(PROJECT.nodeMap)) {
|
||||
|
|
|
@ -72,6 +72,7 @@
|
|||
|
||||
PREFERENCES.panel_preview_dragging = MOD_KEY.alt;
|
||||
PREFERENCES.panel_preview_show_real_fps = false;
|
||||
// PREFERENCES.panel_preview_tran_colors = [ ];
|
||||
|
||||
PREFERENCES.panel_menu_resource_monitor = false;
|
||||
PREFERENCES.panel_menu_right_control = os_type == os_windows;
|
||||
|
|
|
@ -7,6 +7,8 @@ function widget() constructor {
|
|||
parent = noone;
|
||||
interactable = true;
|
||||
|
||||
right_click_block = true;
|
||||
|
||||
side_button = noone;
|
||||
front_button = noone;
|
||||
|
||||
|
|
Loading…
Reference in a new issue