Graph widget

This commit is contained in:
Tanasart 2024-03-29 15:13:26 +07:00
parent bdc44bf71f
commit 0612176015
10 changed files with 151 additions and 136 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -43,7 +43,8 @@ function curveBox(_onModify) : widget() constructor {
w = _w; w = _w;
h = _h; h = _h;
var cw = _w - ui(32); var drawScale = _w - ui(32) > ui(100);
var cw = drawScale? _w - ui(32) : _w;
hovering = false; hovering = false;
if(!is_array(_data) || array_length(_data) == 0) return 0; if(!is_array(_data) || array_length(_data) == 0) return 0;
@ -264,43 +265,45 @@ function curveBox(_onModify) : widget() constructor {
#endregion #endregion
#region ==== buttons ==== #region ==== buttons ====
var bs = ui(20); if(drawScale) {
var bs = ui(20);
var bxF = _x + cw + ui(8); var bxF = _x + cw + ui(8);
var bx = bxF + ui(0); var bx = bxF + ui(0);
var by0 = _y; var by0 = _y;
var by1 = _y + _h - bs + ui(2); var by1 = _y + _h - bs + ui(2);
var byF = _y + (bs + ui(6)); var byF = _y + (bs + ui(6));
var byH = _h + ui(2) - (bs + ui(6)) * 2; var byH = _h + ui(2) - (bs + ui(6)) * 2;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, bxF, byF, bs, byH, COLORS.assetbox_current_bg, 1); draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, bxF, byF, bs, byH, COLORS.assetbox_current_bg, 1);
var zH = ui(16); var zH = ui(16);
var zy = byF + zH / 2 + (byH - zH) * (zoom_level_to - zoom_min) / (zoom_max - zoom_min); var zy = byF + zH / 2 + (byH - zH) * (zoom_level_to - zoom_min) / (zoom_max - zoom_min);
if(zooming) { if(zooming) {
zoom_level_to = lerp(zoom_min, zoom_max, clamp((_m[1] - byF - zH / 2) / (byH - zH), 0, 1)); zoom_level_to = lerp(zoom_min, zoom_max, clamp((_m[1] - byF - zH / 2) / (byH - zH), 0, 1));
if(mouse_release(mb_left)) if(mouse_release(mb_left))
zooming = false; zooming = false;
} }
var cc = merge_color(COLORS._main_icon, COLORS._main_icon_dark, 0.5); var cc = merge_color(COLORS._main_icon, COLORS._main_icon_dark, 0.5);
if(point_in_rectangle(_m[0], _m[1], bxF, byF, _x + _w, byF + byH)) { if(point_in_rectangle(_m[0], _m[1], bxF, byF, _x + _w, byF + byH)) {
cc = COLORS._main_icon; cc = COLORS._main_icon;
if(mouse_press(mb_left, active)) if(mouse_press(mb_left, active))
zooming = true; zooming = true;
} }
draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, bxF, zy - zH / 2, bs, zH, cc, 1); draw_sprite_stretched_ext(THEME.timeline_dopesheet_bg, 0, bxF, zy - zH / 2, bs, zH, cc, 1);
if(buttonInstant(THEME.button_hide, bx, by0, bs, bs, _m, active, hover,, THEME.add_16) == 2) if(buttonInstant(THEME.button_hide, bx, by0, bs, bs, _m, active, hover,, THEME.add_16) == 2)
zoom_level_to = clamp(zoom_level_to - 1, zoom_min, zoom_max); zoom_level_to = clamp(zoom_level_to - 1, zoom_min, zoom_max);
if(buttonInstant(THEME.button_hide, bx, by1, bs, bs, _m, active, hover,, THEME.minus_16) == 2) if(buttonInstant(THEME.button_hide, bx, by1, bs, bs, _m, active, hover,, THEME.minus_16) == 2)
zoom_level_to = clamp(zoom_level_to + 1, zoom_min, zoom_max); zoom_level_to = clamp(zoom_level_to + 1, zoom_min, zoom_max);
}
#endregion #endregion
if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + cw, _y + _h)) { #region if(hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + cw, _y + _h)) { #region

View file

@ -39,7 +39,8 @@ function fontScrollBox(_onModify) : widget() constructor {
w = _w; w = _w;
var _bs = min(_h, ui(32)); var _bs = min(_h, ui(32));
if(extra_button != noone) {
if(_w - _bs > ui(100) && extra_button != noone) {
extra_button.setFocusHover(active, hover); extra_button.setFocusHover(active, hover);
extra_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); extra_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide);
w -= _bs + ui(4); w -= _bs + ui(4);

View file

@ -82,6 +82,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
h = 128; h = 128;
min_w = w; min_w = w;
min_h = h; min_h = h;
fix_h = h;
will_setHeight = false; will_setHeight = false;
selectable = true; selectable = true;
@ -385,7 +386,8 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
for( var i = 0; i < ds_list_size(outputs); i++ ) for( var i = 0; i < ds_list_size(outputs); i++ )
if(outputs[| i].isVisible()) _ho += junction_draw_hei_y; if(outputs[| i].isVisible()) _ho += junction_draw_hei_y;
h = max(min_h, _prev_surf * 128, _hi, _ho, attributes.node_height); h = max(min_h, _prev_surf * 128, _hi, _ho, attributes.node_height);
fix_h = h;
} run_in(1, function() { setHeight(); }); #endregion } run_in(1, function() { setHeight(); }); #endregion
static setDisplayName = function(_name) { #region static setDisplayName = function(_name) { #region
@ -1071,7 +1073,7 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
if(!active) return; if(!active) return;
var hover = noone; var hover = noone;
var wh = 28 * _s; var wh = junction_draw_hei_y * _s;
var ww = w * _s * 0.5; var ww = w * _s * 0.5;
var wx = _x + w * _s - ww - 8; var wx = _x + w * _s - ww - 8;
var lx = _x + 12 * _s; var lx = _x + 12 * _s;
@ -1080,64 +1082,57 @@ function Node(_x, _y, _group = noone) : __Node_Base(_x, _y) constructor {
var rx = PANEL_GRAPH.x; var rx = PANEL_GRAPH.x;
var ry = PANEL_GRAPH.y; var ry = PANEL_GRAPH.y;
var jy = 0; var jy = _y + junction_draw_pad_y * _s + wh / 2;
var y1 = _y + h * _s;
var ay = 0;
var boundH = _x > draw_boundary[0] - w * _s && _x < draw_boundary[2]; var boundH = _x > draw_boundary[0] - w * _s && _x < draw_boundary[2];
var boundV = 1;//_y > draw_boundary[1] - h * _s && _y < draw_boundary[3]; var boundV = 1;//_y > draw_boundary[1] - h * _s && _y < draw_boundary[3];
var extY = 0;
if(wh > line_get_height(f_p2)) { for(var i = 0, n = array_length(inputDisplayList); i < n; i++) {
for(var i = 0, n = array_length(inputDisplayList); i < n; i++) { var jun = inputDisplayList[i];
var jun = inputDisplayList[i]; draw_set_text(f_sdf, fa_left, fa_center, jun.color_display);
if(jy == 0) jy = jun.y - wh / 2; var _param = jun.graphWidgetP;
var _param = jun.graphWidgetP; _param.w = ww;
_param.h = wh - 4 * _s;
_param.x = wx; _param.x = wx;
_param.y = jy; _param.y = jy - _param.h / 2;
_param.w = ww;
_param.h = wh;
_param.data = jun.showValue();
_param.m = _m;
_param.rx = rx;
_param.ry = ry;
_param.s = wh;
_param.font = f_p2;
jun.y = jy + wh / 2;
if(is_instanceof(jun, checkBox)) _param.data = jun.showValue();
_param.halign = fa_center; _param.m = _m;
_param.rx = rx;
_param.ry = ry;
_param.s = wh;
_param.font = f_p2;
//boundV = jy + max(wh, jun.graphWidgetH) > draw_boundary[1] && jy < draw_boundary[3]; jun.y = jy;
if((boundH && boundV) || jun.graphWidgetH == 0) {
draw_set_text(f_sdf, fa_left, fa_center, jun.color_display);
draw_text_add(lx, jun.y, jun.getName(), _s * 0.25);
var wd = jun.graphWidget;
if(wd == noone) {
jy += wh + 4 * _s;
continue;
}
wd.setFocusHover(_focus, _hover);
var _h = wd.drawParam(_param);
jun.graphWidgetH = _h / _s;
if(wd.isHovering()) draggable = false; if(is_instanceof(jun, checkBox))
} _param.halign = fa_center;
jy += (jun.graphWidgetH + 4) * _s; draw_text_add(lx, jun.y, jun.getName(), _s * 0.25);
var wd = jun.graphWidget;
if(wd == noone) {
jy += wh;
continue;
} }
ay = jy + 2 * _s; wd.setInteract(wh > line_get_height(f_p2));
h += (ay - y1) / _s; wd.setFocusHover(_focus, _hover);
var _h = wd.drawParam(_param);
jun.graphWidgetH = _h / _s;
extY += max(0, (jun.graphWidgetH + 4) - junction_draw_hei_y);
if(wd.isHovering()) draggable = false;
jy += (jun.graphWidgetH + 4) * _s;
} }
h = fix_h + extY;
} #endregion } #endregion
static drawJunctions = function(_x, _y, _mx, _my, _s) { #region static drawJunctions = function(_x, _y, _mx, _my, _s) { #region

View file

@ -32,9 +32,11 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor {
hovering = false; hovering = false;
var _bs = min(_h, ui(32)); var _bs = min(_h, ui(32));
openPath.setFocusHover(active, hover); if(_w - _bs > ui(100)) {
openPath.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); openPath.setFocusHover(active, hover);
_w -= _bs + ui(4); openPath.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide);
_w -= _bs + ui(4);
}
var click = false; var click = false;
draw_sprite_stretched(THEME.textbox, 3, _x, _y, _w, _h); draw_sprite_stretched(THEME.textbox, 3, _x, _y, _w, _h);
@ -65,10 +67,12 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor {
txt += (i? ", " : "") + filename_name_only(_files[i]); txt += (i? ", " : "") + filename_name_only(_files[i]);
txt += "]"; txt += "]";
draw_set_alpha(aa);
draw_set_text(font, fa_left, fa_center, COLORS._main_text); draw_set_text(font, fa_left, fa_center, COLORS._main_text);
draw_text_cut(_x + ui(8), _y + _h / 2, txt, _w - ui(16)); if(_h >= line_get_height()) {
draw_set_alpha(1); draw_set_alpha(aa);
draw_text_cut(_x + ui(8), _y + _h / 2, txt, _w - ui(16));
draw_set_alpha(1);
}
if(WIDGET_CURRENT == self) if(WIDGET_CURRENT == self)
draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1); draw_sprite_stretched_ext(THEME.widget_selecting, 0, _x - ui(3), _y - ui(3), _w + ui(6), _h + ui(6), COLORS._main_accent, 1);

View file

@ -111,10 +111,12 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor
if(_spr) _x0 += ui(32); if(_spr) _x0 += ui(32);
draw_set_text(font, align, fa_center, COLORS._main_text); draw_set_text(font, align, fa_center, COLORS._main_text);
draw_set_alpha(0.5 + 0.5 * interactable); if(_h >= line_get_height()) {
if(align == fa_center) draw_text_add((_x0 + _x1) / 2, _yc, _text); draw_set_alpha(0.5 + 0.5 * interactable);
else if(align == fa_left) draw_text_add(_x0 + ui(8), _yc, _text); if(align == fa_center) draw_text_add((_x0 + _x1) / 2, _yc, _text);
draw_set_alpha(1); else if(align == fa_left) draw_text_add(_x0 + ui(8), _yc, _text);
draw_set_alpha(1);
}
if(_spr) draw_sprite_ext(_selVal.spr, _selVal.spr_ind, _x + ui(16), _yc, 1, 1, 0, _selVal.spr_blend, 1); if(_spr) draw_sprite_ext(_selVal.spr, _selVal.spr_ind, _x + ui(16), _yc, 1, 1, 0, _selVal.spr_blend, 1);

View file

@ -8,7 +8,6 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
align = _input == TEXTBOX_INPUT.number? fa_center : fa_left; align = _input == TEXTBOX_INPUT.number? fa_center : fa_left;
hide = false; hide = false;
font = noone;
color = COLORS._main_text; color = COLORS._main_text;
boxColor = c_white; boxColor = c_white;
format = TEXT_AREA_FORMAT._default; format = TEXT_AREA_FORMAT._default;
@ -336,20 +335,22 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
static display_text = function(_x, _y, _text, _w, _m = -1) { #region static display_text = function(_x, _y, _text, _w, _m = -1) { #region
draw_set_alpha(0.5 + 0.5 * interactable); draw_set_alpha(0.5 + 0.5 * interactable);
_y += ui(1); _y += ui(1); //Huh?
var cc = color; var cc = color;
if(sliding == 2) cc = COLORS._main_accent if(sliding == 2) cc = COLORS._main_accent
draw_set_text(font == noone? f_p0 : font, fa_left, fa_top, cc); draw_set_text(font, fa_left, fa_top, cc);
draw_text_add(_x + disp_x, _y, _text + suffix); draw_text_add(_x + disp_x, _y, _text + suffix);
draw_set_alpha(1); draw_set_alpha(1);
_disp_text = _text;
var _xx = _x + disp_x; var _xx = _x + disp_x;
var _mm = _m; var _mm = _m;
var target = -999; var target = -999;
if(!sliding && _mm >= 0) { if(!sliding && selecting) {
for( var i = 1; i <= string_length(_text); i++ ) { for( var i = 1; i <= string_length(_text); i++ ) {
var _ch = string_char_at(_text, i); var _ch = string_char_at(_text, i);
var _chw = string_width(_ch); var _chw = string_width(_ch);
@ -364,20 +365,21 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
_xx += _chw; _xx += _chw;
} }
}
if(target != -999) {
if(target != -999) { if(!click_block) {
if(!click_block) { if(mouse_press(mb_left, active)) {
if(mouse_press(mb_left, active)) { cursor_select = target;
cursor_select = target; cursor = target;
cursor = target; } else if(mouse_click(mb_left, active) && cursor != target)
} else if(mouse_click(mb_left, active) && cursor != target) cursor = target;
cursor = target; }
} }
}
if(mouse_release(mb_left, active)) if(mouse_release(mb_left, active))
click_block = false; click_block = false;
}
} #endregion } #endregion
static drawParam = function(params) { #region static drawParam = function(params) { #region
@ -393,9 +395,11 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
h = _h; h = _h;
hovering = false; hovering = false;
_x += irandom_range(-shake_amount, shake_amount); if(shake_amount != 0) {
_y += irandom_range(-shake_amount, shake_amount); _x += irandom_range(-shake_amount, shake_amount);
if(shake_amount) shake_amount--; _y += irandom_range(-shake_amount, shake_amount);
if(shake_amount) shake_amount--;
}
switch(halign) { switch(halign) {
case fa_left: _x = _x; break; case fa_left: _x = _x; break;
@ -411,22 +415,19 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
var _bs = min(h, ui(32)); var _bs = min(h, ui(32));
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { if(_w - _bs > ui(100) && side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide);
_w -= _bs + ui(4); _w -= _bs + ui(4);
} }
draw_set_font(font == noone? f_p0 : font);
var _raw_text = _text; var _raw_text = _text;
_text = string_real(_text); _text = string_real(_text);
_current_text = _text; _current_text = _text;
var tb_surf_x = _x + ui(8); var tb_surf_x = _x + ui(8);
var tb_surf_y = _y; var tb_surf_y = _y;
draw_set_text(font == noone? f_p0 : font, fa_left, fa_top);
var tx = _x; var tx = _x;
switch(align) { switch(align) {
case fa_left : tx = _x + ui(8); break; case fa_left : tx = _x + ui(8); break;
@ -434,7 +435,8 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
case fa_right : tx = _x + _w - ui(8); break; case fa_right : tx = _x + _w - ui(8); break;
} }
text_surface = surface_verify(text_surface, _w - ui(16), _h); var _update = !surface_valid(text_surface, _w - ui(16), _h);
if(_update) text_surface = surface_verify(text_surface, _w - ui(16), _h);
if(!hide) { if(!hide) {
draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, boxColor, 1); draw_sprite_stretched_ext(THEME.textbox, 3, _x, _y, _w, _h, boxColor, 1);
@ -465,8 +467,8 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
draw_sprite_ui_uniform(THEME.arrow, 0, _ax1, _ay, 1, COLORS._main_accent, 1); draw_sprite_ui_uniform(THEME.arrow, 0, _ax1, _ay, 1, COLORS._main_accent, 1);
} else if(label != "") { } else if(label != "") {
draw_set_valign(fa_center) draw_set_text(font, fa_left, fa_center, COLORS._main_text_sub);
draw_set_color(COLORS._main_text_sub);
draw_set_alpha(0.5); draw_set_alpha(0.5);
draw_text_add(_x + ui(8), _y + _h / 2, label); draw_text_add(_x + ui(8), _y + _h / 2, label);
draw_set_alpha(1); draw_set_alpha(1);
@ -478,10 +480,9 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h); var hoverRect = point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h);
if(selecting) { if(selecting) {
if(sprite_index == -1) if(sprite_index == -1) draw_sprite_stretched_ext(THEME.textbox, 2, _x, _y, _w, _h, COLORS._main_accent, 1);
draw_sprite_stretched_ext(THEME.textbox, 2, _x, _y, _w, _h, COLORS._main_accent, 1); else draw_sprite_stretched(THEME.textbox, sprite_index, _x, _y, _w, _h);
else
draw_sprite_stretched(THEME.textbox, sprite_index, _x, _y, _w, _h);
editText(); editText();
#region multiplier #region multiplier
@ -509,7 +510,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
#region draw #region draw
var txt = _input_text; var txt = _input_text;
draw_set_text(font == noone? f_p0 : font, fa_left, fa_top); draw_set_text(font, fa_left, fa_top);
var tw = string_width(txt); var tw = string_width(txt);
var th = string_height(txt == ""? "l" : txt); var th = string_height(txt == ""? "l" : txt);
@ -560,9 +561,12 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
_my = _m[1]; _my = _m[1];
} }
surface_set_shader(text_surface, noone, true, BLEND.add); var _display_text = string_real(txt);
display_text(tx - tb_surf_x, _h / 2 - th / 2, string_real(txt), _w - ui(4), _mx - tb_surf_x); if(_update || _display_text != _disp_text) {
surface_reset_shader(); surface_set_shader(text_surface, noone, true, BLEND.add);
display_text(tx - tb_surf_x, _h / 2 - th / 2, _display_text, _w - ui(4), _mx - tb_surf_x);
surface_reset_shader();
}
BLEND_ALPHA BLEND_ALPHA
draw_surface(text_surface, tb_surf_x, tb_surf_y); draw_surface(text_surface, tb_surf_x, tb_surf_y);
@ -580,13 +584,16 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
if(!hoverRect && mouse_press(mb_left)) if(!hoverRect && mouse_press(mb_left))
deactivate(); deactivate();
} else { #region draw
draw_set_text(font == noone? f_p0 : font, fa_left, fa_center); } else {
draw_set_text(font, fa_left, fa_center);
var _display_text = _raw_text; var _display_text = _raw_text;
if(input == TEXTBOX_INPUT.number) { if(input == TEXTBOX_INPUT.number) {
var dig = floor(_w / string_width("0")) - 3; var dig = floor(_w / string_width("0")) - 3;
_display_text = string_real(_display_text, dig, precision); _display_text = string_real(_display_text, dig, precision);
} }
var tw = string_width(_display_text); var tw = string_width(_display_text);
var th = string_height(_display_text); var th = string_height(_display_text);
@ -611,25 +618,28 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
if(mouse_wheel_down()) modifyValue(toNumber(_text) + amo * SCROLL_SPEED); if(mouse_wheel_down()) modifyValue(toNumber(_text) + amo * SCROLL_SPEED);
if(mouse_wheel_up()) modifyValue(toNumber(_text) - amo * SCROLL_SPEED); if(mouse_wheel_up()) modifyValue(toNumber(_text) - amo * SCROLL_SPEED);
} }
if(slidable && mouse_press(mb_left, active)) {
sliding = 1;
slide_delta = 0;
slide_mx = _m[0];
slide_my = _m[1];
}
} else if(!hide) } else if(!hide)
draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable); draw_sprite_stretched_ext(THEME.textbox, 0, _x, _y, _w, _h, boxColor, 0.5 + 0.5 * interactable);
if(slidable && hover && point_in_rectangle(_m[0], _m[1], _x, _y, _x + _w, _y + _h) && mouse_press(mb_left, active)) { if(_update || _display_text != _disp_text) {
sliding = 1; surface_set_shader(text_surface, noone, true, BLEND.add);
slide_delta = 0; display_text(tx - tb_surf_x, _h / 2 - th / 2, _display_text, _w - ui(4));
surface_reset_shader();
slide_mx = _m[0]; }
slide_my = _m[1];
}
surface_set_shader(text_surface, noone, true, BLEND.add);
display_text(tx - tb_surf_x, _h / 2 - th / 2, _display_text, _w - ui(4));
surface_reset_shader();
BLEND_ALPHA BLEND_ALPHA
draw_surface(text_surface, tb_surf_x, tb_surf_y); draw_surface(text_surface, tb_surf_x, tb_surf_y);
BLEND_NORMAL BLEND_NORMAL
} #endregion }
if(sliding > 0) { #region if(sliding > 0) { #region
slide_delta += window_mouse_get_delta_x(); slide_delta += window_mouse_get_delta_x();