0.10.2 update

This commit is contained in:
MakhamDev 2022-11-14 09:16:15 +07:00
parent ac92032cb1
commit dfa0d82620
83 changed files with 875 additions and 392 deletions

View file

@ -142,6 +142,7 @@
{"id":{"name":"node_color_from_rgb","path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",},"order":5,},
{"id":{"name":"node_transform","path":"scripts/node_transform/node_transform.yy",},"order":0,},
{"id":{"name":"curveBox","path":"scripts/curveBox/curveBox.yy",},"order":8,},
{"id":{"name":"sh_gradient_display","path":"shaders/sh_gradient_display/sh_gradient_display.yy",},"order":40,},
{"id":{"name":"s_node_chromatic_abarration","path":"sprites/s_node_chromatic_abarration/s_node_chromatic_abarration.yy",},"order":1,},
{"id":{"name":"node_blur_directional","path":"scripts/node_blur_directional/node_blur_directional.yy",},"order":26,},
{"id":{"name":"s_hamburger","path":"sprites/s_hamburger/s_hamburger.yy",},"order":13,},
@ -178,6 +179,7 @@
{"id":{"name":"sh_twirl","path":"shaders/sh_twirl/sh_twirl.yy",},"order":19,},
{"id":{"name":"s_node_shape","path":"sprites/s_node_shape/s_node_shape.yy",},"order":40,},
{"id":{"name":"s_checkbox","path":"sprites/s_checkbox/s_checkbox.yy",},"order":11,},
{"id":{"name":"string_formatting","path":"scripts/string_formatting/string_formatting.yy",},"order":7,},
{"id":{"name":"s_button_lime","path":"sprites/s_button_lime/s_button_lime.yy",},"order":1,},
{"id":{"name":"node_level_selector","path":"scripts/node_level_selector/node_level_selector.yy",},"order":39,},
{"id":{"name":"node_posterize","path":"scripts/node_posterize/node_posterize.yy",},"order":10,},
@ -413,6 +415,7 @@
{"id":{"name":"s_textbox","path":"sprites/s_textbox/s_textbox.yy",},"order":3,},
{"id":{"name":"ase_reader","path":"scripts/ase_reader/ase_reader.yy",},"order":1,},
{"id":{"name":"node_path","path":"scripts/node_path/node_path.yy",},"order":8,},
{"id":{"name":"node_wrap_area","path":"scripts/node_wrap_area/node_wrap_area.yy",},"order":11,},
{"id":{"name":"sh_seperate_shape_sep","path":"shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.yy",},"order":3,},
{"id":{"name":"s_node_image_sequence","path":"sprites/s_node_image_sequence/s_node_image_sequence.yy",},"order":68,},
{"id":{"name":"s_noti_icon_warning","path":"sprites/s_noti_icon_warning/s_noti_icon_warning.yy",},"order":3,},

View file

@ -3,7 +3,7 @@ event_inherited();
#region data
dialog_w = ui(796);
dialog_h = ui(428);
dialog_h = ui(468);
name = "Gradient editor";
gradient = noone;
@ -28,6 +28,11 @@ event_inherited();
destroy_on_click_out = true;
sl_position = new slider(0, 100, 0.1, function(val) {
if(key_selecting == noone) return;
setKeyPosition(key_selecting, val / 100);
}, function() { removeKeyOverlap(key_selecting); })
function resetHSV() {
hue = color_get_hue(current_color);
sat = color_get_saturation(current_color);
@ -49,6 +54,24 @@ event_inherited();
key_selecting = grad[| 0];
}
function setKeyPosition(key, position) {
key.time = position;
ds_list_remove(gradient, key);
gradient_add(gradient, key, false);
}
function removeKeyOverlap(key) {
for(var i = 0; i < ds_list_size(gradient); i++) {
var _key = gradient[| i];
if(_key == key || _key.time != key.time)
continue;
_key.value = key.value;
ds_list_remove(gradient, key);
}
}
dropper_active = false;
dropper_color = c_white;
#endregion

View file

@ -99,7 +99,7 @@ if !ready exit;
if(buttonInstant(s_button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, "Key blending", s_grad_blend) == 2) {
if(grad_data != noone)
grad_data[| 0] = !grad_data[| 0];
grad_data[| 0] = (grad_data[| 0] + 1) % 3;
}
bx -= ui(32);
#endregion
@ -110,30 +110,24 @@ if !ready exit;
var hover = noone;
for(var i = 0; i < ds_list_size(gradient); i++) {
var _k = gradient[| i];
var _c = _k.value;
var _kx = gr_x + _k.time * gr_w;
var _in = _k == key_selecting? 1 : 0;
draw_sprite_ui_uniform(s_prop_gradient, _in, _kx, gr_y + gr_h / 2, 1);
draw_sprite_ui_uniform(s_prop_gradient, _in, _kx, gr_y + gr_h / 2, 1, _c);
if(sHOVER && point_in_rectangle(mouse_mx, mouse_my, _kx - ui(6), gr_y, _kx + ui(6), gr_y + gr_h)) {
draw_sprite_ui_uniform(s_prop_gradient, _in, _kx, gr_y + gr_h / 2, 1.2);
draw_sprite_ui_uniform(s_prop_gradient, _in, _kx, gr_y + gr_h / 2, 1.2, _c);
hover = _k;
}
}
if(key_dragging) {
var tt = clamp((mouse_mx - gr_x) / gr_w, 0, 1);
key_dragging.time = tt;
var _index = ds_list_find_index(gradient, key_dragging);
ds_list_delete(gradient, _index);
gradient_add(gradient, key_dragging, false);
setKeyPosition(key_dragging, tt);
if(mouse_check_button_released(mb_left)) {
var _index = ds_list_find_index(gradient, key_dragging);
ds_list_delete(gradient, _index);
gradient_add(gradient, key_dragging, true);
removeKeyOverlap(key_dragging);
key_dragging = noone;
}
}
@ -171,11 +165,22 @@ if !ready exit;
}
}
}
var op_x = content_x + ui(20);
var op_y = gr_y + gr_h + ui(12);
draw_set_text(f_p0, fa_left, fa_center, c_ui_blue_white);
draw_text(op_x, op_y + TEXTBOX_HEIGHT / 2, "Position")
var txt = key_selecting? key_selecting.time * 100 : "-";
sl_position.active = sFOCUS;
sl_position.hover = sHOVER;
sl_position.draw(op_x + ui(100), op_y, ui(content_w - 140), TEXTBOX_HEIGHT, txt, mouse_ui);
#endregion
#region color surface
var col_x = content_x + ui(20);
var col_y = dialog_y + ui(96);
var col_y = dialog_y + ui(136);
draw_sprite_stretched(s_ui_panel_bg, 0, col_x - ui(8), col_y - ui(8), ui(256 + 16), ui(256 + 16));

View file

@ -70,7 +70,7 @@
if(array_length(menu[i]) > 2) {
if(menu[i][2] == ">") {
draw_sprite_ui_uniform(s_arrow_16, 0, dialog_x + dialog_w - ui(20), yy + hght / 2, 1, c_ui_blue_dkgrey);
draw_sprite_ui_uniform(s_arrow_16, 0, dialog_x + dialog_w - ui(20), yy + hght / 2, 1, c_ui_blue_grey);
} else if(is_array(menu[i][2])) {
var _key = find_hotkey(menu[i][2][0], menu[i][2][1]);
if(_key) {

View file

@ -2,7 +2,7 @@
event_inherited();
#region data
dialog_w = ui(600);
dialog_w = ui(720);
dialog_h = ui(360);
dialog_resizable = true;
@ -20,10 +20,12 @@ event_inherited();
var hh = 32;
var yy = _y;
var txw = sp_noti.w - ui(48 + 16 + 20);
var txw = sp_noti.w - ui(48 + 48 + 20);
var amo = ds_list_size(STATUSES);
for( var i = 0; i < ds_list_size(STATUSES); i++ ) {
var noti = STATUSES[| i];
var index = amo - 1 - i;
var noti = STATUSES[| index];
if(noti.type & filter == 0) continue;
var _w = sp_noti.w - ui(12);
@ -32,10 +34,10 @@ event_inherited();
draw_sprite_stretched_ext(s_node_name, 0, 0, yy + ui(2), _w, _h - ui(4), c_ui_blue_grey, 1);
if(noti.life_max > 0) {
var _nwx = sp_noti.w - ui(12) - ui(44);
var _nwx = sp_noti.w - ui(12) - ui(40);
var _nw = _nwx * noti.life / noti.life_max;
draw_sprite_stretched_ext(s_node_name, 0, ui(44), yy + ui(2), _nw, _h - ui(4), c_ui_blue_ltgrey, 0.5);
draw_sprite_stretched_ext(s_node_name, 0, ui(40), yy + ui(2), _nw, _h - ui(4), c_ui_blue_white, 1);
}
draw_sprite_stretched_ext(s_node_name, 0, 0, yy + ui(2), ui(48), _h - ui(4), noti.color, 1);
@ -43,8 +45,11 @@ event_inherited();
if(noti.icon)
draw_sprite_ui(noti.icon, 1, ui(24), yy + _h / 2);
draw_set_text(f_p1, fa_left, fa_center, c_ui_blue_white);
draw_text_ext(ui(48 + 16), yy + _h / 2, noti.txt, -1, txw);
draw_set_text(f_p3, fa_right, fa_center, c_ui_blue_grey);
draw_text_ext(ui(48 + 48 - 8), yy + _h / 2, noti.time, -1, txw);
draw_set_text(f_p2, fa_left, fa_center, c_ui_blue_white);
draw_text_ext(ui(48 + 48), yy + _h / 2, noti.txt, -1, txw);
if(noti.onClick != noone && point_in_rectangle(_m[0], _m[1], 0, yy, _w, yy + _h - ui(4))) {
draw_sprite_stretched_ext(s_node_active, 0, 0, yy + ui(2), _w, _h - ui(4), c_white, 1);

View file

@ -105,6 +105,15 @@ event_inherited();
})
]);
ds_list_add(pref_global, [
"Expand hovering panel",
"expand_hover",
new checkBox(function() {
PREF_MAP[? "expand_hover"] = !PREF_MAP[? "expand_hover"];
PREF_SAVE();
})
]);
//NODE
ds_list_add(pref_node, "Particle");

View file

@ -44,6 +44,8 @@
addHotkey("", "Undo", "Z", MOD_KEY.ctrl, function() { UNDO(); });
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
addHotkey("", "Full panel", vk_tab, MOD_KEY.none, set_focus_fullscreen);
addHotkey("", "Render all", vk_f5, MOD_KEY.none, function() {
UPDATE |= RENDER_TYPE.full;
});

View file

@ -1,7 +1,7 @@
/// @description init
#region panels
if(PANEL_MAIN != 0)
if(PANEL_MAIN != 0) {
PANEL_MAIN.draw();
else
} else
setPanel();
#endregion
#endregion

View file

@ -95,7 +95,6 @@
file_dnd_set_enabled(true);
if(file_dnd_filelist != "" && file_dnd_filelist != 0) {
show_debug_message(file_dnd_filelist);
file_dropping = file_dnd_filelist;
if(string_pos("\n", file_dropping) == 1)
file_dropping = string_replace(file_dropping, "\n", "");

View file

@ -36,7 +36,7 @@
renderAll();
UPDATE = RENDER_TYPE.none;
} else if(UPDATE & RENDER_TYPE.partial) {
show_debug_message("Update partial stack size = " + string(ds_stack_size(RENDER_STACK)));
noti_warning("Update partial stack size to " + string(ds_stack_size(RENDER_STACK)));
renderUpdated();
UPDATE = RENDER_TYPE.none;
}

View file

@ -15,12 +15,10 @@ function APPEND(_path) {
if(_v != SAVEFILE_VERSION) {
var warn = "File version mismatch : loading file verion " + string(_v) + " to Pixel Composer " + string(SAVEFILE_VERSION);
log_warning("FILE", warn)
noti_warning(warn);
}
} else {
var warn = "File version mismatch : loading old format to Pixel Composer " + string(SAVEFILE_VERSION);
log_warning("FILE", warn)
noti_warning(warn);
}
var _node_list = _map[? "nodes"];
@ -45,7 +43,6 @@ function APPEND(_path) {
ds_list_add(node_create, _node);
}
} catch(e) {
noti_warning("Node load error : " + e.message);
log_warning("APPEND, node", e.longMessage);
}
@ -53,7 +50,6 @@ function APPEND(_path) {
for(var i = 0; i < ds_list_size(appended_list); i++)
appended_list[| i].postDeserialize();
} catch(e) {
noti_warning("Deserialize error : " + e.message);
log_warning("APPEND, deserialize", e.longMessage);
}
@ -65,7 +61,6 @@ function APPEND(_path) {
for(var i = 0; i < ds_list_size(appended_list); i++)
appended_list[| i].postConnect();
} catch(e) {
noti_warning("Connect error : " + e.message);
log_warning("APPEND, connect", e.longMessage);
}
@ -73,7 +68,6 @@ function APPEND(_path) {
for(var i = 0; i < ds_list_size(appended_list); i++)
appended_list[| i].doUpdate();
} catch(e) {
noti_warning("Update error : " + e.message);
log_warning("APPEND, update", e.longMessage);
}
@ -98,18 +92,16 @@ function APPEND(_path) {
}
if(!ds_queue_empty(CONNECTION_CONFLICT))
noti_warning("Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken.");
log_warning("APPEND", "Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken.");
} catch(e) {
noti_warning("Conflict solver error : " + e.message);
log_warning("APPEND, solver", e.longMessage);
log_warning("APPEND, Conflict solver error : ", e.longMessage);
}
}
APPENDING = false;
PANEL_ANIMATION.updatePropertyList();
log_message("FILE", "append file " + _path);
noti_status("Collection loaded", s_noti_icon_file_load);
log_message("FILE", "append file " + _path, s_noti_icon_file_load);
ds_map_destroy(_map);
return node_create;

