mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
MK flag
This commit is contained in:
parent
ce559e7224
commit
6764915bff
35 changed files with 514 additions and 127 deletions
|
@ -247,6 +247,7 @@
|
|||
{"name":"button","order":34,"path":"folders/widgets/button.yy",},
|
||||
{"name":"rotator","order":35,"path":"folders/widgets/rotator.yy",},
|
||||
{"name":"text","order":36,"path":"folders/widgets/text.yy",},
|
||||
{"name":"Flag","order":9,"path":"folders/shader/MK effects/Flag.yy",},
|
||||
],
|
||||
"ResourceOrderSettings": [
|
||||
{"name":"s_node_corner","order":16,"path":"sprites/s_node_corner/s_node_corner.yy",},
|
||||
|
@ -264,6 +265,7 @@
|
|||
{"name":"__node_3d","order":2,"path":"scripts/__node_3d/__node_3d.yy",},
|
||||
{"name":"node_csv_file_write","order":12,"path":"scripts/node_csv_file_write/node_csv_file_write.yy",},
|
||||
{"name":"surface_functions","order":5,"path":"scripts/surface_functions/surface_functions.yy",},
|
||||
{"name":"s_MKFX","order":6,"path":"sprites/s_MKFX/s_MKFX.yy",},
|
||||
{"name":"_f_sdf","order":13,"path":"fonts/_f_sdf/_f_sdf.yy",},
|
||||
{"name":"dynaSurf_iso","order":1,"path":"scripts/dynaSurf_iso/dynaSurf_iso.yy",},
|
||||
{"name":"sh_fd_add_velocity_glsl","order":1,"path":"shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.yy",},
|
||||
|
@ -753,6 +755,7 @@
|
|||
{"name":"sh_rsh_erode","order":2,"path":"shaders/sh_rsh_erode/sh_rsh_erode.yy",},
|
||||
{"name":"node_chromatic_aberration","order":4,"path":"scripts/node_chromatic_aberration/node_chromatic_aberration.yy",},
|
||||
{"name":"draw_line_elbow_diag","order":18,"path":"scripts/draw_line_elbow_diag/draw_line_elbow_diag.yy",},
|
||||
{"name":"s_node_mk_flag","order":5,"path":"sprites/s_node_mk_flag/s_node_mk_flag.yy",},
|
||||
{"name":"node_pin","order":2,"path":"scripts/node_pin/node_pin.yy",},
|
||||
{"name":"_node_fluid_nodes","order":7,"path":"scripts/_node_fluid_nodes/_node_fluid_nodes.yy",},
|
||||
{"name":"sh_skew","order":6,"path":"shaders/sh_skew/sh_skew.yy",},
|
||||
|
@ -1443,6 +1446,7 @@
|
|||
{"name":"node_morph_surface","order":5,"path":"scripts/node_morph_surface/node_morph_surface.yy",},
|
||||
{"name":"node_tunnel_in","order":6,"path":"scripts/node_tunnel_in/node_tunnel_in.yy",},
|
||||
{"name":"node_anim_priority","order":2,"path":"scripts/node_anim_priority/node_anim_priority.yy",},
|
||||
{"name":"sh_mk_flag_shade","order":1,"path":"shaders/sh_mk_flag_shade/sh_mk_flag_shade.yy",},
|
||||
{"name":"s_node_fluidSim_render","order":4,"path":"sprites/s_node_fluidSim_render/s_node_fluidSim_render.yy",},
|
||||
{"name":"o_dialog_crashed","order":3,"path":"objects/o_dialog_crashed/o_dialog_crashed.yy",},
|
||||
{"name":"fd_rectangle_enums","order":3,"path":"scripts/fd_rectangle_enums/fd_rectangle_enums.yy",},
|
||||
|
|
|
@ -282,6 +282,7 @@
|
|||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"button","folderPath":"folders/widgets/button.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"rotator","folderPath":"folders/widgets/rotator.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"text","folderPath":"folders/widgets/text.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Flag","folderPath":"folders/shader/MK effects/Flag.yy",},
|
||||
],
|
||||
"IncludedFiles": [
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
|
||||
|
@ -1244,6 +1245,7 @@
|
|||
{"id":{"name":"__node_3d","path":"scripts/__node_3d/__node_3d.yy",},},
|
||||
{"id":{"name":"node_csv_file_write","path":"scripts/node_csv_file_write/node_csv_file_write.yy",},},
|
||||
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},},
|
||||
{"id":{"name":"s_MKFX","path":"sprites/s_MKFX/s_MKFX.yy",},},
|
||||
{"id":{"name":"_f_sdf","path":"fonts/_f_sdf/_f_sdf.yy",},},
|
||||
{"id":{"name":"dynaSurf_iso","path":"scripts/dynaSurf_iso/dynaSurf_iso.yy",},},
|
||||
{"id":{"name":"sh_fd_add_velocity_glsl","path":"shaders/sh_fd_add_velocity_glsl/sh_fd_add_velocity_glsl.yy",},},
|
||||
|
@ -1803,6 +1805,7 @@
|
|||
{"id":{"name":"sh_rsh_erode","path":"shaders/sh_rsh_erode/sh_rsh_erode.yy",},},
|
||||
{"id":{"name":"node_chromatic_aberration","path":"scripts/node_chromatic_aberration/node_chromatic_aberration.yy",},},
|
||||
{"id":{"name":"draw_line_elbow_diag","path":"scripts/draw_line_elbow_diag/draw_line_elbow_diag.yy",},},
|
||||
{"id":{"name":"s_node_mk_flag","path":"sprites/s_node_mk_flag/s_node_mk_flag.yy",},},
|
||||
{"id":{"name":"node_pin","path":"scripts/node_pin/node_pin.yy",},},
|
||||
{"id":{"name":"_node_fluid_nodes","path":"scripts/_node_fluid_nodes/_node_fluid_nodes.yy",},},
|
||||
{"id":{"name":"sh_noise","path":"shaders/sh_noise/sh_noise.yy",},},
|
||||
|
@ -2589,6 +2592,7 @@
|
|||
{"id":{"name":"node_morph_surface","path":"scripts/node_morph_surface/node_morph_surface.yy",},},
|
||||
{"id":{"name":"node_tunnel_in","path":"scripts/node_tunnel_in/node_tunnel_in.yy",},},
|
||||
{"id":{"name":"node_anim_priority","path":"scripts/node_anim_priority/node_anim_priority.yy",},},
|
||||
{"id":{"name":"sh_mk_flag_shade","path":"shaders/sh_mk_flag_shade/sh_mk_flag_shade.yy",},},
|
||||
{"id":{"name":"s_node_fluidSim_render","path":"sprites/s_node_fluidSim_render/s_node_fluidSim_render.yy",},},
|
||||
{"id":{"name":"o_dialog_crashed","path":"objects/o_dialog_crashed/o_dialog_crashed.yy",},},
|
||||
{"id":{"name":"fd_rectangle_enums","path":"scripts/fd_rectangle_enums/fd_rectangle_enums.yy",},},
|
||||
|
@ -2814,6 +2818,7 @@
|
|||
{"id":{"name":"node_dynamic_surface_out_height","path":"scripts/node_dynamic_surface_out_height/node_dynamic_surface_out_height.yy",},},
|
||||
{"id":{"name":"paddingBox","path":"scripts/paddingBox/paddingBox.yy",},},
|
||||
{"id":{"name":"fd_rectangle_set_visualization_shader","path":"scripts/fd_rectangle_set_visualization_shader/fd_rectangle_set_visualization_shader.yy",},},
|
||||
{"id":{"name":"sh_mk_flag_mrt","path":"shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.yy",},},
|
||||
{"id":{"name":"s_biterator_bg","path":"sprites/s_biterator_bg/s_biterator_bg.yy",},},
|
||||
{"id":{"name":"addonPanel","path":"scripts/addonPanel/addonPanel.yy",},},
|
||||
{"id":{"name":"s_node_ase_layer","path":"sprites/s_node_ase_layer/s_node_ase_layer.yy",},},
|
||||
|
|
|
@ -274,20 +274,12 @@ event_inherited();
|
|||
|
||||
PREFERENCES._display_scaling = PREFERENCES.display_scaling;
|
||||
ds_list_add(pref_appr, new __Panel_Linear_Setting_Item(
|
||||
__txtx("pref_gui_scaling", "GUI scaling"),
|
||||
new slider(0.5, 2, 0.01,, function(val) {
|
||||
__txtx("pref_gui_scaling", "GUI scaling*"),
|
||||
new slider(0.5, 2, 0.01, function(val) {
|
||||
PREFERENCES._display_scaling = val;
|
||||
PREF_SAVE();
|
||||
}, function() {
|
||||
PREFERENCES._display_scaling = clamp(PREFERENCES._display_scaling, 0.5, 2);
|
||||
if(PREFERENCES.display_scaling == PREFERENCES._display_scaling)
|
||||
return;
|
||||
|
||||
PREFERENCES.display_scaling = PREFERENCES._display_scaling;
|
||||
resetPanel();
|
||||
loadFonts();
|
||||
|
||||
time_source_start(time_source_create(time_source_global, 1, time_source_units_frames, onResize));
|
||||
resetScale(PREFERENCES._display_scaling);
|
||||
}),
|
||||
function() { return PREFERENCES._display_scaling; },
|
||||
function(val) { PREFERENCES.display_scaling = val; PREFERENCES._display_scaling = val; },
|
||||
|
@ -954,7 +946,7 @@ event_inherited();
|
|||
draw_text_add(ui(24), yy + th / 2, name);
|
||||
_pref.editWidget.setFocusHover(sFOCUS, sHOVER && sp_pref.hover);
|
||||
|
||||
var widget_w = ui(240);
|
||||
var widget_w = ui(260);
|
||||
var widget_h = th;
|
||||
|
||||
if(is_instanceof(_pref.editWidget, textBox))
|
||||
|
|
|
@ -26,7 +26,17 @@ function line_get_width(txt, font = noone, offset = 0) {
|
|||
|
||||
function ui(val) {
|
||||
INLINE
|
||||
return round(val * UI_SCALE);
|
||||
}
|
||||
|
||||
function resetScale(scale) {
|
||||
if(scale == PREFERENCES.display_scaling) return;
|
||||
|
||||
return val * UI_SCALE;
|
||||
PREFERENCES.display_scaling = scale;
|
||||
resetPanel();
|
||||
loadFonts();
|
||||
|
||||
time_source_start(time_source_create(time_source_global, 1, time_source_units_frames, onResize));
|
||||
PREF_SAVE();
|
||||
}
|
||||
#endregion
|
|
@ -1,86 +1,81 @@
|
|||
#macro draw_sprite_ext draw_sprite_ext_override
|
||||
#macro __draw_sprite_ext draw_sprite_ext
|
||||
|
||||
function draw_sprite_ext_override(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
|
||||
function draw_sprite_ext_override(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) { #region
|
||||
INLINE
|
||||
__draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
#macro draw_sprite_stretched_ext draw_sprite_stretched_ext_override
|
||||
#macro __draw_sprite_stretched_ext draw_sprite_stretched_ext
|
||||
|
||||
function draw_sprite_stretched_ext_override(spr, ind, _x, _y, w = 1, h = 1, color = c_white, alpha = 1) {
|
||||
function draw_sprite_stretched_ext_override(spr, ind, _x, _y, w = 1, h = 1, color = c_white, alpha = 1) { #region
|
||||
INLINE
|
||||
__draw_sprite_stretched_ext(spr, ind, round(_x), round(_y), round(w), round(h), color, alpha);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
#macro draw_sprite_stretched draw_sprite_stretched_override
|
||||
#macro __draw_sprite_stretched draw_sprite_stretched
|
||||
|
||||
function draw_sprite_stretched_override(spr, ind, _x, _y, w = 1, h = 1) {
|
||||
function draw_sprite_stretched_override(spr, ind, _x, _y, w = 1, h = 1) { #region
|
||||
INLINE
|
||||
__draw_sprite_stretched(spr, ind, round(_x), round(_y), round(w), round(h));
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_ext_add(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
|
||||
function draw_sprite_ext_add(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) { #region
|
||||
INLINE
|
||||
BLEND_ADD
|
||||
__draw_sprite_ext(spr, ind, round(_x), round(_y), xscale, yscale, rot, color, alpha);
|
||||
BLEND_NORMAL
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_stretched_points(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1) {
|
||||
function draw_sprite_stretched_points(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1) { #region
|
||||
INLINE
|
||||
|
||||
var _xs = round(min(_x0, _x1));
|
||||
var _ys = round(min(_y0, _y1));
|
||||
var _w = round(max(_x0, _x1) - _xs);
|
||||
var _h = round(max(_y0, _y1) - _ys);
|
||||
var _xs = min(_x0, _x1);
|
||||
var _ys = min(_y0, _y1);
|
||||
var _w = max(_x0, _x1) - _xs;
|
||||
var _h = max(_y0, _y1) - _ys;
|
||||
|
||||
__draw_sprite_stretched_ext(spr, ind, _xs, _ys, _w, _h, color, alpha);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_stretched_points_clamp(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1, _min = 12) {
|
||||
function draw_sprite_stretched_points_clamp(spr, ind, _x0, _y0, _x1, _y1, color = c_white, alpha = 1, _min = 12) { #region
|
||||
INLINE
|
||||
|
||||
var _xs = round(min(_x0, _x1));
|
||||
var _ys = round(min(_y0, _y1));
|
||||
var _w = max(_min, round(max(_x0, _x1) - _xs));
|
||||
var _h = max(_min, round(max(_y0, _y1) - _ys));
|
||||
var _xs = min(_x0, _x1);
|
||||
var _ys = min(_y0, _y1);
|
||||
var _w = max(_min, max(_x0, _x1) - _xs);
|
||||
var _h = max(_min, max(_y0, _y1) - _ys);
|
||||
|
||||
__draw_sprite_stretched_ext(spr, ind, _xs, _ys, _w, _h, color, alpha);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_bbox(spr, ind, _bbox) {
|
||||
function draw_sprite_bbox(spr, ind, _bbox) { #region
|
||||
INLINE
|
||||
if(_bbox == noone) return;
|
||||
__draw_sprite_stretched(spr, ind, _bbox.x0, _bbox.y0, _bbox.w, _bbox.h);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white) {
|
||||
function draw_sprite_uniform(spr, ind, _x, _y, scale, color = c_white) { #region
|
||||
INLINE
|
||||
draw_sprite_ext(spr, ind, round(_x), round(_y), scale, scale, 0, color, 1);
|
||||
}
|
||||
draw_sprite_ext(spr, ind, _x, _y, scale, scale, 0, color, 1);
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_ui(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) {
|
||||
function draw_sprite_ui(spr, ind, _x, _y, xscale = 1, yscale = 1, rot = 0, color = c_white, alpha = 1) { #region
|
||||
INLINE
|
||||
static UI_SPRITE_SCALE = 1;
|
||||
|
||||
var xscale_ui = ui(xscale) / UI_SPRITE_SCALE;
|
||||
var yscale_ui = ui(yscale) / UI_SPRITE_SCALE;
|
||||
|
||||
draw_sprite_ext(spr, ind, round(_x), round(_y), xscale_ui, yscale_ui, rot, color, alpha);
|
||||
}
|
||||
draw_sprite_ext(spr, ind, _x, _y, xscale * UI_SCALE, yscale * UI_SCALE, rot, color, alpha);
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_ui_uniform(spr, ind, _x, _y, scale = 1, color = c_white, alpha = 1, rot = 0) {
|
||||
function draw_sprite_ui_uniform(spr, ind, _x, _y, scale = 1, color = c_white, alpha = 1, rot = 0) { #region
|
||||
INLINE
|
||||
draw_sprite_ui(spr, ind, round(_x), round(_y), scale, scale, rot, color, alpha);
|
||||
}
|
||||
draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, color, alpha);
|
||||
} #endregion
|
||||
|
||||
function draw_sprite_colored(spr, ind, _x, _y, scale = 1, rot = 0) {
|
||||
function draw_sprite_colored(spr, ind, _x, _y, scale = 1, rot = 0) { #region
|
||||
INLINE
|
||||
var num = sprite_get_number(spr);
|
||||
|
||||
draw_sprite_ui(spr, ind, _x, _y, scale, scale, rot, c_white);
|
||||
if(num % 2 == 0) draw_sprite_ui(spr, num / 2 + ind, _x, _y, scale, scale, rot, COLORS._main_accent);
|
||||
}
|
||||
} #endregion
|
|
@ -6,14 +6,15 @@ function draw_text_line(_x, _y, _text, _sep, _w) { #region
|
|||
function draw_text_add(_x, _y, _text, scale = 1) { #region
|
||||
INLINE
|
||||
BLEND_ALPHA_MULP;
|
||||
draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
||||
if(scale == 1) draw_text(round(_x), round(_y), _text);
|
||||
else draw_text_transformed(round(_x), round(_y), _text, scale, scale, 0);
|
||||
BLEND_NORMAL;
|
||||
} #endregion
|
||||
|
||||
function draw_text_over(_x, _y, _text, scale = 1) { #region
|
||||
INLINE
|
||||
BLEND_OVERRIDE;
|
||||
draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
||||
draw_text_transformed(round(_x), round(_y), _text, scale, scale, 0);
|
||||
BLEND_NORMAL;
|
||||
} #endregion
|
||||
|
||||
|
@ -62,7 +63,7 @@ function draw_text_lang(_x, _y, _text, scale = 1) { #region
|
|||
|
||||
if(_font != _ff) draw_set_font(_ff);
|
||||
_font = _ff;
|
||||
draw_text_transformed(_x, _y, _g, scale, scale, 0);
|
||||
draw_text_transformed(round(_x), round(_y), _g, scale, scale, 0);
|
||||
_x += string_width(_g) * scale;
|
||||
}
|
||||
|
||||
|
@ -92,12 +93,19 @@ function draw_text_bbox(bbox, text) { #region
|
|||
function draw_text_cut(x, y, str, w, scale = 1) { #region
|
||||
INLINE
|
||||
BLEND_ALPHA_MULP;
|
||||
draw_text_transformed(x, y, string_cut(str, w,, scale), scale, scale, 0);
|
||||
draw_text_transformed(round(x), round(y), string_cut(str, w,, scale), scale, scale, 0);
|
||||
BLEND_NORMAL;
|
||||
} #endregion
|
||||
|
||||
function draw_text_int(x, y, str) { #region
|
||||
INLINE
|
||||
draw_text(round(x), round(y), str);
|
||||
} #endregion
|
||||
|
||||
function __draw_text_ext_transformed(_x, _y, _text, _sep, _w, sx, sy, rotation, forceCut = false) { #region
|
||||
INLINE
|
||||
_x = round(_x);
|
||||
_y = round(_y);
|
||||
|
||||
if(!LOCALE.config.per_character_line_break && !forceCut) {
|
||||
BLEND_ALPHA_MULP;
|
||||
|
|
|
@ -73,7 +73,7 @@ function _font_load_from_struct(str, name, def, over = true) { #region
|
|||
|
||||
font_add_enable_aa(THEME_VALUE.font_aa);
|
||||
var _sdf = struct_try_get(font, "sdf", false);
|
||||
var _font = _font_add(path, font.size * UI_SCALE, _sdf);
|
||||
var _font = _font_add(path, round(font.size * UI_SCALE), _sdf);
|
||||
|
||||
return _font;
|
||||
} #endregion
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||
|
||||
LATEST_VERSION = 11500;
|
||||
VERSION = 11602;
|
||||
VERSION = 11603;
|
||||
SAVE_VERSION = 11600.1;
|
||||
VERSION_STRING = "1.16.0.2";
|
||||
BUILD_NUMBER = 11602;
|
||||
VERSION_STRING = "1.16.0.3";
|
||||
BUILD_NUMBER = 11603;
|
||||
|
||||
globalvar APPEND_MAP;
|
||||
APPEND_MAP = ds_map_create();
|
||||
|
|
|
@ -37,6 +37,8 @@
|
|||
function __txtx(key, def = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(key == "") return "";
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.word, key) && !struct_has(LOCALE.ui, key)) {
|
||||
|
@ -46,8 +48,6 @@
|
|||
return "";
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(struct_has(LOCALE.word, key)) return LOCALE.word[$ key];
|
||||
if(struct_has(LOCALE.ui, key)) return LOCALE.ui[$ key];
|
||||
|
||||
|
@ -57,6 +57,8 @@
|
|||
function __txt(txt, prefix = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return txt;
|
||||
|
||||
if(txt == "") return "";
|
||||
var key = string_lower(txt);
|
||||
key = string_replace_all(key, " ", "_");
|
||||
|
@ -68,7 +70,7 @@
|
|||
}
|
||||
return "";
|
||||
}
|
||||
if(LOCALE_DEF) return txt;
|
||||
|
||||
return __txtx(prefix + key, txt);
|
||||
} #endregion
|
||||
|
||||
|
@ -83,6 +85,8 @@
|
|||
function __txt_node_name(node, def = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.node, node)) {
|
||||
show_debug_message($"LOCALE [NODE]: \"{node}\": \"{def}\",");
|
||||
|
@ -91,8 +95,6 @@
|
|||
return "";
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(!struct_has(LOCALE.node, node))
|
||||
return def;
|
||||
|
||||
|
@ -101,6 +103,8 @@
|
|||
|
||||
function __txt_node_tooltip(node, def = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.node, node)) {
|
||||
|
@ -110,8 +114,6 @@
|
|||
return "";
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(!struct_has(LOCALE.node, node))
|
||||
return def;
|
||||
|
||||
|
@ -121,6 +123,8 @@
|
|||
function __txt_junction_name(node, type, index, def = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.node, node)) {
|
||||
show_debug_message($"LOCALE [JNAME]: \"{node}\": \"{def}\",");
|
||||
|
@ -129,8 +133,6 @@
|
|||
return "";
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(!struct_has(LOCALE.node, node))
|
||||
return def;
|
||||
|
||||
|
@ -144,6 +146,8 @@
|
|||
function __txt_junction_tooltip(node, type, index, def = "") { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.node, node)) {
|
||||
show_debug_message($"LOCALE [JTIP]: \"{node}\": \"{def}\",");
|
||||
|
@ -152,8 +156,6 @@
|
|||
return "";
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(!struct_has(LOCALE.node, node))
|
||||
return def;
|
||||
|
||||
|
@ -167,6 +169,8 @@
|
|||
function __txt_junction_data(node, type, index, def = []) { #region
|
||||
INLINE
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(TEST_LOCALE) {
|
||||
if(!struct_has(LOCALE.node, node)) {
|
||||
show_debug_message($"LOCALE [DDATA]: \"{node}\": \"{def}\",");
|
||||
|
@ -175,8 +179,6 @@
|
|||
return [ "" ];
|
||||
}
|
||||
|
||||
if(LOCALE_DEF) return def;
|
||||
|
||||
if(!struct_has(LOCALE.node, node))
|
||||
return def;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
function Node_create_3D_Obj(_x, _y, _group = noone) { #region
|
||||
var path = "";
|
||||
if(!LOADING && !APPENDING && !CLONING) {
|
||||
path = get_open_filename("30 object|*.obj", "");
|
||||
path = get_open_filename("3d object|*.obj", "");
|
||||
key_release();
|
||||
if(path == "") return noone;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
inputs[| 2] = nodeValue("Point 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
|
||||
input_display_list = [ 0,
|
||||
input_display_list = [ { spr: s_MKFX }, 0,
|
||||
["Saber", false], 1, 2,
|
||||
];
|
||||
|
||||
|
|
|
@ -17,16 +17,30 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
|
||||
inputs[| 5] = nodeValue("Wind speed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2);
|
||||
|
||||
inputs[| 6] = nodeValue("Wave width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2);
|
||||
inputs[| 6] = nodeValue("Wave width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [0, 4, 0.1] });
|
||||
|
||||
inputs[| 7] = nodeValue("Wave size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4);
|
||||
inputs[| 7] = nodeValue("Wave size", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 8] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
input_display_list = [ 0,
|
||||
["Flag", false], 4, 1, 2, 3,
|
||||
["Wave", false], 6, 7, 5, 8,
|
||||
inputs[| 9] = nodeValue("Clip", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 10] = nodeValue("Shadow", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 11] = nodeValue("Shadow threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [-0.1, 0.1, 0.001] });
|
||||
|
||||
inputs[| 12] = nodeValue("Invert shadow", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, 0);
|
||||
|
||||
input_display_list = [ { spr: s_MKFX }, 0,
|
||||
["Flag", false], 4, 1, 2, 3,
|
||||
["Wave", false], 6, 7, 5, 8, 9,
|
||||
["Rendering", false], 10, 11, 12,
|
||||
];
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
@ -38,7 +52,9 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
attributes.iteration = val;
|
||||
triggerRender();
|
||||
})]);
|
||||
|
||||
|
||||
temp_surface = [ surface_create(1, 1), surface_create(1, 1) ];
|
||||
|
||||
function fPoints(_x, _y, _u, _v) constructor { #region
|
||||
x = _x;
|
||||
y = _y;
|
||||
|
@ -65,15 +81,14 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
links = [];
|
||||
meshes = [];
|
||||
|
||||
static onValueUpdate = function(index = 0) { #region
|
||||
if(index == 3) setGeometry();
|
||||
} #endregion
|
||||
|
||||
static setGeometry = function() { #region
|
||||
var _surf = getSingleValue(1); if(!is_surface(_surf)) return;
|
||||
var _start = getSingleValue(2);
|
||||
var _pinn = getSingleValue(3);
|
||||
var _subd = getSingleValue(4);
|
||||
|
||||
var _sw = surface_get_width_safe(_surf);
|
||||
var _sh = surface_get_height_safe(_surf);
|
||||
|
||||
points = array_create((_subd + 1) * (_subd + 1));
|
||||
links = array_create(2 * _subd * (_subd + 1));
|
||||
meshes = array_create(2 * _subd * _subd);
|
||||
|
@ -81,10 +96,7 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
var _ind = 0;
|
||||
for( var i = 0; i <= _subd; i++ )
|
||||
for( var j = 0; j <= _subd; j++ ) {
|
||||
var _x = _start[0] + i / _subd * _sw;
|
||||
var _y = _start[1] + j / _subd * _sh;
|
||||
|
||||
points[_ind++] = new fPoints(_x, _y, i / _subd, j / _subd);
|
||||
points[_ind++] = new fPoints(i / _subd, j / _subd, i / _subd, j / _subd);
|
||||
}
|
||||
|
||||
switch(_pinn) {
|
||||
|
@ -127,24 +139,44 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
} #endregion
|
||||
|
||||
static stepFlag = function() { #region
|
||||
var _pinn = getSingleValue(3);
|
||||
var _wspd = getSingleValue(5);
|
||||
var _wave = getSingleValue(6);
|
||||
var _wavz = getSingleValue(7);
|
||||
var _wphs = getSingleValue(8);
|
||||
var _pinn = getSingleValue(3);
|
||||
var _wspd = getSingleValue(5);
|
||||
var _wave = getSingleValue(6);
|
||||
var _wavz = getSingleValue(7);
|
||||
var _wphs = getSingleValue(8);
|
||||
var _clip = getSingleValue(9);
|
||||
|
||||
var _tps = CURRENT_FRAME / TOTAL_FRAMES * _wspd * pi * 2;
|
||||
var _wve = _wave * pi;
|
||||
|
||||
for( var i = 0, n = array_length(points); i < n; i++ ) {
|
||||
var p = points[i];
|
||||
|
||||
switch(_pinn) {
|
||||
case 0 :
|
||||
var y0 = p.sy + max(-0.2, sin(p.u * pi * _wave - _tps)) * _wavz * p.u;
|
||||
var y1 = p.sy + min( 0.2, sin((p.u - _wphs) * pi * _wave - _tps)) * _wavz * p.u;
|
||||
var y0 = p.sy + max(-_clip, sin(p.u * _wve - _tps)) * _wavz * p.u;
|
||||
var y1 = p.sy + min( _clip, sin((p.u - _wphs) * _wve - _tps)) * _wavz * p.u;
|
||||
|
||||
p.y = lerp(y0, y1, p.v);
|
||||
break;
|
||||
case 1 :
|
||||
var y0 = p.sy + max(-_clip, sin((1 - p.u) * _wve - _tps)) * _wavz * (1 - p.u);
|
||||
var y1 = p.sy + min( _clip, sin(((1 - p.u) - _wphs) * _wve - _tps)) * _wavz * (1 - p.u);
|
||||
|
||||
p.y = lerp(y0, y1, p.v);
|
||||
break;
|
||||
case 2 :
|
||||
var x0 = p.sx + max(-_clip, sin(p.v * _wve - _tps)) * _wavz * p.v;
|
||||
var x1 = p.sx + min( _clip, sin((p.v - _wphs) * _wve - _tps)) * _wavz * p.v;
|
||||
|
||||
p.x = lerp(x0, x1, p.u);
|
||||
break;
|
||||
case 3 :
|
||||
var x0 = p.sx + max(-_clip, sin((1 - p.v) * _wve - _tps)) * _wavz * (1 - p.v);
|
||||
var x1 = p.sx + min( _clip, sin(((1 - p.v) - _wphs) * _wve - _tps)) * _wavz * (1 - p.v);
|
||||
|
||||
p.x = lerp(x0, x1, p.u);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
@ -179,13 +211,47 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
} #endregion
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||
var _dim = _data[0];
|
||||
var _tex = _data[1];
|
||||
var _dim = _data[0];
|
||||
var _tex = _data[1];
|
||||
var _start = _data[2];
|
||||
var _pinn = _data[3];
|
||||
|
||||
var _shadow = _data[10];
|
||||
var _shdThr = _data[11];
|
||||
var _shdInv = _data[12];
|
||||
|
||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||
if(!is_surface(_tex)) return _outSurf;
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
var _sx, _sy;
|
||||
var _sw = surface_get_width_safe(_tex);
|
||||
var _sh = surface_get_height_safe(_tex);
|
||||
|
||||
switch(_pinn) {
|
||||
case 0 :
|
||||
_sx = _start[0];
|
||||
_sy = _start[1];
|
||||
break;
|
||||
case 1 :
|
||||
_sx = _start[0] - _sw;
|
||||
_sy = _start[1];
|
||||
break;
|
||||
case 2 :
|
||||
_sx = _start[0];
|
||||
_sy = _start[1];
|
||||
break;
|
||||
case 3 :
|
||||
_sx = _start[0];
|
||||
_sy = _start[1] - _sh;
|
||||
break;
|
||||
}
|
||||
|
||||
for( var i = 0, n = array_length(temp_surface); i < n; i++ )
|
||||
temp_surface[i] = surface_verify(temp_surface[i], _dim[0], _dim[1]);
|
||||
|
||||
surface_set_target_ext(0, temp_surface[0]);
|
||||
surface_set_target_ext(1, temp_surface[1]);
|
||||
shader_set(sh_mk_flag_mrt);
|
||||
DRAW_CLEAR
|
||||
|
||||
draw_set_color(c_white);
|
||||
|
@ -198,14 +264,28 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
var p1 = m.p1;
|
||||
var p2 = m.p2;
|
||||
|
||||
draw_vertex_texture(p0.x, p0.y, p0.u, p0.v);
|
||||
draw_vertex_texture(p1.x, p1.y, p1.u, p1.v);
|
||||
draw_vertex_texture(p2.x, p2.y, p2.u, p2.v);
|
||||
draw_vertex_texture(_sx + p0.x * _sw, _sy + p0.y * _sh, p0.u, p0.v);
|
||||
draw_vertex_texture(_sx + p1.x * _sw, _sy + p1.y * _sh, p1.u, p1.v);
|
||||
draw_vertex_texture(_sx + p2.x * _sw, _sy + p2.y * _sh, p2.u, p2.v);
|
||||
}
|
||||
|
||||
draw_primitive_end();
|
||||
shader_reset();
|
||||
surface_reset_target();
|
||||
|
||||
surface_set_shader(_outSurf, sh_mk_flag_shade);
|
||||
shader_set_surface("textureMap", temp_surface[1]);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("oriPosition", _start);
|
||||
shader_set_f("oriScale", _sw, _sh);
|
||||
shader_set_f("shadow", 1 - _shadow);
|
||||
shader_set_f("shadowThres", _shdThr);
|
||||
shader_set_i("shadowInv", _shdInv);
|
||||
shader_set_i("side", _pinn > 1);
|
||||
|
||||
draw_surface(temp_surface[0], 0, 0);
|
||||
surface_reset_shader();
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
}
|
|
@ -44,7 +44,7 @@ function Node_MK_GridBalls(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
inputs[| 15] = nodeValue("Twist shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, 0.01 ] });
|
||||
|
||||
input_display_list = [ 5, 1,
|
||||
input_display_list = [ { spr: s_MKFX }, 5, 1,
|
||||
["Surface", true], 0,
|
||||
["Grid", false], 2,
|
||||
["Movement", false], 8, 4, 7, 9, 10, 11, 13, 14, 15,
|
||||
|
|
|
@ -30,7 +30,7 @@ function Node_MK_GridFlip(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 10] = nodeValue("Flip limit", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "None", "90", "180" ]);
|
||||
|
||||
input_display_list = [ 3, 1,
|
||||
input_display_list = [ { spr: s_MKFX }, 3, 1,
|
||||
["Surface", true], 0, 4,
|
||||
["Grid", false], 2,
|
||||
["Flip", false], 6, 10, 5, 7, 8, 9,
|
||||
|
|
|
@ -33,7 +33,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
|
||||
inputs[| 11] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 0, 8,
|
||||
input_display_list = [ { spr: s_MKFX }, 0, 8,
|
||||
["Shape", false], 9, 3, 4, 10, 11,
|
||||
["Effect", false], 2, 1, 7,
|
||||
["Render", false], 5, 6,
|
||||
|
|
|
@ -25,9 +25,12 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
|
||||
inputs[| 9] = nodeValue("Glow radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
||||
|
||||
input_display_list = [ 0,
|
||||
inputs[| 10] = nodeValue("Trace texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
|
||||
.setVisible(true, true);
|
||||
|
||||
input_display_list = [ { spr: s_MKFX }, 0,
|
||||
["Saber", false], 1, 2, 3, 6,
|
||||
["Render", false], 4, 7, 5, 8, 9,
|
||||
["Render", false], 4, 7, 5, 8, 9, 10,
|
||||
];
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
@ -65,6 +68,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
var _grds = max(1, _data[7]);
|
||||
var _gint = _data[8];
|
||||
var _grad = _data[9];
|
||||
var _trcTex = _data[10];
|
||||
|
||||
draw_set_circle_precision(32);
|
||||
|
||||
|
@ -132,6 +136,12 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
if(_trac > 0 && CURRENT_FRAME > 0 && prev_points != noone) { #region
|
||||
var _prevArr = prev_points[_array_index];
|
||||
var _inds = max(0, array_length(_prevArr) - _trac);
|
||||
var useTex = is_surface(_trcTex);
|
||||
|
||||
if(useTex)
|
||||
draw_primitive_begin_texture(pr_trianglelist, surface_get_texture(_trcTex));
|
||||
else
|
||||
draw_primitive_begin(pr_trianglelist);
|
||||
|
||||
for( var i = _inds, n = array_length(_prevArr); i < n; i++ ) {
|
||||
var _prev = _prevArr[i];
|
||||
|
@ -147,9 +157,29 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
var _pp2x = _curr[1][0];
|
||||
var _pp2y = _curr[1][1];
|
||||
|
||||
draw_triangle(_pr1x, _pr1y, _pr2x, _pr2y, _pp1x, _pp1y, false);
|
||||
draw_triangle(_pr2x, _pr2y, _pp1x, _pp1y, _pp2x, _pp2y, false);
|
||||
if(useTex) {
|
||||
var _v0 = (i - _inds + 0) / (n - _inds);
|
||||
var _v1 = (i - _inds + 1) / (n - _inds);
|
||||
|
||||
draw_vertex_texture(ceil(_pr1x), ceil(_pr1y), 0, _v0);
|
||||
draw_vertex_texture(ceil(_pr2x), ceil(_pr2y), 1, _v0);
|
||||
draw_vertex_texture(ceil(_pp1x), ceil(_pp1y), 0, _v1);
|
||||
|
||||
draw_vertex_texture(ceil(_pr2x), ceil(_pr2y), 1, _v0);
|
||||
draw_vertex_texture(ceil(_pp1x), ceil(_pp1y), 0, _v1);
|
||||
draw_vertex_texture(ceil(_pp2x), ceil(_pp2y), 1, _v1);
|
||||
} else {
|
||||
draw_vertex(ceil(_pr1x), ceil(_pr1y));
|
||||
draw_vertex(ceil(_pr2x), ceil(_pr2y));
|
||||
draw_vertex(ceil(_pp1x), ceil(_pp1y));
|
||||
|
||||
draw_vertex(ceil(_pr2x), ceil(_pr2y));
|
||||
draw_vertex(ceil(_pp1x), ceil(_pp1y));
|
||||
draw_vertex(ceil(_pp2x), ceil(_pp2y));
|
||||
}
|
||||
}
|
||||
|
||||
draw_primitive_end();
|
||||
} #endregion
|
||||
|
||||
if(_thck == 1) {
|
||||
|
|
|
@ -35,7 +35,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
inputs[| 13] = nodeValue("Edge transform", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Flip", "Rotate" ] );
|
||||
|
||||
input_display_list = [
|
||||
input_display_list = [ { spr: s_MKFX },
|
||||
["Surfaces", true], 0, 1,
|
||||
["Tile set", false], 2, 4,
|
||||
["Edge", false], 5, 12, 13, 10, 11,
|
||||
|
|
|
@ -615,14 +615,14 @@ function __initNodes() {
|
|||
addNodeObject(generator, "Separate Shape", s_node_sepearte_shape, "Node_Seperate_Shape", [1, Node_Seperate_Shape],, "Separate disconnected pixel each into an image in an image array.");
|
||||
addNodeObject(generator, "Region Fill", s_node_region_fill, "Node_Region_Fill", [1, Node_Region_Fill],, "Fill connected pixel with colors.").setVersion(1147);
|
||||
addNodeObject(generator, "Flood Fill", s_node_flood_fill, "Node_Flood_Fill", [1, Node_Flood_Fill],, "Filled connected pixel given position and color.").setVersion(1133);
|
||||
|
||||
|
||||
ds_list_add(generator, "MK Effects");
|
||||
addNodeObject(generator, "MK Rains", s_node_mk_rain, "Node_MK_Rain", [1, Node_MK_Rain]).setVersion(11600);
|
||||
addNodeObject(generator, "MK GridBalls", s_node_mk_ball_grid, "Node_MK_GridBalls", [1, Node_MK_GridBalls]).setVersion(11600);
|
||||
addNodeObject(generator, "MK GridFlip", s_node_mk_flip_grid, "Node_MK_GridFlip", [1, Node_MK_GridFlip]).setVersion(11600);
|
||||
addNodeObject(generator, "MK Saber", s_node_mk_saber, "Node_MK_Saber", [1, Node_MK_Saber]).setVersion(11600);
|
||||
addNodeObject(generator, "MK Tile", s_node_mk_tile, "Node_MK_Tile", [1, Node_MK_Tile]).setVersion(11600);
|
||||
if(TESTING) addNodeObject(generator, "MK Flag", s_node_mk_tile, "Node_MK_Flag", [1, Node_MK_Flag]).setVersion(11600);
|
||||
addNodeObject(generator, "MK Flag", s_node_mk_flag, "Node_MK_Flag", [1, Node_MK_Flag]).setVersion(11600);
|
||||
#endregion
|
||||
|
||||
var compose = ds_list_create(); #region
|
||||
|
|
|
@ -2176,15 +2176,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
if(type == VALUE_TYPE.action) {
|
||||
var tx = x;
|
||||
draw_set_text(f_p1, fa_center, fa_center, _draw_cc);
|
||||
draw_text(round(tx), round(y - (line_get_height() + 16) / 2), name);
|
||||
draw_text_int(tx, y - (line_get_height() + 16) / 2, name);
|
||||
} else if(connect_type == JUNCTION_CONNECT.input) {
|
||||
var tx = x - 12 * _s;
|
||||
draw_set_halign(fa_right);
|
||||
draw_text(round(tx), round(y), name);
|
||||
draw_text_int(tx, y, name);
|
||||
} else {
|
||||
var tx = x + 12 * _s;
|
||||
draw_set_halign(fa_left);
|
||||
draw_text(round(tx), round(y), name);
|
||||
draw_text_int(tx, y, name);
|
||||
}
|
||||
} #endregion
|
||||
|
||||
|
|
|
@ -478,7 +478,15 @@ function Panel_Inspector() : PanelContent() constructor {
|
|||
} else {
|
||||
if(i >= array_length(_inspecting.input_display_list)) break;
|
||||
var jun_disp = _inspecting.input_display_list[i];
|
||||
if(is_array(jun_disp)) { // LABEL
|
||||
if(is_struct(jun_disp)) { // others
|
||||
var _spr = jun_disp.spr;
|
||||
var _sh = sprite_get_height(_spr);
|
||||
|
||||
draw_sprite(_spr, 0, xc, yy);
|
||||
|
||||
hh += _sh + ui(8);
|
||||
continue;
|
||||
} if(is_array(jun_disp)) { // LABEL
|
||||
var txt = __txt(jun_disp[0]);
|
||||
var coll = jun_disp[1] && filter_text == "";
|
||||
var lbh = lineBreak? ui(32) : ui(26);
|
||||
|
|
|
@ -427,7 +427,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
}
|
||||
|
||||
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
|
||||
draw_text_add(round(xc), round(yc), menus[i][0]);
|
||||
draw_text_add(xc, yc, menus[i][0]);
|
||||
|
||||
if(hori) {
|
||||
xx += ww + 8;
|
||||
|
@ -494,11 +494,11 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
draw_set_color(COLORS._main_text_inner);
|
||||
var wr_x = hori? nx0 + ui(8) : w / 2 - (wr_w + er_w + ui(16)) / 2;
|
||||
draw_sprite_ui_uniform(THEME.noti_icon_warning, warning_amo? 1 : 0, wr_x + ui(10), ny0);
|
||||
draw_text(round(wr_x + ui(28)), round(ny0), warning_amo);
|
||||
draw_text_int(wr_x + ui(28), ny0, warning_amo);
|
||||
|
||||
wr_x += wr_w + ui(16);
|
||||
draw_sprite_ui_uniform(THEME.noti_icon_error, error_amo? 1 : 0, wr_x + ui(10), ny0);
|
||||
draw_text(round(wr_x + ui(28)), round(ny0), error_amo);
|
||||
draw_text_int(wr_x + ui(28), ny0, error_amo);
|
||||
|
||||
if(hori) nx0 += nw + ui(8);
|
||||
else ny0 += nh + ui(8);
|
||||
|
@ -522,7 +522,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
dialogPanelCall(new Panel_Addon());
|
||||
} else
|
||||
draw_sprite_stretched(THEME.ui_panel_bg, 1, nx0, ny0 - wh / 2, ww, wh);
|
||||
draw_text(round(nx0 + ui(8)), round(ny0), name);
|
||||
draw_text_int(nx0 + ui(8), ny0, name);
|
||||
draw_sprite_ui(THEME.addon_icon, 0, nx0 + ui(20) + string_width(name), ny0 + ui(1),,,, COLORS._main_icon);
|
||||
|
||||
if(hori) nx0 += ww + ui(4);
|
||||
|
@ -639,7 +639,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
}
|
||||
}
|
||||
|
||||
draw_text(round((_x0 + _x1) / 2), round((_y0 + _y1) / 2), txt);
|
||||
draw_text_int((_x0 + _x1) / 2, (_y0 + _y1) / 2, txt);
|
||||
} else {
|
||||
var _xx1 = ui(40);
|
||||
var y1 = h - ui(20);
|
||||
|
@ -658,7 +658,7 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
}
|
||||
}
|
||||
|
||||
draw_text(round(_xx1 + ui(6)), round(y1), txt);
|
||||
draw_text_int(_xx1 + ui(6), y1, txt);
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
@ -732,10 +732,10 @@ function Panel_Menu() : PanelContent() constructor {
|
|||
|
||||
if(hori) {
|
||||
draw_set_text(f_p0b, fa_center, fa_center, COLORS._main_text_sub);
|
||||
draw_text(round(tcx), round((ty0 + ty1) / 2), tc);
|
||||
draw_text_int(tcx, (ty0 + ty1) / 2, tc);
|
||||
} else {
|
||||
draw_set_text(f_p0b, fa_left, fa_center, COLORS._main_text_sub);
|
||||
draw_text(round(tx0 + ui(8)), round(tby0 + th / 2), tc);
|
||||
draw_text_int(tx0 + ui(8), tby0 + th / 2, tc);
|
||||
}
|
||||
|
||||
if(IS_PATREON && PREFERENCES.show_supporter_icon) {
|
||||
|
|
|
@ -434,7 +434,7 @@ function surface_valid_size(s) {
|
|||
|
||||
if(!is_numeric(s)) return 1;
|
||||
if(is_infinity(s)) return 1;
|
||||
return clamp(s, 1, 8196);
|
||||
return clamp(round(s), 1, 8196);
|
||||
}
|
||||
|
||||
function surface_array_free(arr) {
|
||||
|
|
|
@ -25,6 +25,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
_input_text = "";
|
||||
_last_text = "";
|
||||
current_value = "";
|
||||
_disp_text = "";
|
||||
|
||||
cursor = 0;
|
||||
cursor_pos = 0;
|
||||
|
@ -277,7 +278,6 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
} #endregion
|
||||
|
||||
static display_text = function(_x, _y, _text, _w, _m = -1) { #region
|
||||
_text = string_real(_text);
|
||||
draw_set_alpha(0.5 + 0.5 * interactable);
|
||||
|
||||
switch(format) {
|
||||
|
@ -374,6 +374,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
}
|
||||
|
||||
text_surface = surface_verify(text_surface, _w - ui(16), _h);
|
||||
|
||||
if(!hide) draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, boxColor, 1);
|
||||
disp_x = lerp_float(disp_x, disp_x_to, 5);
|
||||
|
||||
|
@ -462,7 +463,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
}
|
||||
|
||||
surface_set_shader(text_surface, noone, true, BLEND.add);
|
||||
display_text(tx - tb_surf_x, _h / 2 - th / 2, txt, _w - ui(4), _mx - tb_surf_x);
|
||||
display_text(tx - tb_surf_x, _h / 2 - th / 2, string_real(txt), _w - ui(4), _mx - tb_surf_x);
|
||||
surface_reset_shader();
|
||||
|
||||
BLEND_ALPHA
|
||||
|
|
10
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh
Normal file
10
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.fsh
Normal file
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
gl_FragData[0] = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
gl_FragData[1] = vec4(v_vTexcoord, 0., 1. );
|
||||
}
|
19
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh
Normal file
19
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.vsh
Normal 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;
|
||||
}
|
10
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.yy
Normal file
10
shaders/sh_mk_flag_mrt/sh_mk_flag_mrt.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_flag_mrt",
|
||||
"parent": {
|
||||
"name": "Flag",
|
||||
"path": "folders/shader/MK effects/Flag.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
36
shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh
Normal file
36
shaders/sh_mk_flag_shade/sh_mk_flag_shade.fsh
Normal file
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D textureMap;
|
||||
uniform vec2 dimension;
|
||||
uniform vec2 oriPosition;
|
||||
uniform vec2 oriScale;
|
||||
uniform int side;
|
||||
|
||||
uniform int shadowInv;
|
||||
uniform float shadow;
|
||||
uniform float shadowThres;
|
||||
|
||||
void main() {
|
||||
vec2 texPos = texture2D( textureMap, v_vTexcoord ).xy;
|
||||
vec2 oriPos = v_vTexcoord - (oriPosition / dimension);
|
||||
oriPos /= oriScale / dimension;
|
||||
|
||||
float shade;
|
||||
if(side == 0) {
|
||||
if(shadowInv == 0) shade = oriPos.y - shadowThres < texPos.y? shadow : 1.;
|
||||
else shade = oriPos.y - shadowThres > texPos.y? shadow : 1.;
|
||||
} else {
|
||||
if(shadowInv == 0) shade = oriPos.x - shadowThres < texPos.x? shadow : 1.;
|
||||
else shade = oriPos.x - shadowThres > texPos.x? shadow : 1.;
|
||||
}
|
||||
|
||||
vec4 tex = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
|
||||
tex.rgb *= shade;
|
||||
|
||||
gl_FragColor = tex;
|
||||
}
|
19
shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh
Normal file
19
shaders/sh_mk_flag_shade/sh_mk_flag_shade.vsh
Normal 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;
|
||||
}
|
10
shaders/sh_mk_flag_shade/sh_mk_flag_shade.yy
Normal file
10
shaders/sh_mk_flag_shade/sh_mk_flag_shade.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_flag_shade",
|
||||
"parent": {
|
||||
"name": "Flag",
|
||||
"path": "folders/shader/MK effects/Flag.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
BIN
sprites/s_MKFX/c73dddac-dac5-48a6-946b-872fd494343d.png
Normal file
BIN
sprites/s_MKFX/c73dddac-dac5-48a6-946b-872fd494343d.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
74
sprites/s_MKFX/s_MKFX.yy
Normal file
74
sprites/s_MKFX/s_MKFX.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_MKFX",
|
||||
"bbox_bottom": 47,
|
||||
"bbox_left": 7,
|
||||
"bbox_right": 120,
|
||||
"bbox_top": 16,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"c73dddac-dac5-48a6-946b-872fd494343d",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"9732ca81-2fd3-4435-9662-baa1df3f77c3","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 1,
|
||||
"parent": {
|
||||
"name": "MK effects",
|
||||
"path": "folders/nodes/icons/MK effects.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_MKFX",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"c73dddac-dac5-48a6-946b-872fd494343d","path":"sprites/s_MKFX/s_MKFX.yy",},},},"Disabled":false,"id":"89951b9c-0cf7-4f05-8a8a-a9c9877beac4","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 64,
|
||||
"yorigin": 0,
|
||||
},
|
||||
"swatchColours": null,
|
||||
"swfPrecision": 2.525,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"type": 0,
|
||||
"VTile": false,
|
||||
"width": 129,
|
||||
}
|
BIN
sprites/s_node_mk_flag/1df90f61-4eb3-4deb-8559-b204622d14a0.png
Normal file
BIN
sprites/s_node_mk_flag/1df90f61-4eb3-4deb-8559-b204622d14a0.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
74
sprites/s_node_mk_flag/s_node_mk_flag.yy
Normal file
74
sprites/s_node_mk_flag/s_node_mk_flag.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_mk_flag",
|
||||
"bbox_bottom": 63,
|
||||
"bbox_left": 0,
|
||||
"bbox_right": 63,
|
||||
"bbox_top": 0,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"1df90f61-4eb3-4deb-8559-b204622d14a0",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"c905195c-29a2-4f99-abf3-9a5cca11fad5","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "MK effects",
|
||||
"path": "folders/nodes/icons/MK effects.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_mk_flag",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"1df90f61-4eb3-4deb-8559-b204622d14a0","path":"sprites/s_node_mk_flag/s_node_mk_flag.yy",},},},"Disabled":false,"id":"030b00ed-a261-43f8-987c-52c8fcfa9707","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 32,
|
||||
"yorigin": 32,
|
||||
},
|
||||
"swatchColours": null,
|
||||
"swfPrecision": 2.525,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"type": 0,
|
||||
"VTile": false,
|
||||
"width": 64,
|
||||
}
|
Loading…
Reference in a new issue