Welcome files

This commit is contained in:
Tanasart 2024-04-02 10:24:55 +07:00
parent e82a50e5e3
commit 9317331da5
17 changed files with 33 additions and 36 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -568,7 +568,7 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
} #endregion
static processSerialize = function(_map) { #region
_map[? "instance_base"] = instanceBase? instanceBase.node_id : noone;
_map.instance_base = instanceBase? instanceBase.node_id : noone;
} #endregion
static preConnect = function() { #region

View file

@ -1411,13 +1411,10 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
}
preview_surface = surf;
if(preview_surface == noone) return;
if(!is_surface(preview_surface)) return;
//if(__preview_surf != preview_surface) {
__preview_sw = surface_get_width(preview_surface);
__preview_sh = surface_get_height(preview_surface);
// __preview_surf = preview_surface;
//}
var bbox = drawGetBbox(xx, yy, _s);
var aa = 0.5 + 0.5 * renderActive;

View file

@ -75,13 +75,13 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
} #endregion
static button_reactive_update = function() { #region
ml_press = lerp_float(ml_press , 0, 10);
ml_release = lerp_float(ml_release, 0, 10);
ml_double = lerp_float(ml_double, 0, 10);
mr_press = lerp_float(mr_press , 0, 10);
mr_release = lerp_float(mr_release, 0, 10);
mm_press = lerp_float(mm_press , 0, 10);
mm_release = lerp_float(mm_release, 0, 10);
ml_press = lerp_float(ml_press , 0, 5);
ml_release = lerp_float(ml_release, 0, 5);
ml_double = lerp_float(ml_double, 0, 5);
mr_press = lerp_float(mr_press , 0, 5);
mr_release = lerp_float(mr_release, 0, 5);
mm_press = lerp_float(mm_press , 0, 5);
mm_release = lerp_float(mm_release, 0, 5);
if(mouse_press(mb_left)) ml_press = 2;
if(mouse_release(mb_left)) ml_release = 2;
@ -173,7 +173,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
draw_sprite_stretched_points(THEME.ui_panel_fg, 0, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4);
draw_set_color(_cc);
draw_text_transformed(_tx, _y, _bch, _s * fsize, _s * fsize, 0);
draw_text_add(_tx, _y, _bch, _s * fsize);
var _reac = button_reactive(string_to_var(_bch));
if(_reac > 0) {
@ -198,9 +198,10 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
_tw = string_width(_key) * _s * _tss;
_th = string_height(_key) * _s * _tss;
if(point_in_rectangle(_mx, _my, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4)) {
draw_set_color(COLORS._main_accent);
draw_set_alpha(1);
if(point_in_rectangle(_mx, _my, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4)) {
draw_sprite_stretched_points(THEME.ui_panel_fg, 1, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4, COLORS._main_accent, 1);
switch(string_lower(_c[1])) {
case "graph" : FOCUSING_PANEL = PANEL_GRAPH; break;
@ -210,7 +211,8 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
case "collection" : FOCUSING_PANEL = findPanel("Panel_Collection"); break;
}
}
draw_text_transformed(_tx, _y, _key, _s * _tss, _s * _tss, 0);
draw_text_add(_tx, _y, _key, _s * _tss);
_tx += _tw;
width += string_width(_key) * _tss;
@ -250,7 +252,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
_tw = string_width(_ch);
_th = string_height(_ch);
draw_text_transformed(_tx, _y, _ch, _s * fsize, _s * fsize, 0);
draw_text_add(_tx, _y, _ch, _s * fsize);
_tx += _tw * _s * fsize;
width += _tw * fsize;
break;

View file

@ -130,7 +130,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons
case ".png" :
case ".jpg" :
case ".jpeg" :
var _spr = sprite_add(path, 1, false, false, 0, 0);
var _spr = sprite_add(_path, 1, false, false, 0, 0);
if(_spr == -1) {
noti_warning($"Image node: File not a valid image.");

View file

@ -956,11 +956,9 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
deactivate();
} else {
if(_update && _input_text != _text) {
surface_set_shader(text_surface, noone, false, BLEND.add);
display_text(tx, text_y + ui(7), _text);
surface_reset_shader();
}
BLEND_ALPHA
draw_surface(text_surface, _x, _y);