View file

@ -14,16 +14,22 @@ function __log(title, str, fname = "log.txt") {
show_debug_message(str);
}
function log_message(title, str) {
__log("[MESSAGE] ", string(title) + " : " + string(str));
function log_message(title, str, icon = s_noti_icon_log) {
__log("[MESSAGE] ", string(title) + ": " + string(str));
noti_status(string(title) + ": " + string(str), icon);
}
function log_warning(title, str) {
__log("[WARNING] ", string(title) + " : " + string(str));
__log("[WARNING] ", string(title) + ": " + string(str));
noti_warning(string(title) + ": " + string(str));
}
function log_crash(str) {
__log("[ERROR] ", string(str));
noti_error(string(str));
}
function log_newline() {

View file

@ -1,32 +1,41 @@
enum GRADIENT_INTER {
smooth,
none
none,
hue
}
function draw_gradient(_x, _y, _w, _h, _grad, _int = GRADIENT_INTER.smooth) {
static RES = 48;
var _step = _w / RES;
var _ox, _oc;
for(var i = 0; i <= RES; i++) {
var _nx = _x + _step * i;
var _nc = gradient_eval(_grad, i / RES, _int);
var uniform_grad_blend = shader_get_uniform(sh_gradient_display, "gradient_blend");
var uniform_grad = shader_get_uniform(sh_gradient_display, "gradient_color");
var uniform_grad_time = shader_get_uniform(sh_gradient_display, "gradient_time");
var uniform_grad_key = shader_get_uniform(sh_gradient_display, "gradient_keys");
var _grad_color = [];
var _grad_time = [];
if(i) {
switch(_int) {
case GRADIENT_INTER.smooth :
draw_rectangle_color(_ox, _y, _nx, _y + _h, _oc, _nc, _nc, _oc, false);
break;
case GRADIENT_INTER.none :
draw_set_color(_nc);
draw_rectangle(_ox, _y, _nx, _y + _h, false);
break;
}
}
_ox = _nx;
_oc = _nc;
for(var i = 0; i < ds_list_size(_grad); i++) {
_grad_color[i * 4 + 0] = color_get_red(_grad[| i].value) / 255;
_grad_color[i * 4 + 1] = color_get_green(_grad[| i].value) / 255;
_grad_color[i * 4 + 2] = color_get_blue(_grad[| i].value) / 255;
_grad_color[i * 4 + 3] = 1;
_grad_time[i] = _grad[| i].time;
}
if(ds_list_empty(_grad)) {
draw_sprite_stretched(s_fx_pixel, 0, _x, _y, _w, _h)
} else {
shader_set(sh_gradient_display);
shader_set_uniform_i(uniform_grad_blend, _int);
shader_set_uniform_f_array(uniform_grad, _grad_color);
shader_set_uniform_f_array(uniform_grad_time, _grad_time);
shader_set_uniform_i(uniform_grad_key, ds_list_size(_grad));
draw_sprite_stretched(s_fx_pixel, 0, _x, _y, _w, _h)
shader_reset();
}
}

View file

@ -1,12 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "gradients_function",
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "value",
"path": "folders/functions/value.yy",
},
"resourceVersion": "1.0",
"name": "gradients_function",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -17,12 +17,12 @@ function LOAD() {
function LOAD_PATH(path, readonly = false) {
if(!file_exists(path)) {
noti_warning("File not found");
log_warning("LOAD", "File not found");
return false;
}
if(filename_ext(path) != ".json" && filename_ext(path) != ".pxc") {
noti_warning("File not a valid project");
log_warning("LOAD", "File not a valid project");
return false;
}
@ -47,13 +47,11 @@ function LOAD_PATH(path, readonly = false) {
var _v = _map[? "version"];
if(_v != SAVEFILE_VERSION) {
var warn = "File version mismatch : loading file verion " + string(_v) + " to Pixel Composer " + string(SAVEFILE_VERSION);
log_warning("FILE", warn)
noti_warning(warn);
log_warning("LOAD", warn);
}
} else {
var warn = "File version mismatch : loading old format to Pixel Composer " + string(SAVEFILE_VERSION);
log_warning("FILE", warn)
noti_warning(warn);
log_warning("LOAD", warn);
}
nodeCleanUp();
@ -67,8 +65,7 @@ function LOAD_PATH(path, readonly = false) {
if(_node) ds_list_add(create_list, _node);
}
} catch(e) {
noti_warning("Node load error : " + e.message);
log_warning("LOAD, node", e.longMessage);
log_warning("LOAD", e.longMessage);
}
}
@ -79,7 +76,6 @@ function LOAD_PATH(path, readonly = false) {
ANIMATOR.framerate = ds_map_try_get(_anim_map, "framerate");
}
} catch(e) {
noti_warning("Animator load error : " + e.message);
log_warning("LOAD, animator", e.longMessage);
}
@ -89,7 +85,6 @@ function LOAD_PATH(path, readonly = false) {
for(var i = 0; i < ds_list_size(create_list); i++)
create_list[| i].loadGroup();
} catch(e) {
noti_warning("Group load error : " + e.message);
log_warning("LOAD, group", e.longMessage);
}
@ -97,7 +92,6 @@ function LOAD_PATH(path, readonly = false) {
for(var i = 0; i < ds_list_size(create_list); i++)
create_list[| i].postDeserialize();
} catch(e) {
noti_warning("Deserialize error : " + e.message);
log_warning("LOAD, deserialize", e.longMessage);
}
@ -109,7 +103,6 @@ function LOAD_PATH(path, readonly = false) {
for(var i = 0; i < ds_list_size(create_list); i++)
create_list[| i].postConnect();
} catch(e) {
noti_warning("Connect error : " + e.message);
log_warning("LOAD, connect", e.longMessage);
}
@ -117,7 +110,6 @@ function LOAD_PATH(path, readonly = false) {
for(var i = 0; i < ds_list_size(create_list); i++)
create_list[| i].doUpdate();
} catch(e) {
noti_warning("Update error : " + e.message);
log_warning("LOAD, update", e.longMessage);
}
@ -137,9 +129,8 @@ function LOAD_PATH(path, readonly = false) {
}
if(!ds_queue_empty(CONNECTION_CONFLICT))
noti_warning("Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken.");
log_warning("LOAD", "Some connection(s) is unsolved. This may caused by render node not being update properly, or image path is broken.");
} catch(e) {
noti_warning("Conflict solver error : " + e.message);
log_warning("LOAD, connect solver", e.longMessage);
}
}
@ -150,8 +141,7 @@ function LOAD_PATH(path, readonly = false) {
PANEL_GRAPH.fullView();
PANEL_ANIMATION.updatePropertyList();
log_message("FILE", "load at " + path);
noti_status("File loaded", s_noti_icon_file_load);
log_message("FILE", "load " + path, s_noti_icon_file_load);
ds_map_destroy(_map);
return true;

View file

@ -70,7 +70,7 @@ function Node_Collection(_x, _y) : Node(_x, _y) constructor {
render_time += nodes[| i].render_time;
}
if(PANEL_GRAPH.node_focus == self && FOCUS == PANEL_GRAPH.panel && DOUBLE_CLICK) {
if(PANEL_GRAPH.node_focus == self && panelFocus(PANEL_GRAPH) && DOUBLE_CLICK) {
PANEL_GRAPH.addContext(self);
DOUBLE_CLICK = false;
}

View file

@ -11,6 +11,7 @@ function Node_Color_Data(_x, _y) : Node_Value_Processor(_x, _y) constructor {
w = 96;
inputs[| 0] = nodeValue(0, "Color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
inputs[| 0].setVisible(true, true);
outputs[| 0] = nodeValue(0, "Red", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);
outputs[| 1] = nodeValue(1, "Green", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0);

View file

@ -1,12 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_color_data",
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "color",
"path": "folders/nodes/data/color.yy",
},
"resourceVersion": "1.0",
"name": "node_color_data",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -675,7 +675,6 @@ function Node(_x, _y) constructor {
NODE_MAP[? _group].add(self);
} else {
var txt = "Group load failed. Can't find node ID " + string(_group);
noti_warning(txt);
log_warning("LOAD", txt);
}
}

View file

@ -66,11 +66,17 @@ function Node_Image_Sheet(_x, _y) : Node(_x, _y) constructor {
doUpdate();
}, "Generate"] );
inputs[| 11] = nodeValue(11, "Sync animation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.button, [ function() {
var _amo = inputs[| 2].getValue();
ANIMATOR.frames_total = max(1, _amo - 1);
}, "Sync frames"] );
input_display_list = [
["Sprite", false], 0, 1, 6, 10,
["Sheet", false], 2, 3, 9, 4, 5,
["Output", false], 7, 8
["Output", false], 7, 8, 11
];
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -156,6 +156,7 @@ function valueAnimator(_val, _prop) constructor {
if(!ds_list_exist(values, _key)) return 0;
MODIFIED = true;
_time = clamp(_time, 0, ANIMATOR.frames_total);
_key.time = _time;
ds_list_remove(values, _key);

View file

@ -81,6 +81,7 @@ function NodeObject(_name, _spr, _create, tags = []) constructor {
addNodeObject(transform, "Polar", s_node_polar, "Node_Polar", Node_create_Polar);
addNodeObject(transform, "Nine slice", s_node_9patch, "Node_9Slice", Node_create_9Slice, ["9", "splice"]);
addNodeObject(transform, "Padding", s_node_padding, "Node_Padding", Node_create_Padding);
addNodeObject(transform, "Area wrap", s_node_padding, "Node_Wrap_Area", Node_create_Wrap_Area);
var filter = ds_list_create();
addNodeCatagory("Filter", filter);
@ -214,7 +215,7 @@ function NodeObject(_name, _spr, _create, tags = []) constructor {
var _type = ds_map_try_get(_data, "type", 0);
if(!ds_map_exists(NODE_CREATE_FUCTION, _type)) {
show_debug_message("Append ERROR : no type " + _type)
noti_error("LOAD: node creation function [" + _type + "] not found.")
return noone;
}

View file

@ -549,37 +549,36 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
static setFrom = function(_valueFrom, _update = true, checkRecur = true) {
if(_valueFrom == -1 || _valueFrom == undefined) {
show_debug_message("LOAD : Value from error " + string(_valueFrom))
noti_warning("LOAD: Cannot set node connection from " + string(_valueFrom) + " to " + string(name) + " of node " + string(node.name) + ".");
return false;
}
if(_valueFrom == value_from) {
show_debug_message("setFrom : Repeated connection");
return false;
}
if(_valueFrom == self) {
show_debug_message("setFrom : Connect to self");
noti_warning("setFrom: Self connection is not allowed.");
return false;
}
if(value_bit(type) & value_bit(_valueFrom.type) == 0 && !value_type_directional(_valueFrom, self)) {
show_debug_message("setFrom : Type mismatch");
noti_warning("setFrom: Type mismatch");
return false;
}
if(connect_type == _valueFrom.connect_type) {
show_debug_message("setFrom : Connect type mismatch");
noti_warning("setFrom: Connect type mismatch");
return false;
}
if(checkRecur && _valueFrom.searchNodeBackward(node)) {
show_debug_message("setFrom : Recursive");
noti_warning("setFrom: Cycle connection");
return false;
}
if(!accept_array && _valueFrom.isArray()) {
show_debug_message("setFrom : Array mismatch");
noti_warning("setFrom: Array mismatch");
return false;
}

View file

@ -50,8 +50,7 @@ function Node_Vector2(_x, _y) : Node_Value_Processor(_x, _y) constructor {
inputs[| 1] = nodeValue(1, "y", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setVisible(true, true);
outputs[| 0] = nodeValue(0, "Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.area);
outputs[| 0] = nodeValue(0, "Vector", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0 ]);
function process_value_data(_data, index = 0) {
var vec = [ _data[0], _data[1] ];

View file

@ -1,12 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_vector",
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "number",
"path": "folders/nodes/data/number.yy",
},
"resourceVersion": "1.0",
"name": "node_vector",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -30,7 +30,7 @@ function Node_Wiggler(_x, _y) : Node_Value_Processor(_x, _y) constructor {
["Wiggle", false], 2, 0, 1,
];
graph_value = array_create(64, 0);
random_value = array_create(64, 0);
static onValueUpdate = function(index) {
var ran = inputs[| 0].getValue();
@ -41,28 +41,30 @@ function Node_Wiggler(_x, _y) : Node_Value_Processor(_x, _y) constructor {
var _fmax = ANIMATOR.frames_total / max(1, max(fre[0], fre[1]));
var _val;
for( var i = 0; i < 64; i++ ) {
for( var i = 0; i < ANIMATOR.frames_total + 1; i++ ) {
_val = getWiggle(ran[0], ran[1], _fmin, _fmax, i, sed);
graph_value[i] = _val;
random_value[i] = _val;
}
}
function process_value_data(_data, index = 0) {
if(array_length(graph_value) != ANIMATOR.frames_total)
array_resize(graph_value, ANIMATOR.frames_total);
var time = ANIMATOR.current_frame;
var _ran = _data[0];
var _fmin = ANIMATOR.frames_total / max(1, min(_data[1][0], _data[1][1]));
var _fmax = ANIMATOR.frames_total / max(1, max(_data[1][0], _data[1][1]));
if(array_length(random_value) != ANIMATOR.frames_total + 1) {
array_resize(random_value, ANIMATOR.frames_total + 1);
onValueUpdate(0);
}
var _val = getWiggle(_ran[0], _ran[1], _fmin, _fmax, time, _data[3]);
return _val;
var time = ANIMATOR.current_frame;
return random_value[time];
}
doUpdate();
static onDrawNode = function(xx, yy, _mx, _my, _s) {
if(array_length(random_value) != ANIMATOR.frames_total + 1) {
array_resize(random_value, ANIMATOR.frames_total + 1);
onValueUpdate(0);
}
var disp = inputs[| 3].getValue();
var time = ANIMATOR.current_frame;
var total_time = ANIMATOR.frames_total;
@ -71,7 +73,7 @@ function Node_Wiggler(_x, _y) : Node_Value_Processor(_x, _y) constructor {
case 0 :
min_h = 0;
draw_set_text(f_h5, fa_center, fa_center, c_white);
var str = string(outputs[| 0].getValue());
var str = string(random_value[time]);
var ss = string_scale(str, (w - 16) * _s, (h - 16) * _s - 20);
draw_text_transformed(xx + w / 2 * _s, yy + 10 + h / 2 * _s, str, ss, ss, 0);
break;
@ -103,12 +105,12 @@ function Node_Wiggler(_x, _y) : Node_Value_Processor(_x, _y) constructor {
var _fx = x0 + (time / total_time * ww);
draw_line(_fx, y0, _fx, y1);
var lw = ww / (array_length(graph_value) - 1);
var lw = ww / (array_length(random_value) - 1);
draw_set_color(c_white);
var ox, oy;
for( var i = 0; i < array_length(graph_value); i++ ) {
for( var i = 0; i < array_length(random_value); i++ ) {
var _x = x0 + i * lw;
var _y = yc - (graph_value[i] - val) / (_ran * 2) * hh;
var _y = yc - (random_value[i] - val) / (_ran * 2) * hh;
if(i)
draw_line(ox, oy, _x, _y);

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "filter",
"path": "folders/nodes/data/filter.yy",
},
"resourceVersion": "1.0",
"name": "node_blur",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_color_adjustment",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_color_replacement",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_glow",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_outline",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,43 @@
function Node_create_Wrap_Area(_x, _y) {
var node = new Node_Wrap_Area(_x, _y);
ds_list_add(PANEL_GRAPH.nodes_list, node);
return node;
}
function Node_Wrap_Area(_x, _y) : Node_Processor(_x, _y) constructor {
name = "Area wrap";
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
.setDisplay(VALUE_DISPLAY.area);
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
static drawOverlay = function(_active, _x, _y, _s, _mx, _my) {
inputs[| 1].drawOverlay(_active, _x, _y, _s, _mx, _my);
}
static process_data = function(_outSurf, _data, _output_index) {
var _inSurf = _data[0];
var _area = _data[1];
var cx = _area[0];
var cy = _area[1];
var cw = _area[2];
var ch = _area[3];
var ww = cw / surface_get_width(_inSurf) * 2;
var hh = ch / surface_get_height(_inSurf) * 2;
surface_set_target(_outSurf);
draw_clear_alpha(0, 0);
BLEND_ADD
draw_surface_ext_safe(_inSurf, cx - cw, cy - ch, ww, hh, 0, c_white, 1);
BLEND_NORMAL
surface_reset_target();
return _outSurf;
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_wrap_area",
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "transform",
"path": "folders/nodes/data/transform.yy",
},
}

View file

@ -13,7 +13,7 @@
error = 1 << 2,
}
function notification(type, str, icon = noone, color = c_ui_blue_dkgrey, life = -1) constructor {
function notification(type, str, icon = s_noti_icon_log, color = c_ui_blue_dkgrey, life = -1) constructor {
self.type = type;
self.txt = str;
self.icon = icon;
@ -23,9 +23,11 @@
self.life = life;
self.onClick = noone;
self.time = string_lead_zero(current_hour, 2) + ":" + string_lead_zero(current_minute, 2);
}
function noti_status(str, icon = noone) {
function noti_status(str, icon = s_noti_icon_log) {
ds_list_add(STATUSES, new notification(NOTI_TYPE.log, str, icon));
}

View file

@ -5,7 +5,7 @@ enum KEYFRAME_DRAG_TYPE {
ease_both
}
function Panel_Animation(_panel) : PanelContent(_panel) constructor {
function Panel_Animation() : PanelContent() constructor {
context_str = "Animation";
timeline_h = ui(28);
@ -13,13 +13,18 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
min_h = ui(48);
tool_width = ui(280);
timeline_surface = surface_create_valid(w - tool_width, timeline_h);
timeline_mask = surface_create_valid(w - tool_width, timeline_h);
function initSize() {
timeline_w = w - tool_width - ui(12);
timeline_surface = surface_create_valid(timeline_w, timeline_h);
timeline_mask = surface_create_valid(timeline_w, timeline_h);
dope_sheet_w = w - tool_width;
dope_sheet_h = h - timeline_h - ui(20);
dope_sheet_surface = surface_create_valid(dope_sheet_w, 1);
dope_sheet_mask = surface_create_valid(dope_sheet_w, 1);
}
initSize();
dope_sheet_w = w - tool_width - ui(8);
dope_sheet_h = h - timeline_h - ui(20);
dope_sheet_surface = surface_create_valid(dope_sheet_w, 1);
dope_sheet_mask = surface_create_valid(dope_sheet_w, 1);
dope_sheet_y = 0;
dope_sheet_y_to = 0;
dope_sheet_y_max = 0;
@ -194,17 +199,17 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
function onResize(dw, dh) {
if(w - tool_width > 1) {
if(is_surface(timeline_mask) && surface_exists(timeline_mask))
surface_size_to(timeline_mask, w - tool_width, timeline_h);
surface_size_to(timeline_mask, timeline_w, timeline_h);
else
timeline_mask = surface_create_valid(w - tool_width, timeline_h);
timeline_mask = surface_create_valid(timeline_w, timeline_h);
if(is_surface(timeline_surface) && surface_exists(timeline_surface))
surface_size_to(timeline_surface, w - tool_width, timeline_h);
surface_size_to(timeline_surface, timeline_w, timeline_h);
else
timeline_surface = surface_create_valid(w - tool_width, timeline_h);
timeline_surface = surface_create_valid(timeline_w, timeline_h);
}
dope_sheet_w = w - tool_width - ui(8);
dope_sheet_w = timeline_w;
dope_sheet_h = h - timeline_h - ui(24);
if(dope_sheet_h > ui(8)) {
if(is_surface(dope_sheet_mask) && surface_exists(dope_sheet_mask))
@ -227,12 +232,12 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
function resetTimelineMask() {
if(!surface_exists(timeline_mask))
timeline_mask = surface_create_valid(w - tool_width, timeline_h);
timeline_mask = surface_create_valid(timeline_w, timeline_h);
surface_set_target(timeline_mask);
draw_clear(c_black);
gpu_set_blendmode(bm_subtract);
draw_sprite_stretched(s_ui_panel_bg, 0, 0, 0, w - tool_width, timeline_h);
draw_sprite_stretched(s_ui_panel_bg, 0, 0, 0, timeline_w, timeline_h);
gpu_set_blendmode(bm_normal);
surface_reset_target();
@ -270,16 +275,16 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
//TODO: Divide this 800+ lines monstrosity into subfunctions
function drawAnimationControl() {
function drawAnimationControl(panel) {
var bar_x = tool_width - ui(48);
var bar_y = h - timeline_h - ui(10);
var bar_w = w - tool_width;
var bar_w = timeline_w;
var bar_h = timeline_h;
var bar_total_w = ANIMATOR.frames_total * ui(timeline_scale);
resetTimelineMask();
if(!is_surface(timeline_surface) || !surface_exists(timeline_surface))
timeline_surface = surface_create_valid(w - tool_width, timeline_h);
timeline_surface = surface_create_valid(timeline_w, timeline_h);
if(dope_sheet_h > 8) {
if(!is_surface(dope_sheet_surface) || !surface_exists(dope_sheet_surface))
@ -291,7 +296,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
#region scroll
dope_sheet_y = lerp_float(dope_sheet_y, dope_sheet_y_to, 5);
if(HOVER == panel && point_in_rectangle(mx, my, ui(8), ui(8), tool_width, ui(8) + dope_sheet_h)) {
if(pHOVER && point_in_rectangle(mx, my, ui(8), ui(8), tool_width, ui(8) + dope_sheet_h)) {
if(mouse_wheel_down()) dope_sheet_y_to = clamp(dope_sheet_y_to - ui(32), -dope_sheet_y_max, 0);
if(mouse_wheel_up()) dope_sheet_y_to = clamp(dope_sheet_y_to + ui(32), -dope_sheet_y_max, 0);
}
@ -458,10 +463,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
else if(key.ease_in_type == CURVE_TYPE.damping)
draw_sprite_stretched_ext(s_timeline_elastic, 0, _tx, key_y - 4, t - _tx, 8, c_ui_blue_dkgrey, 1);
if(HOVER == panel && point_in_circle(msx, msy, _tx, key_y, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, _tx, key_y, ui(6))) {
key_hover = key;
draw_sprite_ui_uniform(s_timeline_keyframe, 2, _tx, key_y, 1, c_ui_blue_white);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
keyframe_dragging = prop.animator.values[| k];
keyframe_drag_type = KEYFRAME_DRAG_TYPE.ease_in;
}
@ -475,10 +480,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
else if(key.ease_out_type == CURVE_TYPE.damping)
draw_sprite_stretched_ext(s_timeline_elastic, 0, t, key_y - 4, _tx - t, 8, c_ui_blue_dkgrey, 1);
if(HOVER == panel && point_in_circle(msx, msy, _tx, key_y, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, _tx, key_y, ui(6))) {
key_hover = key;
draw_sprite_ui_uniform(s_timeline_keyframe, 3, _tx, key_y, 1, c_ui_blue_white);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
keyframe_dragging = prop.animator.values[| k];
keyframe_drag_type = KEYFRAME_DRAG_TYPE.ease_out;
}
@ -619,11 +624,11 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
var cc = c_ui_blue_grey;
if(HOVER == panel && point_in_circle(msx, msy, t, key_y, ui(8))) {
if(pHOVER && point_in_circle(msx, msy, t, key_y, ui(8))) {
cc = c_ui_blue_white;
key_hover = keyframe;
if(FOCUS == panel) {
if(pFOCUS) {
if(DOUBLE_CLICK) {
keyframe_dragging = keyframe;
keyframe_drag_type = KEYFRAME_DRAG_TYPE.ease_both;
@ -635,7 +640,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
if(stagger_mode == 1 && ds_list_exist(keyframe_selecting, keyframe))
cc = c_ui_orange;
cc = key_hover == keyframe? c_white : c_ui_orange;
draw_sprite_ui_uniform(s_timeline_keyframe, 1, t, key_y, 1, cc);
if(ds_list_exist(keyframe_selecting, keyframe))
@ -662,7 +667,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
}
if(FOCUS == panel && point_in_rectangle(msx, msy, 0, ui(16), dope_sheet_w, dope_sheet_h)) {
if(pFOCUS && point_in_rectangle(msx, msy, 0, ui(16), dope_sheet_w, dope_sheet_h)) {
if(mouse_check_button_pressed(mb_left) || mouse_check_button_pressed(mb_right)) {
if(key_hover == noone) {
ds_list_clear(keyframe_selecting);
@ -700,7 +705,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
}
if(FOCUS == panel && mouse_check_button_pressed(mb_right)) {
if(pFOCUS && mouse_check_button_pressed(mb_right)) {
if(!ds_list_empty(keyframe_selecting)) {
dialogCall(o_dialog_menubox, mouse_mx + ui(8), mouse_my + ui(8))
.setMenu(keyframe_menu);
@ -801,9 +806,9 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
key_y += ui(6);
draw_set_color(c_ui_blue_ltgrey);
if(HOVER == panel && point_in_rectangle(msx, msy, 0, key_y - ui(10), tool_width - ui(64), key_y + ui(10))) {
if(pHOVER && point_in_rectangle(msx, msy, 0, key_y - ui(10), tool_width - ui(64), key_y + ui(10))) {
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 0, key_y - ui(10), tool_width - ui(64), ui(20), c_ui_blue_ltgrey, 1);
if(FOCUS == panel && msx < tool_width - ui(88) && mouse_check_button_pressed(mb_left))
if(pFOCUS && msx < tool_width - ui(88) && mouse_check_button_pressed(mb_left))
prop.node.anim_show = !prop.node.anim_show;
} else
draw_sprite_stretched_ext(s_ui_panel_bg, 0, 0, key_y - ui(10), tool_width - ui(64), ui(20), merge_color(c_ui_blue_white, c_ui_blue_ltgrey, 0.5), 1);
@ -812,11 +817,11 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
draw_sprite_stretched(s_node_active, 0, 0, key_y - ui(10), tool_width - ui(64), ui(20));
var tx = tool_width - ui(76 + 16 * 0);
if(HOVER == panel && point_in_circle(msx, msy, tx, key_y - 1, ui(10))) {
if(pHOVER && point_in_circle(msx, msy, tx, key_y - 1, ui(10))) {
draw_sprite_ui_uniform(s_animate_node_go, 0, tx, key_y - 1, 1, c_ui_blue_white);
TOOLTIP = "Go to node";
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
PANEL_INSPECTOR.inspecting = _node;
ds_list_clear(PANEL_GRAPH.nodes_select_list);
PANEL_GRAPH.node_focus = _node;
@ -834,10 +839,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
var tx = tool_width - ui(72 + 16 * 3);
var ty = key_y - 1;
if(HOVER == panel && point_in_circle(msx, msy, tx, ty, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, tx, ty, ui(6))) {
draw_sprite_ui_uniform(s_prop_keyframe, 0, tx, ty, 1, c_ui_blue_white);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
var _t = -1;
for(var j = 0; j < ds_list_size(prop.animator.values); j++) {
var _key = prop.animator.values[| j];
@ -852,10 +857,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
draw_sprite_ui_uniform(s_prop_keyframe, 0, tx, ty, 1, c_ui_blue_grey);
var tx = tool_width - ui(72 + 16 * 1);
if(HOVER == panel && point_in_circle(msx, msy, tx, ty, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, tx, ty, ui(6))) {
draw_sprite_ui_uniform(s_prop_keyframe, 2, tx, ty, 1, c_ui_blue_white);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
for(var j = 0; j < ds_list_size(prop.animator.values); j++) {
var _key = prop.animator.values[| j];
if(_key.time > ANIMATOR.current_frame) {
@ -869,10 +874,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
draw_sprite_ui_uniform(s_prop_keyframe, 2, tx, ty, 1, c_ui_blue_grey);
var tx = tool_width - ui(72 + 16 * 2);
if(HOVER == panel && point_in_circle(msx, msy, tx, ty, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, tx, ty, ui(6))) {
draw_sprite_ui_uniform(s_prop_keyframe, 1, tx, ty, 1, c_ui_orange_light);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
var _add = false;
for(var j = 0; j < ds_list_size(prop.animator.values); j++) {
var _key = prop.animator.values[| j];
@ -894,11 +899,11 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
if(isGraphable(prop.type)) {
var tx = tool_width - ui(68 + 16 * 0);
if(HOVER == panel && point_in_circle(msx, msy, tx, ty, ui(8))) {
if(pHOVER && point_in_circle(msx, msy, tx, ty, ui(8))) {
draw_sprite_ui_uniform(s_timeline_graph, 1, tx, ty, 1, prop.animator.show_graph? c_ui_orange_light : c_ui_blue_white);
TOOLTIP = "Show graph";
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
prop.animator.show_graph = !prop.animator.show_graph;
}
} else
@ -906,20 +911,20 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
var tx = tool_width - ui(72 + 16 * 4.5);
if(HOVER == panel && point_in_circle(msx, msy, tx, ty, ui(6))) {
if(pHOVER && point_in_circle(msx, msy, tx, ty, ui(6))) {
draw_sprite_ui_uniform(s_prop_on_end, prop.on_end, tx, ty, 1, c_ui_blue_white, 1);
TOOLTIP = "Looping mode " + ON_END_NAME[prop.on_end];
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
prop.on_end = safe_mod(prop.on_end + 1, sprite_get_number(s_prop_on_end));
}
} else
draw_sprite_ui_uniform(s_prop_on_end, prop.on_end, tx, ty, 1, c_ui_blue_grey);
if(HOVER == panel && point_in_circle(msx, msy, ui(22), key_y - 1, ui(10))) {
if(pHOVER && point_in_circle(msx, msy, ui(22), key_y - 1, ui(10))) {
draw_sprite_ui_uniform(s_timeline_clock, 1, ui(22), key_y - 1, 1, c_ui_blue_white);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
prop.animator.is_anim = !prop.animator.is_anim;
updatePropertyList();
}
@ -1046,7 +1051,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
timeline_dragging = false;
}
if(HOVER == panel) {
if(pHOVER) {
if(point_in_rectangle(mx, my, bar_x, 16, bar_x + bar_w, bar_y - 8)) {
if(mouse_wheel_down()) {
timeline_scale = max(timeline_scale - 1, 1);
@ -1074,7 +1079,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
if(mouse_wheel_up())
timeline_shift_to = clamp(timeline_shift_to + 64, -max(bar_total_w - bar_w, 0), 0);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
timeline_scubbing = true;
timeline_scub_st = ANIMATOR.current_frame;
_scrub_frame = timeline_scub_st;
@ -1082,7 +1087,7 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
}
if(point_in_rectangle(mx, my, bar_x, 8, bar_x + bar_w, 8 + 16)) {
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
timeline_scubbing = true;
timeline_scub_st = ANIMATOR.current_frame;
_scrub_frame = timeline_scub_st;
@ -1101,49 +1106,49 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
#region control
var bx = ui(8);
var by = h - ui(40);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Stop", s_sequence_control, 4, ANIMATOR.is_playing? c_ui_orange : c_ui_blue_grey) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Stop", s_sequence_control, 4, ANIMATOR.is_playing? c_ui_orange : c_ui_blue_grey) == 2) {
ANIMATOR.is_playing = false;
ANIMATOR.real_frame = 0;
}
bx += ui(36);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, ANIMATOR.is_playing? "Pause" : "Play",
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, ANIMATOR.is_playing? "Pause" : "Play",
s_sequence_control, !ANIMATOR.is_playing, ANIMATOR.is_playing? c_ui_orange : c_ui_blue_grey) == 2)
ANIMATOR.is_playing = !ANIMATOR.is_playing;
bx += ui(36);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Go to first frame", s_sequence_control, 3) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Go to first frame", s_sequence_control, 3) == 2) {
ANIMATOR.real_frame = 0;
ANIMATOR.is_scrubing = true;
}
bx += ui(36);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Go to last frame", s_sequence_control, 2) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Go to last frame", s_sequence_control, 2) == 2) {
ANIMATOR.real_frame = ANIMATOR.frames_total;
ANIMATOR.is_scrubing = true;
}
bx += ui(36);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Previous frame", s_sequence_control, 5) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Previous frame", s_sequence_control, 5) == 2) {
ANIMATOR.real_frame = clamp(ANIMATOR.real_frame - 1, 0, ANIMATOR.frames_total);
ANIMATOR.is_scrubing = true;
}
bx += ui(36);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Next frame", s_sequence_control, 6) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Next frame", s_sequence_control, 6) == 2) {
ANIMATOR.real_frame = clamp(ANIMATOR.real_frame + 1, 0, ANIMATOR.frames_total);
ANIMATOR.is_scrubing = true;
}
bx = w - ui(40);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Animation settings", s_animation_setting, 2) == 2)
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Animation settings", s_animation_setting, 2) == 2)
dialogCall(o_dialog_animation, x + bx + 32, y + by - 8);
if(dope_sheet_h > 8) {
by -= ui(40);
bx = w - ui(40);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Scale animation", s_animation_timing, 2) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Scale animation", s_animation_timing, 2) == 2) {
var dia = dialogCall(o_dialog_anim_time_scaler, x + bx + ui(32), y + by - ui(8));
dia.anchor = ANCHOR.right | ANCHOR.bottom;
}
@ -1151,10 +1156,10 @@ function Panel_Animation(_panel) : PanelContent(_panel) constructor {
#endregion
}
function drawContent() {
function drawContent(panel) {
draw_clear_alpha(c_ui_blue_black, 0);
drawAnimationControl();
drawAnimationControl(panel);
if(timeline_show_time > -1) {
TOOLTIP = "Frame " + string(timeline_show_time) + "/" + string(ANIMATOR.frames_total);

View file

@ -1,7 +1,12 @@
function Panel_Collection(_panel) : PanelContent(_panel) constructor {
function Panel_Collection() : PanelContent() constructor {
expandable = false;
group_w = ui(180);
content_w = w - ui(24) - group_w;
content_h = h - ui(40) - ui(16);
function initSize() {
content_w = w - ui(24) - group_w;
content_h = h - ui(40) - ui(16);
}
initSize();
min_w = group_w + ui(40);
min_h = ui(40);
@ -174,7 +179,7 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
var hh = ui(8);
for(var i = 0; i < ds_list_size(root.subDir); i++) {
var hg = root.subDir[| i].draw(self, ui(8), _y, _m, folderPane.w - ui(16), HOVER == panel, FOCUS == panel, root);
var hg = root.subDir[| i].draw(self, ui(8), _y, _m, folderPane.w - ui(16), pHOVER, pFOCUS, root);
hh += hg;
_y += hg;
}
@ -209,15 +214,15 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
}
}
function drawContent() {
function drawContent(panel) {
draw_clear_alpha(c_ui_blue_black, 0);
var content_y = ui(48);
draw_sprite_stretched(s_ui_panel_bg, 1, group_w, content_y, content_w + ui(16), content_h);
contentPane.active = HOVER == panel;
contentPane.active = pHOVER;
contentPane.draw(group_w + ui(8), content_y, mx - group_w - ui(8), my - content_y);
folderPane.active = HOVER == panel;
folderPane.active = pHOVER;
folderPane.draw(0, content_y, mx, my - content_y);
var _x = ui(16);
@ -226,10 +231,11 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
for( var i = 0; i < array_length(roots); i++ ) {
var r = roots[i];
var b = buttonInstant(s_button_hide_fill, _x - ui(8), _y - bh / 2, string_width(r[0]) + ui(20), bh, [mx, my], FOCUS == panel, HOVER == panel);
var b = buttonInstant(s_button_hide_fill, _x - ui(8), _y - bh / 2, string_width(r[0]) + ui(20), bh, [mx, my], pFOCUS, pHOVER);
if(b == 2) {
mode = i;
root = r[1];
context = root;
}
draw_set_text(f_p0b, fa_left, fa_center, i == mode? c_ui_blue_white : c_ui_blue_dkgrey);
@ -241,25 +247,22 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
var bx = w - ui(40);
var by = ui(12);
//tb_search.hover = HOVER == panel;
//tb_search.focus = FOCUS == panel;
//tb_search.hover = pHOVER;
//tb_search.focus = pFOCUS;
//if(tb_search.focus)
// TEXTBOX_ACTIVE = tb_search;
//else if(TEXTBOX_ACTIVE == tb_search)
// TEXTBOX_ACTIVE = noone;
if(search_string == "") {
if(FOCUS == panel)
tb_search.editText();
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], FOCUS == panel, HOVER == panel, contentView? "Grid view" : "List view", s_view_mode, contentView) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], pFOCUS, pHOVER, contentView? "Grid view" : "List view", s_view_mode, contentView) == 2) {
contentView = !contentView;
}
bx -= ui(32);
if(mode == 0) {
if(context != root) {
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], FOCUS == panel, HOVER == panel, "Add selecting node as collection", s_add_24, 0, c_ui_lime) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], pFOCUS, pHOVER, "Add selecting node as collection", s_add_24, 0, c_ui_lime) == 2) {
if(PANEL_INSPECTOR.inspecting != noone) {
var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8));
data_path = context.path;
@ -283,7 +286,7 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
}
bx -= ui(32);
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], FOCUS == panel, HOVER == panel, "Add folder") == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], pFOCUS, pHOVER, "Add folder") == 2) {
var dia = dialogCall(o_dialog_file_name, mouse_mx + 8, mouse_my + 8);
dia.onModify = function (txt) {
directory_create(txt);
@ -295,14 +298,14 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
bx -= ui(32);
}
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], FOCUS == panel, HOVER == panel, "Open in file explorer", s_folder_24) == 2) {
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], pFOCUS, pHOVER, "Open in file explorer", s_folder_24) == 2) {
var _contPath = context.path;
var _windir = environment_get_variable("WINDIR") + "/explorer.exe";
execute_shell_simple(_windir, _contPath);
}
bx -= ui(32);
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], FOCUS == panel, HOVER == panel, "Refresh", s_refresh_16) == 2)
if(buttonInstant(s_button_hide, bx, by, ui(24), ui(24), [mx, my], pFOCUS, pHOVER, "Refresh", s_refresh_16) == 2)
refreshContext();
bx -= ui(32);
} else {
@ -317,7 +320,7 @@ function Panel_Collection(_panel) : PanelContent(_panel) constructor {
if(file_dragging.spr)
draw_sprite_ext(file_dragging.spr, 0, mx, my, 1, 1, 0, c_white, 0.5);
if(HOVER == PANEL_GRAPH.panel)
if(panelHover(PANEL_GRAPH))
dragToGraph();
if(mouse_check_button_released(mb_left))

View file

@ -127,11 +127,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
function set(_content) {
content = _content;
content.panel = self;
content.x = x;
content.y = y;
content.w = w;
content.h = h;
content.onSetPanel(self);
}
function split_h(_w) {
@ -198,7 +194,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
}
function stepBegin() {
if(content) content.onStepBegin();
if(content) content.onStepBegin(self);
if(dragging == 1) {
var _mx = clamp(mouse_mx, ui(16), WIN_W - ui(16));
@ -271,12 +267,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
if(mouse_check_button_released(mb_left)) dragging = -1;
} else {
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
_panel.stepBegin();
}
if(ds_list_empty(childs)) {
if(content != noone) {
if(point_in_rectangle(mouse_mx, mouse_my, x + ui(2), y + ui(2), x + w - ui(4), y + h - ui(4))) {
HOVER = self;
if(mouse_check_button_pressed(mb_left)) setFocus(self);
@ -285,6 +276,11 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
if(sFOCUS && content)
FOCUS_STR = content.context_str;
}
} else {
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
_panel.stepBegin();
}
}
}
}
@ -297,47 +293,51 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
}
function draw() {
if(ds_list_empty(childs)) {
if(content != noone) {
drawPanel();
} else {
var _drag = true;
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
if(_panel.content && !_panel.content.draggable)
_drag = false;
}
return;
}
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
_panel.draw();
if(ds_list_empty(childs))
return;
var _drag = true;
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
if(_panel.content && !_panel.content.draggable)
_drag = false;
}
for(var i = 0; i < ds_list_size(childs); i++) {
var _panel = childs[| i];
_panel.draw();
if!(_drag && (HOVER == noone || is_struct(HOVER)))
continue;
if!(_drag && (HOVER == noone || is_struct(HOVER)))
continue;
switch(_panel.anchor) {
case ANCHOR.left :
if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x + _panel.w - ui(2), _panel.y, _panel.x + _panel.w + ui(2), _panel.y + _panel.h))
break;
CURSOR = cr_size_we;
if(mouse_check_button_pressed(mb_left)) {
dragging = 1;
drag_sval = _panel.w;
drag_sm = mouse_mx;
}
switch(_panel.anchor) {
case ANCHOR.left :
if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x + _panel.w - ui(2), _panel.y, _panel.x + _panel.w + ui(2), _panel.y + _panel.h))
break;
case ANCHOR.top :
if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x, _panel.y + _panel.h - ui(2), _panel.x + _panel.w, _panel.y + _panel.h + ui(2)))
break;
CURSOR = cr_size_ns;
if(mouse_check_button_pressed(mb_left)) {
dragging = 2;
drag_sval = _panel.h;
drag_sm = mouse_my;
}
CURSOR = cr_size_we;
if(mouse_check_button_pressed(mb_left)) {
dragging = 1;
drag_sval = _panel.w;
drag_sm = mouse_mx;
}
break;
case ANCHOR.top :
if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x, _panel.y + _panel.h - ui(2), _panel.x + _panel.w, _panel.y + _panel.h + ui(2)))
break;
}
CURSOR = cr_size_ns;
if(mouse_check_button_pressed(mb_left)) {
dragging = 2;
drag_sval = _panel.h;
drag_sm = mouse_my;
}
break;
}
}
}
@ -358,7 +358,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
min_w = content.min_w;
min_h = content.min_h;
if(w >= min_w && h >= min_h)
content.draw();
content.draw(self);
}
gpu_set_blendmode(bm_subtract);
@ -384,23 +384,25 @@ function Panel(_parent, _x, _y, _w, _h) constructor {
}
}
function PanelContent(_panel) constructor {
function PanelContent() constructor {
context_str = "";
panel = _panel;
panel.content = self;
draggable = true;
expandable = true;
x = panel.x;
y = panel.y;
w = panel.w;
h = panel.h;
mx = 0;
my = 0;
x = 0;
y = 0;
w = 1;
h = 1;
min_w = ui(32);
min_h = ui(32);
pFOCUS = false;
pHOVER = false;
function refresh() {
onResize();
}
@ -410,7 +412,23 @@ function PanelContent(_panel) constructor {
function onFocusBegin() {}
function onFocusEnd() {}
function onStepBegin() {
function initSize() {}
function setPanelSize(panel) {
x = panel.x;
y = panel.y;
w = panel.w;
h = panel.h;
}
function onSetPanel(panel) {
setPanelSize(panel);
initSize();
onResize();
}
function onStepBegin(panel) {
setPanelSize(panel);
mx = mouse_mx - x;
my = mouse_my - y;
@ -419,11 +437,14 @@ function PanelContent(_panel) constructor {
function stepBegin() {}
function draw() {
drawContent();
function draw(panel) {
pFOCUS = FOCUS == panel;
pHOVER = HOVER == panel;
drawContent(panel);
}
function drawContent() {}
function drawContent(panel) {}
}
function setFocus(target) {

View file

@ -1,6 +1,9 @@
#region data
globalvar PANEL_MAIN, PANEL_MENU, PANEL_PREVIEW, PANEL_INSPECTOR, PANEL_GRAPH, PANEL_ANIMATION, PANEL_COLLECTION;
globalvar FULL_SCREEN_CONTENT;
PANEL_MAIN = 0;
FULL_SCREEN_CONTENT = noone;
#endregion
#region panel class
@ -35,43 +38,48 @@
function setPanel() {
PANEL_MAIN = new Panel(noone, 0, 0, WIN_SW, WIN_SH);
PANEL_MENU = new Panel_Menu();
PANEL_INSPECTOR = new Panel_Inspector();
PANEL_ANIMATION = new Panel_Animation();
PANEL_PREVIEW = new Panel_Preview();
PANEL_GRAPH = new Panel_Graph();
PANEL_COLLECTION = new Panel_Collection();
var split_menu = PANEL_MAIN.split_v(ui(40));
PANEL_MENU = new Panel_Menu(split_menu[0]);
split_menu[0].set(PANEL_MENU);
var split_ins = split_menu[1].split_h(ui(-400));
PANEL_INSPECTOR = new Panel_Inspector(split_ins[1]);
split_ins[1].set(PANEL_INSPECTOR);
switch(PREF_MAP[? "panel_layout"]) {
case 0 :
var split_anim = split_ins[0].split_v(ui(-48));
PANEL_ANIMATION = new Panel_Animation(split_anim[1]);
split_anim[1].set(PANEL_ANIMATION);
var split_prev = split_anim[0].split_v(ui(-500));
PANEL_PREVIEW = new Panel_Preview(split_prev[0]);
PANEL_GRAPH = new Panel_Graph(split_prev[1]);
split_prev[0].set(PANEL_PREVIEW);
split_prev[1].set(PANEL_GRAPH);
if(PREF_MAP[? "panel_collection"]) {
var pane = PANEL_GRAPH.panel.split_h(ui(460));
var pane = split_prev[1].split_h(ui(460));
if(pane == noone) break;
pane[1].set(PANEL_GRAPH);
PANEL_COLLECTION = new Panel_Collection(pane[0]);
pane[0].set(PANEL_COLLECTION);
}
break;
case 1 :
var split_anim = split_ins[0].split_v(ui(-300));
PANEL_ANIMATION = new Panel_Animation(split_anim[1]);
split_anim[1].set(PANEL_ANIMATION);
var split_prev = split_anim[0].split_h(ui(400));
PANEL_PREVIEW = new Panel_Preview(split_prev[0]);
PANEL_GRAPH = new Panel_Graph(split_prev[1]);
split_prev[0].set(PANEL_PREVIEW);
split_prev[1].set(PANEL_GRAPH);
if(PREF_MAP[? "panel_collection"]) {
var pane = PANEL_ANIMATION.panel.split_h(ui(500));
var pane = split_anim[1].split_h(ui(500));
if(pane == noone) break;
pane[1].set(PANEL_ANIMATION);
PANEL_COLLECTION = new Panel_Collection(pane[0]);
pane[0].set(PANEL_COLLECTION);
}
break;
}
@ -98,4 +106,35 @@
return _res;
}
#endregion
#region fullscreen
function set_focus_fullscreen() {
if(FULL_SCREEN_CONTENT != noone) {
PANEL_MAIN.childs[| 1].content = noone;
FULL_SCREEN_CONTENT = noone;
return;
}
var panel = PREF_MAP[? "expand_hover"]? HOVER : FOCUS;
if(panel == noone) return;
if(!is_struct(panel)) return;
if(instanceof(panel) != "Panel") return;
if(panel.content == noone) return;
if(!panel.content.expandable) return;
PANEL_MAIN.childs[| 1].set(panel.content);
FULL_SCREEN_CONTENT = panel;
}
#endregion
#region function
function panelHover(content) {
return HOVER && is_struct(HOVER) && instanceof(HOVER) == "Panel" && HOVER.content == content;
}
function panelFocus(content) {
return FOCUS && is_struct(FOCUS) && instanceof(FOCUS) == "Panel" && FOCUS.content == content;
}
#endregion

View file

@ -1,4 +1,4 @@
function Panel_Graph(_panel) : PanelContent(_panel) constructor {
function Panel_Graph() : PanelContent() constructor {
context_str = "Graph";
scale = [ 0.25, 0.33, 0.5, 0.65, 0.8, 1, 1.2, 1.35, 1.5];
@ -12,7 +12,11 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
graph_x = round(w / 2 / graph_s);
graph_y = round(h / 2 / graph_s);
}
toOrigin();
function initSize() {
toOrigin();
}
initSize();
graph_dragging = false;
graph_drag_mx = 0;
@ -217,7 +221,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
graph_dragging = false;
}
if(mouse_on_graph && FOCUS == panel) {
if(mouse_on_graph && pFOCUS) {
var _doDragging = false;
if(mouse_check_button_pressed(mb_middle)) {
_doDragging = true;
@ -236,7 +240,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
}
}
if(mouse_on_graph && HOVER == panel) {
if(mouse_on_graph && pHOVER) {
var _s = graph_s;
if(mouse_wheel_down()) {
graph_s_index = max(0, graph_s_index - 1);
@ -319,7 +323,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
}
#endregion
if(mouse_on_graph && FOCUS == panel) {
if(mouse_on_graph && pFOCUS) {
if(mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
if(keyboard_check(vk_shift)) {
if(ds_list_empty(nodes_select_list) && node_focus)
@ -562,7 +566,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
}
#endregion
if(mouse_on_graph && FOCUS == panel) {
if(mouse_on_graph && pFOCUS) {
if(node_focus && value_focus == noone) {
if(mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
node_dragging = node_focus;
@ -618,7 +622,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
nodes_select_drag = false;
}
if(mouse_on_graph && FOCUS == panel && mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
if(mouse_on_graph && pFOCUS && mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
if(!node_focus && !value_focus && !drag_locking) {
nodes_select_drag = true;
nodes_select_mx = mx;
@ -921,7 +925,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
}
} else {
if(value_focus) {
if(FOCUS == panel && mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
if(pFOCUS && mouse_check_button_pressed(mb_left) && !keyboard_check(vk_control)) {
value_dragging = value_focus;
}
}
@ -941,7 +945,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
function drawContext() {
draw_set_text(f_p0, fa_left, fa_center, c_ui_blue_ltgrey);
var xx = ui(16), tt, tw, th;
var bh = toolbar_height - ui(10);
var bh = toolbar_height - ui(12);
var tbh = h - toolbar_height / 2;
draw_set_color(c_ui_blue_ltgrey);
@ -957,7 +961,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
th = string_height(tt);
if(i < ds_list_size(node_context) - 1) {
if(buttonInstant(s_button_hide_fill, xx - ui(6), tbh - bh / 2, tw + ui(12), bh, [mx, my], FOCUS == panel, HOVER == panel) == 2) {
if(buttonInstant(s_button_hide_fill, xx - ui(6), tbh - bh / 2, tw + ui(12), bh, [mx, my], pFOCUS, pHOVER) == 2) {
node_hover = noone;
node_focus = noone;
PANEL_PREVIEW.preview_node[0] = noone;
@ -1013,7 +1017,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
var tbInd = tb[1]();
var tbTooltip = tb[2]();
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], FOCUS == panel, HOVER == panel, tbTooltip, tbSpr, tbInd);
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pFOCUS, pHOVER, tbTooltip, tbSpr, tbInd);
if(b == 2) tb[3]( { x: x + tbx - ui(14), y: y + tby - ui(14) } );
tbx -= ui(32);
@ -1160,7 +1164,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
return;
}
function drawContent() {
function drawContent(panel) {
dragGraph();
draw_clear(c_ui_blue_black);
@ -1183,7 +1187,7 @@ function Panel_Graph(_panel) : PanelContent(_panel) constructor {
if(minimap_show)
drawMinimap();
if(FOCUS == panel) {
if(pFOCUS) {
if(node_focus) node_focus.focusStep();
}
}

View file

@ -3,7 +3,7 @@ function Inspector_Custom_Renderer(draw) constructor {
self.draw = draw;
}
function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
function Panel_Inspector() : PanelContent() constructor {
context_str = "Inspector";
inspecting = noone;
@ -12,8 +12,11 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
prop_hover = noone;
prop_selecting = noone;
content_w = w - ui(32);
content_h = h - top_bar_h - ui(24);
function initSize() {
content_w = w - ui(32);
content_h = h - top_bar_h - ui(24);
}
initSize();
keyframe_dragging = noone;
keyframe_drag_st = 0;
@ -28,11 +31,17 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
addHotkey("Inspector", "Copy property", "C", MOD_KEY.ctrl, function() { propSelectCopy(); });
addHotkey("Inspector", "Paste property", "V", MOD_KEY.ctrl, function() { propSelectPaste(); });
function onResize() {
content_w = w - ui(32);
content_h = h - top_bar_h - ui(24);
contentPane.resize(content_w, content_h);
}
contentPane = new scrollPane(content_w, content_h, function(_y, _m) {
var con_w = contentPane.surface_w;
draw_clear_alpha(c_ui_blue_black, 0);
if(FOCUS == panel)
if(pFOCUS)
if(point_in_rectangle(_m[0], _m[1], 0, 0, con_w, content_h) && mouse_check_button_pressed(mb_left))
prop_selecting = noone;
@ -57,10 +66,10 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
var txt = jun_disp[0];
var coll = jun_disp[1];
if(HOVER == panel && point_in_rectangle(_m[0], _m[1], 0, yy, con_w, yy + ui(32))) {
if(pHOVER && point_in_rectangle(_m[0], _m[1], 0, yy, con_w, yy + ui(32))) {
draw_sprite_stretched_ext(s_node_name, 0, 0, yy, con_w, ui(32), c_ui_blue_white, 1);
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
jun_disp[@ 1] = !coll;
}
} else
@ -86,8 +95,8 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
}
continue;
} else if(is_struct(jun_disp) && instanceof(jun_disp) == "Inspector_Custom_Renderer") {
var hov = HOVER == panel;
var foc = FOCUS == panel;
var hov = pHOVER;
var foc = pFOCUS;
jun_disp.draw(ui(6), yy, con_w - ui(12), _m, hov, foc);
hh += jun_disp.h + ui(20);
continue;
@ -103,7 +112,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
var butx = ui(16);
var index = jun.value_from == noone? jun.animator.is_anim : 2;
draw_sprite_ui_uniform(s_animate_clock, index, butx, lb_y, 1, c_white, 0.8);
if(HOVER == panel && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
if(pHOVER && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
draw_sprite_ui_uniform(s_animate_clock, index, butx, lb_y, 1, c_white, 1);
TOOLTIP = "Toggle animation";
@ -119,7 +128,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
butx += ui(20);
index = jun.visible;
draw_sprite_ui_uniform(s_junc_visible, index, butx, lb_y, 1, c_white, 0.8);
if(HOVER == panel && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
if(pHOVER && point_in_circle(_m[0], _m[1], butx, lb_y, ui(10))) {
draw_sprite_ui_uniform(s_junc_visible, index, butx, lb_y, 1, c_white, 1);
TOOLTIP = "Visibility";
@ -136,7 +145,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
if(lineBreak && jun.animator.is_anim) {
var bx = w - ui(64);
var by = lb_y;
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, FOCUS == panel, HOVER == panel, "", s_prop_keyframe, 2) == 2) {
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, pFOCUS, pHOVER, "", s_prop_keyframe, 2) == 2) {
for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j];
if(_key.time > ANIMATOR.current_frame) {
@ -156,7 +165,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
}
}
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, FOCUS == panel, HOVER == panel, cc == c_ui_blue_grey? "Add keyframe" : "Remove keyframe", s_prop_keyframe, 1, cc) == 2) {
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, pFOCUS, pHOVER, cc == c_ui_blue_grey? "Add keyframe" : "Remove keyframe", s_prop_keyframe, 1, cc) == 2) {
var _add = false;
for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j];
@ -175,7 +184,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
}
bx -= ui(26);
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, FOCUS == panel, HOVER == panel, "", s_prop_keyframe, 0) == 2) {
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, pFOCUS, pHOVER, "", s_prop_keyframe, 0) == 2) {
var _t = -1;
for(var j = 0; j < ds_list_size(jun.animator.values); j++) {
var _key = jun.animator.values[| j];
@ -195,7 +204,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
draw_line(bx - ui(20), by - lhf, bx - ui(20), by + lhf);
bx -= ui(26 + 12);
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, FOCUS == panel, HOVER == panel, "Looping mode " + ON_END_NAME[jun.on_end], s_prop_on_end, jun.on_end) == 2)
if(buttonInstant(s_button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, pFOCUS, pHOVER, "Looping mode " + ON_END_NAME[jun.on_end], s_prop_on_end, jun.on_end) == 2)
jun.on_end = safe_mod(jun.on_end + 1, sprite_get_number(s_prop_on_end));
}
#endregion
@ -214,8 +223,8 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
var widH = lineBreak? editBoxH : 0;
if(jun.editWidget) {
jun.editWidget.active = FOCUS == panel;
jun.editWidget.hover = HOVER == panel;
jun.editWidget.active = pFOCUS;
jun.editWidget.hover = pHOVER;
switch(jun.display_type) {
case VALUE_DISPLAY.button :
@ -256,8 +265,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
widH = ui(204);
break;
case VALUE_DISPLAY.puppet_control :
jun.editWidget.draw(editBoxX, editBoxY, editBoxW, jun.showValue(), _m, ui(16) + x, top_bar_h + y);
widH = ui(164);
widH = jun.editWidget.draw(editBoxX, editBoxY, editBoxW, jun.showValue(), _m, ui(16) + x, top_bar_h + y);
break;
}
break;
@ -331,18 +339,18 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
hh += lb_h + widH + padd;
var _selY = yy - ui(0);
var _selY1 = max(yy + lb_h, editBoxY + widH + ui(4));
var _selH = _selY1 - _selY;
var _selY = yy - ui(0);
var _selY1 = yy + lb_h + widH + ui(2);
var _selH = _selY1 - _selY;
if(prop_selecting == jun)
draw_sprite_stretched(s_prop_selecting, 1, 4, _selY, contentPane.surface_w - ui(8), _selH);
if(HOVER == panel && point_in_rectangle(_m[0], _m[1], 4, _selY, contentPane.surface_w - ui(4), _selY + _selH)) {
if(pHOVER && point_in_rectangle(_m[0], _m[1], 4, _selY, contentPane.surface_w - ui(4), _selY + _selH)) {
draw_sprite_stretched(s_prop_selecting, 0, 4, _selY, contentPane.surface_w - ui(8), _selH);
prop_hover = jun;
if(FOCUS == panel) {
if(pFOCUS) {
if(mouse_check_button_pressed(mb_left))
prop_selecting = jun;
@ -382,18 +390,12 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
prop_selecting.setString(clipboard_get_text());
}
function onResize() {
content_w = w - ui(32);
content_h = h - top_bar_h - ui(24);
contentPane.resize(content_w, content_h);
}
function drawInspectingNode() {
draw_set_text(f_h5, fa_center, fa_top, c_white);
tb_node_name.font = f_h5;
tb_node_name.hide = true;
tb_node_name.active = FOCUS == panel;
tb_node_name.hover = HOVER == panel;
tb_node_name.active = pFOCUS;
tb_node_name.hover = pHOVER;
tb_node_name.align = fa_center;
tb_node_name.draw(ui(64), ui(14), w - ui(128), ui(32), inspecting.name, [mx, my]);
@ -401,7 +403,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
var bx = w - ui(44);
var by = ui(12);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "Run node", s_sequence_control, 1) == 2)
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Run node", s_sequence_control, 1) == 2)
inspecting.doUpdate();
}
@ -409,12 +411,12 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
var bx = ui(8);
var by = ui(12);
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], FOCUS == panel, HOVER == panel, "This node cache output for performance.\nClick to clear all cached frames in this node.", s_cache) = 2)
if(buttonInstant(s_button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "This node cache output for performance.\nClick to clear all cached frames in this node.", s_cache) = 2)
inspecting.clearCache();
}
}
function drawContent() {
function drawContent(panel) {
draw_clear_alpha(c_ui_blue_black, 0);
lineBreak = w < PREF_MAP[? "inspector_line_break_width"];
@ -423,7 +425,7 @@ function Panel_Inspector(_panel) : PanelContent(_panel) constructor {
if(inspecting)
drawInspectingNode();
contentPane.active = HOVER == panel;
contentPane.active = pHOVER;
contentPane.draw(ui(16), top_bar_h, mx - ui(16), my - top_bar_h);
if(PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus) {

View file

@ -1,4 +1,4 @@
function Panel_Menu(_panel) : PanelContent(_panel) constructor {
function Panel_Menu() : PanelContent() constructor {
draggable = false;
noti_flash = 0;
@ -9,6 +9,7 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
NEW();
}, ["", "New file"] ],
[ "Open...", function() { LOAD(); }, ["", "Open"] ],
[ "Open...", function() { LOAD(); }, ["", "Open"] ],
[ "Save", function() { SAVE(); }, ["", "Save"] ],
[ "Save as...", function() { SAVE_AS(); }, ["", "Save as"] ],
[ "Recent files", function(_x, _y, _depth) {
@ -76,12 +77,12 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
]],
]
function drawContent() {
function drawContent(panel) {
draw_clear_alpha(c_ui_blue_black, 0);
draw_sprite_ui_uniform(icon_24, 0, h / 2, h / 2, 1, c_white);
var xx = h;
if(FOCUS == panel && point_in_rectangle(mx, my, 0, 0, ui(40), ui(32))) {
if(pFOCUS && point_in_rectangle(mx, my, 0, 0, ui(40), ui(32))) {
if(mouse_check_button_pressed(mb_left)) {
dialogCall(o_dialog_about);
}
@ -92,11 +93,11 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
var ww = string_width(menus[i][0]) + ui(16);
var xc = xx + ww / 2;
if(HOVER == panel) {
if(pHOVER) {
if(point_in_rectangle(mx, my, xc - ww / 2, 0, xc + ww / 2, h)) {
draw_sprite_stretched(s_menu_button, 0, xc - ww / 2, ui(6), ww, h - ui(12));
if((FOCUS == panel && mouse_check_button_pressed(mb_left)) || instance_exists(o_dialog_menubox)) {
if((pFOCUS && mouse_check_button_pressed(mb_left)) || instance_exists(o_dialog_menubox)) {
var dia = dialogCall(o_dialog_menubox, x + xx, y + h);
dia.setMenu(menus[i][1]);
}
@ -154,10 +155,10 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
draw_set_text(f_p0, fa_right, fa_center, c_ui_blue_grey);
var txt = "v. " + string(VERSION_STRING);
var ww = string_width(txt);
if(HOVER == panel && point_in_rectangle(mx, my, w - ui(16) - ww, 0, w - ui(16), h)) {
if(pHOVER && point_in_rectangle(mx, my, w - ui(16) - ww, 0, w - ui(16), h)) {
draw_sprite_stretched(s_menu_button, 0, w - ww - ui(22), ui(6), ww + ui(12), h - ui(12));
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
dialogCall(o_dialog_release_note);
}
}
@ -169,10 +170,10 @@ function Panel_Menu(_panel) : PanelContent(_panel) constructor {
var txt = " Newer version available ";
var ww = string_width(txt);
if(HOVER == panel && point_in_rectangle(mx, my, xx - ww, 0, xx, h)) {
if(pHOVER && point_in_rectangle(mx, my, xx - ww, 0, xx, h)) {
draw_sprite_stretched(s_menu_button, 0, xx - ww - ui(6), ui(6), ww + ui(12), h - ui(12));
if(FOCUS == panel && mouse_check_button_pressed(mb_left)) {
if(pFOCUS && mouse_check_button_pressed(mb_left)) {
url_open("https://makham.itch.io/pixel-composer");
}
}

View file

@ -1,10 +1,14 @@
function Panel_Preview(_panel) : PanelContent(_panel) constructor {
function Panel_Preview() : PanelContent() constructor {
context_str = "Preview";
last_focus = noone;
canvas_x = w / 2 - ui(64);
canvas_y = h / 2 - ui(64);
function initSize() {
canvas_x = w / 2 - ui(64);
canvas_y = h / 2 - ui(64);
}
initSize();
canvas_s = ui(1);
canvas_w = ui(128);
canvas_h = ui(128);
@ -162,7 +166,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
canvas_dragging = false;
}
if(FOCUS == panel && HOVER == panel && canvas_hover) {
if(pFOCUS && pHOVER && canvas_hover) {
if(mouse_check_button_pressed(mb_middle)) {
canvas_dragging = true;
canvas_drag_mx = mx;
@ -231,10 +235,10 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
ww = max(ww, string_width(_node.outputs[| i].name) + ui(40));
}
sbChannel.data_list = chName;
sbChannel.hover = HOVER == panel;
sbChannel.active = FOCUS == panel;
sbChannel.hover = pHOVER;
sbChannel.active = pFOCUS;
sbChannel.draw(_x - ww, _y - hh / 2, ww, hh, _node.outputs[| _node.preview_channel].name, [mx, my], panel.x, panel.y);
sbChannel.draw(_x - ww, _y - hh / 2, ww, hh, _node.outputs[| _node.preview_channel].name, [mx, my], x, y);
right_menu_y += ui(40);
}
@ -382,7 +386,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
preview_x_to = 0;
}
if(HOVER == panel && my > h - toolbar_height - prev_size - ui(16)) {
if(pHOVER && my > h - toolbar_height - prev_size - ui(16)) {
canvas_hover = false;
if(mouse_wheel_down()) preview_x_to = clamp(preview_x_to - prev_size, - preview_x_max, 0);
if(mouse_wheel_up()) preview_x_to = clamp(preview_x_to + prev_size, - preview_x_max, 0);
@ -403,7 +407,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
draw_set_color(c_ui_blue_grey);
draw_rectangle(xx, yy, xx + prev_w * ss, yy + prev_h * ss, true);
if(FOCUS == panel && point_in_rectangle(mx, my, xx, yy, xx + prev_w * ss, yy + prev_h * ss)) {
if(pFOCUS && point_in_rectangle(mx, my, xx, yy, xx + prev_w * ss, yy + prev_h * ss)) {
if(mouse_check_button_pressed(mb_left)) {
_node.preview_index = i;
_node.onValueUpdate(0);
@ -426,7 +430,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
var by = h - toolbar_height - prev_size - ui(56);
var bx = ui(10);
var b = buttonInstant(s_button_hide, bx, by, ui(40), ui(40), [mx, my], FOCUS == panel, HOVER == panel);
var b = buttonInstant(s_button_hide, bx, by, ui(40), ui(40), [mx, my], pFOCUS, pHOVER);
if(_node.preview_speed == 0) {
if(b) {
@ -448,14 +452,14 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
var active = _active;
var _mx = mx;
var _my = my;
var isHover = HOVER == panel && mouse_on_preview;
var isHover = pHOVER && mouse_on_preview;
if(_node.tools != -1) {
var xx = ui(16);
var yy = ui(16);
for(var i = 0; i < array_length(_node.tools); i++) {
var b = buttonInstant(s_button, xx, yy, ui(40), ui(40), [_mx, _my], FOCUS == panel, isHover);
var b = buttonInstant(s_button, xx, yy, ui(40), ui(40), [_mx, _my], pFOCUS, isHover);
if(b > 0) active = false;
yy += ui(48);
}
@ -468,14 +472,14 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
var yy = ui(16);
for(var i = 0; i < array_length(_node.tools); i++) {
var b = buttonInstant(s_button, xx, yy, ui(40), ui(40), [_mx, _my], FOCUS == panel, isHover);
var b = buttonInstant(s_button, xx, yy, ui(40), ui(40), [_mx, _my], pFOCUS, isHover);
var toggle = false;
if(b == 1)
TOOLTIP = _node.tools[i][0];
else if(b == 2)
toggle = true;
if(FOCUS == panel && keyboard_check_pressed(ord(string(i + 1))))
if(pFOCUS && keyboard_check_pressed(ord(string(i + 1))))
toggle = true;
if(toggle) {
@ -524,7 +528,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
var tbInd = tb[1]();
var tbTooltip = tb[2]();
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], FOCUS == panel, HOVER == panel, tbTooltip, tbSpr, tbInd);
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pFOCUS, pHOVER, tbTooltip, tbSpr, tbInd);
if(b == 2) tb[3]( { x: x + tbx - ui(14), y: y + tby - ui(14) } );
tbx += ui(32);
@ -536,7 +540,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
var tbSpr = tb[0];
var tbTooltip = tb[1];
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], FOCUS == panel, HOVER == panel, tbTooltip, tbSpr, 0);
var b = buttonInstant(s_button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pFOCUS, pHOVER, tbTooltip, tbSpr, 0);
if(b == 2) tb[2]();
tbx -= ui(32);
@ -609,7 +613,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
}
}
function drawContent() {
function drawContent(panel) {
mouse_on_preview = point_in_rectangle(mx, my, 0, 0, w, h - toolbar_height);
draw_clear(c_ui_blue_black);
@ -625,7 +629,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
drawPreviewOverlay();
if(PANEL_GRAPH.node_focus)
drawNodeTools(FOCUS == panel, PANEL_GRAPH.node_focus);
drawNodeTools(pFOCUS, PANEL_GRAPH.node_focus);
if(last_focus != PANEL_GRAPH.node_focus) {
last_focus = PANEL_GRAPH.node_focus;
tool_index = -1;
@ -636,7 +640,7 @@ function Panel_Preview(_panel) : PanelContent(_panel) constructor {
fullView();
}
if(FOCUS == panel) {
if(pFOCUS) {
if(mouse_check_button_pressed(mb_right)) {
var dia = dialogCall(o_dialog_menubox, mouse_mx + ui(8), mouse_my + ui(8));
dia.setMenu([

View file

@ -34,6 +34,7 @@
PREF_MAP[? "verlet_iteration"] = 4;
PREF_MAP[? "collection_preview_speed"] = 60;
PREF_MAP[? "expand_hover"] = false;
#endregion
#region hotkeys

View file

@ -72,7 +72,7 @@ function SAVE_AS() {
path += ".pxc";
if(file_exists(path))
noti_warning("Overrided file : " + path);
log_warning("SAVE", "Overrided file : " + path);
SAVE_AT(path);
SET_PATH(path);
}
@ -87,8 +87,7 @@ function SAVE_AT(path) {
READONLY = false;
MODIFIED = false;
log_message("FILE", "save at " + path);
noti_status("File saved", s_noti_icon_file_save);
log_message("FILE", "save at " + path, s_noti_icon_file_save);
}
function SAVE_COLLECTIONS(_list, _path, save_surface = true) {

View file

@ -0,0 +1,10 @@
function string_lead_zero(val, digit) {
var len = string_length(string(val));
var zer = digit - len;
var ss = "";
repeat(zer) ss += "0";
ss += string(val);
return ss;
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "string_formatting",
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "string",
"path": "folders/functions/string.yy",
},
}

View file

@ -18,6 +18,40 @@ uniform float radius;
uniform float shift;
uniform int type;
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 0.0000000001;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float hueDist(float a0, float a1, float t) {
float da = fract(a1 - a0);
float ds = fract(2. * da) - da;
return a0 + ds * t;
}
vec3 hsvMix(vec3 c1, vec3 c2, float t) {
vec3 h1 = rgb2hsv(c1);
vec3 h2 = rgb2hsv(c2);
vec3 h = vec3(0.);
h.x = h.x + hueDist(h1.x, h2.x, t);
h.y = mix(h1.y, h2.y, t);
h.z = mix(h1.z, h2.z, t);
return hsv2rgb(h);
}
vec4 gradientEval(in float prog) {
vec4 col = vec4(0.);
@ -29,10 +63,13 @@ vec4 gradientEval(in float prog) {
if(i == 0)
col = gradient_color[i];
else {
float t = (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]);
if(gradient_blend == 0)
col = mix(gradient_color[i - 1], gradient_color[i], (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]));
col = mix(gradient_color[i - 1], gradient_color[i], t);
else if(gradient_blend == 1)
col = gradient_color[i - 1];
else if(gradient_blend == 2)
col = vec4(hsvMix(gradient_color[i - 1].rgb, gradient_color[i].rgb, t), 1.);
}
break;
}

View file

@ -0,0 +1,80 @@
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
#define TAU 6.28318
uniform int gradient_blend;
uniform vec4 gradient_color[16];
uniform float gradient_time[16];
uniform int gradient_keys;
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 0.0000000001;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float hueDist(float a0, float a1, float t) {
float da = fract(a1 - a0);
float ds = fract(2. * da) - da;
return a0 + ds * t;
}
vec3 hsvMix(vec3 c1, vec3 c2, float t) {
vec3 h1 = rgb2hsv(c1);
vec3 h2 = rgb2hsv(c2);
vec3 h = vec3(0.);
h.x = h.x + hueDist(h1.x, h2.x, t);
h.y = mix(h1.y, h2.y, t);
h.z = mix(h1.z, h2.z, t);
return hsv2rgb(h);
}
vec4 gradientEval(in float prog) {
vec4 col = vec4(0.);
for(int i = 0; i < 16; i++) {
if(gradient_time[i] == prog) {
col = gradient_color[i];
break;
} else if(gradient_time[i] > prog) {
if(i == 0)
col = gradient_color[i];
else {
float t = (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]);
if(gradient_blend == 0)
col = mix(gradient_color[i - 1], gradient_color[i], t);
else if(gradient_blend == 1)
col = gradient_color[i - 1];
else if(gradient_blend == 2)
col = vec4(hsvMix(gradient_color[i - 1].rgb, gradient_color[i].rgb, t), 1.);
}
break;
}
if(i >= gradient_keys - 1) {
col = gradient_color[gradient_keys - 1];
break;
}
}
return col;
}
void main() {
gl_FragColor = gradientEval(v_vTexcoord.x);
}

View file

@ -0,0 +1,19 @@
//
// Simple passthrough vertex shader
//
attribute vec3 in_Position; // (x,y,z)
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
attribute vec4 in_Colour; // (r,g,b,a)
attribute vec2 in_TextureCoord; // (u,v)
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main()
{
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
v_vColour = in_Colour;
v_vTexcoord = in_TextureCoord;
}

View file

@ -0,0 +1,10 @@
{
"resourceType": "GMShader",
"resourceVersion": "1.0",
"name": "sh_gradient_display",
"type": 1,
"parent": {
"name": "shader",
"path": "folders/shader.yy",
},
}

View file

@ -17,6 +17,40 @@ uniform int gradient_keys;
uniform float alpha_curve[4];
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 0.0000000001;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float hueDist(float a0, float a1, float t) {
float da = fract(a1 - a0);
float ds = fract(2. * da) - da;
return a0 + ds * t;
}
vec3 hsvMix(vec3 c1, vec3 c2, float t) {
vec3 h1 = rgb2hsv(c1);
vec3 h2 = rgb2hsv(c2);
vec3 h = vec3(0.);
h.x = h.x + hueDist(h1.x, h2.x, t);
h.y = mix(h1.y, h2.y, t);
h.z = mix(h1.z, h2.z, t);
return hsv2rgb(h);
}
vec4 gradientEval(in float prog) {
vec4 col = vec4(0.);
@ -28,10 +62,13 @@ vec4 gradientEval(in float prog) {
if(i == 0)
col = gradient_color[i];
else {
float t = (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]);
if(gradient_blend == 0)
col = mix(gradient_color[i - 1], gradient_color[i], (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]));
col = mix(gradient_color[i - 1], gradient_color[i], t);
else if(gradient_blend == 1)
col = gradient_color[i - 1];
else if(gradient_blend == 2)
col = vec4(hsvMix(gradient_color[i - 1].rgb, gradient_color[i].rgb, t), 1.);
}
break;
}

View file

@ -1,11 +1,10 @@
{
"resourceType": "GMShader",
"resourceVersion": "1.0",
"name": "sh_pixel_cloud",
"type": 1,
"parent": {
"name": "generator",
"path": "folders/shader/generator.yy",
},
"resourceVersion": "1.0",
"name": "sh_pixel_cloud",
"tags": [],
"resourceType": "GMShader",
}

View file

@ -21,6 +21,40 @@ float random (in vec2 st) {
return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123);
}
vec3 rgb2hsv(vec3 c) {
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));
vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));
float d = q.x - min(q.w, q.y);
float e = 0.0000000001;
return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);
}
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float hueDist(float a0, float a1, float t) {
float da = fract(a1 - a0);
float ds = fract(2. * da) - da;
return a0 + ds * t;
}
vec3 hsvMix(vec3 c1, vec3 c2, float t) {
vec3 h1 = rgb2hsv(c1);
vec3 h2 = rgb2hsv(c2);
vec3 h = vec3(0.);
h.x = h.x + hueDist(h1.x, h2.x, t);
h.y = mix(h1.y, h2.y, t);
h.z = mix(h1.z, h2.z, t);
return hsv2rgb(h);
}
vec4 gradientEval(in float prog) {
vec4 col = vec4(0.);
@ -32,10 +66,13 @@ vec4 gradientEval(in float prog) {
if(i == 0)
col = gradient_color[i];
else {
float t = (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]);
if(gradient_blend == 0)
col = mix(gradient_color[i - 1], gradient_color[i], (prog - gradient_time[i - 1]) / (gradient_time[i] - gradient_time[i - 1]));
col = mix(gradient_color[i - 1], gradient_color[i], t);
else if(gradient_blend == 1)
col = gradient_color[i - 1];
else if(gradient_blend == 2)
col = vec4(hsvMix(gradient_color[i - 1].rgb, gradient_color[i].rgb, t), 1.);
}
break;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 108 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 B

After

Width:  |  Height:  |  Size: 108 B

View file

@ -11,15 +11,15 @@
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 0,
"bbox_right": 15,
"bbox_right": 31,
"bbox_top": 0,
"bbox_bottom": 15,
"bbox_bottom": 31,
"HTile": false,
"VTile": false,
"For3D": false,
"DynamicTexturePage": false,
"width": 16,
"height": 16,
"width": 32,
"height": 32,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
@ -58,8 +58,8 @@
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 8,
"yorigin": 8,
"xorigin": 16,
"yorigin": 16,
"eventToFunction": {},
"eventStubScript": null,
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 B

After

Width:  |  Height:  |  Size: 138 B

View file

@ -11,15 +11,15 @@
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 0,
"bbox_right": 15,
"bbox_right": 31,
"bbox_top": 0,
"bbox_bottom": 15,
"bbox_bottom": 31,
"HTile": false,
"VTile": false,
"For3D": false,
"DynamicTexturePage": false,
"width": 16,
"height": 16,
"width": 32,
"height": 32,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
@ -58,8 +58,8 @@
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 8,
"yorigin": 8,
"xorigin": 16,
"yorigin": 16,
"eventToFunction": {},
"eventStubScript": null,
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 B

After

Width:  |  Height:  |  Size: 107 B

View file

@ -11,15 +11,15 @@
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 0,
"bbox_right": 15,
"bbox_right": 31,
"bbox_top": 0,
"bbox_bottom": 15,
"bbox_bottom": 31,
"HTile": false,
"VTile": false,
"For3D": false,
"DynamicTexturePage": false,
"width": 16,
"height": 16,
"width": 32,
"height": 32,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
@ -58,8 +58,8 @@
"backdropHeight": 768,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 8,
"yorigin": 8,
"xorigin": 16,
"yorigin": 16,
"eventToFunction": {},
"eventStubScript": null,
},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

View file

Before

Width:  |  Height:  |  Size: 424 B

After

Width:  |  Height:  |  Size: 424 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

View file

@ -28,8 +28,8 @@
"gridX": 0,
"gridY": 0,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"e4475301-6b04-4220-b7f8-2d7e31d08f22",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"39d0addc-91f5-48d7-bb9a-c12c1bc4f01d",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"c4775ddb-4a2a-4259-97dc-67f7fcd5652a",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"bae26338-1240-4d68-8f0d-114398dd8785",},
],
"sequence": {
"resourceType": "GMSequence",
@ -46,8 +46,8 @@
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"7c7f88a1-7aee-450a-8b1b-3fe4b952f0c8","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"e4475301-6b04-4220-b7f8-2d7e31d08f22","path":"sprites/s_noti_icon_log/s_noti_icon_log.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"04455ebb-f0aa-463c-8850-9cd7b7d8ffa9","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"39d0addc-91f5-48d7-bb9a-c12c1bc4f01d","path":"sprites/s_noti_icon_log/s_noti_icon_log.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"b0d7c8e6-cf35-4fed-a924-0f78a4ad8e70","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"c4775ddb-4a2a-4259-97dc-67f7fcd5652a","path":"sprites/s_noti_icon_log/s_noti_icon_log.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"0df1203b-c923-4a21-8501-49e46bb51d18","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"bae26338-1240-4d68-8f0d-114398dd8785","path":"sprites/s_noti_icon_log/s_noti_icon_log.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],},
],
"visibleRange": null,
@ -66,7 +66,7 @@
"eventStubScript": null,
},
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"05d048c4-20eb-4f16-9e0a-1f075199daae","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"89a6fc0f-5321-47a5-b4a2-f77ec2823406","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
],
"nineSlice": null,
"parent": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

View file

@ -10,16 +10,16 @@
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 9,
"bbox_right": 29,
"bbox_left": 8,
"bbox_right": 31,
"bbox_top": 0,
"bbox_bottom": 39,
"bbox_bottom": 63,
"HTile": false,
"VTile": false,
"For3D": false,
"DynamicTexturePage": false,
"width": 40,
"height": 40,
"height": 64,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
@ -28,8 +28,8 @@
"gridX": 0,
"gridY": 0,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"13137766-a784-4cee-afa7-44894e418075",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"ce97c34d-153f-4c91-a658-deed8cb4d878",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"6fdcfe59-a47f-4a1d-b0c1-2239b4471118",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"bcaf2c87-93be-4845-b6e5-cc4bfc4ffbb7",},
],
"sequence": {
"resourceType": "GMSequence",
@ -46,8 +46,8 @@
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"246e5d7b-d7e8-4190-8a1d-2294f7a22930","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"13137766-a784-4cee-afa7-44894e418075","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"bcf2ddf6-2895-4da2-86aa-b367032a2365","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"ce97c34d-153f-4c91-a658-deed8cb4d878","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"33f189e4-f7ab-4181-b7a3-d47a3b961ac2","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"6fdcfe59-a47f-4a1d-b0c1-2239b4471118","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"397e0105-4bf5-456b-836c-e4360188b823","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"bcaf2c87-93be-4845-b6e5-cc4bfc4ffbb7","path":"sprites/s_prop_gradient/s_prop_gradient.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],},
],
"visibleRange": null,
@ -61,12 +61,12 @@
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"xorigin": 20,
"yorigin": 20,
"yorigin": 32,
"eventToFunction": {},
"eventStubScript": null,
},
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"3e0080ca-d344-4374-8767-b056a4798c2d","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"dda89253-cfae-4568-9db2-1d5ce7e9cc16","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
],
"nineSlice": null,
"parent": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 B

View file

@ -10,10 +10,10 @@
"edgeFiltering": false,
"collisionTolerance": 0,
"swfPrecision": 2.525,
"bbox_left": 1,
"bbox_left": 0,
"bbox_right": 29,
"bbox_top": 2,
"bbox_bottom": 30,
"bbox_bottom": 31,
"HTile": false,
"VTile": false,
"For3D": false,
@ -28,7 +28,7 @@
"gridX": 0,
"gridY": 0,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"75fc5c18-1190-4bdc-a93a-90840df417f4",},
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d082383f-2f78-41a5-a292-252b6c4ce55e",},
],
"sequence": {
"resourceType": "GMSequence",
@ -45,7 +45,7 @@
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[
{"id":"bc6da1e8-56ba-4e9c-a2fc-d84584f2036a","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"75fc5c18-1190-4bdc-a93a-90840df417f4","path":"sprites/s_timeline_graph/s_timeline_graph.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
{"id":"d040c969-a840-4b79-8e50-e744a958370c","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"d082383f-2f78-41a5-a292-252b6c4ce55e","path":"sprites/s_timeline_graph/s_timeline_graph.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],},
],
"visibleRange": null,
@ -64,7 +64,7 @@
"eventStubScript": null,
},
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"0e641c29-cf6c-41af-8ce1-4631084d3b49","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"a91426c8-2a05-438a-a81e-5ec6f002904d","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",},
],
"nineSlice": null,
"parent": {