1.17.9
|
@ -603,6 +603,8 @@
|
|||
{"$GMIncludedFile":"","%Name":"0 Introduction.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"0 Introduction.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"1 Image import.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"1 Image import.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"1 Image import.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"1 Image import.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"10 Audio.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"10 Audio.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"11 Optimization.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"11 Optimization.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"2 Animation.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"2 Animation.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"2 Animation.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"2 Animation.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"3 Group.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"3 Group.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
|
@ -611,6 +613,14 @@
|
|||
{"$GMIncludedFile":"","%Name":"4 Loop.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"4 Loop.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"5 Particles.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"5 Particles.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"5 Particles.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"5 Particles.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"6 Organization.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"6 Organization.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"6 Organization.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"6 Organization.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"7 Composing.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"7 Composing.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"7 Composing.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"7 Composing.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"8 Path.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"8 Path.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"8 Path.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"8 Path.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"9 Expression.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"9 Expression.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"9 Expression.pxc","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"9 Expression.pxc","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"arrowRight.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"arrowRight.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"card_back.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"card_back.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"card_clubs_02.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"card_clubs_02.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
|
@ -623,7 +633,9 @@
|
|||
{"$GMIncludedFile":"","%Name":"dice_4.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"dice_4.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"dice_5.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"dice_5.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"dice_6.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"dice_6.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"driver_dialog.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"driver_dialog.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"multi file dialog.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"multi file dialog.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"node_clutter.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"node_clutter.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"tile_0044.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"tile_0044.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"tile_0067.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"tile_0067.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
{"$GMIncludedFile":"","%Name":"tile_0126.png","CopyToMask":-1,"filePath":"datafiles/Welcome files/Getting started","name":"tile_0126.png","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||
|
|
BIN
datafiles/Welcome files/Getting started/10 Audio.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
datafiles/Welcome files/Getting started/11 Optimization.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
BIN
datafiles/Welcome files/Getting started/6 Organization.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
datafiles/Welcome files/Getting started/7 Composing.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
1
datafiles/Welcome files/Getting started/7 Composing.pxc
Normal file
BIN
datafiles/Welcome files/Getting started/8 Path.png
Normal file
After Width: | Height: | Size: 2.5 KiB |
1
datafiles/Welcome files/Getting started/8 Path.pxc
Normal file
BIN
datafiles/Welcome files/Getting started/9 Expression.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
1
datafiles/Welcome files/Getting started/9 Expression.pxc
Normal file
BIN
datafiles/Welcome files/Getting started/driver_dialog.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
datafiles/Welcome files/Getting started/node_clutter.png
Normal file
After Width: | Height: | Size: 16 KiB |
|
@ -654,5 +654,4 @@ function Node_3D_Object(_x, _y, _group = noone) : Node_3D(_x, _y, _group) constr
|
|||
|
||||
static getPreviewObjects = function() { return [ getPreviewObject(), gizmo ]; }
|
||||
static getPreviewObjectOutline = function() { return [ getPreviewObject(), gizmo ]; }
|
||||
|
||||
}
|
|
@ -20,10 +20,11 @@ function draw_text_over(_x, _y, _text, scale = 1) {
|
|||
|
||||
function draw_text_add_float(_x, _y, _text, scale = 1) {
|
||||
INLINE
|
||||
BLEND_ALPHA_MULP;
|
||||
if(scale == 1) draw_text(_x, _y, _text);
|
||||
else draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
||||
|
||||
BLEND_ADD;
|
||||
if(scale == 1) draw_text(_x, _y, _text); else draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
||||
BLEND_NORMAL;
|
||||
if(scale == 1) draw_text(_x, _y, _text); else draw_text_transformed(_x, _y, _text, scale, scale, 0);
|
||||
}
|
||||
|
||||
function draw_text_bm_add(_x, _y, _text, scale = 1) {
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
||||
|
||||
LATEST_VERSION = 11700;
|
||||
VERSION = 11780;
|
||||
VERSION = 11790;
|
||||
SAVE_VERSION = 11700;
|
||||
VERSION_STRING = "1.17.9.007";
|
||||
BUILD_NUMBER = 11780;
|
||||
VERSION_STRING = "1.17.9";
|
||||
BUILD_NUMBER = 11790;
|
||||
|
||||
HOTKEYS = ds_map_create();
|
||||
HOTKEY_CONTEXT = ds_list_create();
|
||||
|
|
|
@ -44,9 +44,6 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) {
|
|||
var _PROJECT = PROJECT;
|
||||
PROJECT = new Project();
|
||||
|
||||
var res = LOAD_AT(path, new __loadParams(readonly));
|
||||
if(!res) return false;
|
||||
|
||||
if(_PROJECT == noone) {
|
||||
PROJECTS = [ PROJECT ];
|
||||
|
||||
|
@ -66,6 +63,9 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) {
|
|||
array_push(PROJECTS, PROJECT);
|
||||
}
|
||||
|
||||
var res = LOAD_AT(path, new __loadParams(readonly));
|
||||
if(!res) return false;
|
||||
|
||||
PROJECT.safeMode = safe_mode;
|
||||
if(!IS_CMD) setFocus(PANEL_GRAPH.panel);
|
||||
|
||||
|
|
|
@ -873,5 +873,4 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
if(struct_has(attr, "layer_selectable"))
|
||||
attributes.layer_selectable = attr.layer_selectable;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -14,6 +14,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
auto_height = false;
|
||||
name_hover = false;
|
||||
draw_scale = 1;
|
||||
init_size = true;
|
||||
|
||||
ta_editor = new textArea(TEXTBOX_INPUT.text, function(val) { inputs[| 1].setValue(val); })
|
||||
|
||||
|
@ -37,20 +38,21 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
.setDisplay(VALUE_DISPLAY.vector)
|
||||
.rejectArray();
|
||||
|
||||
inputs[| 6] = nodeValue("Smooth transform", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true)
|
||||
inputs[| 6] = nodeValue("Line height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.rejectArray();
|
||||
|
||||
|
||||
input_display_list = [1,
|
||||
["Styling", false], 2, 0, 4,
|
||||
["Display", false], 5, 6,
|
||||
["Styling", false], 2, 0, 4, 6,
|
||||
["Display", false], 5,
|
||||
];
|
||||
|
||||
_prev_text = "";
|
||||
font = f_sdf_medium;
|
||||
fsize = 1;
|
||||
line_h = 0;
|
||||
_lines = [];
|
||||
draw_simple = false;
|
||||
|
||||
smooth = true;
|
||||
pos_x = x;
|
||||
pos_y = y;
|
||||
|
||||
|
@ -131,13 +133,22 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
}
|
||||
|
||||
static draw_text_style = function(_x, _y, txt, _s, _mx, _my) {
|
||||
var _ss = _s * fsize;
|
||||
|
||||
if(draw_simple) {
|
||||
draw_text_add_float(_x, _y, txt, _ss);
|
||||
return string_width(txt) * fsize;
|
||||
}
|
||||
|
||||
var _tx = _x;
|
||||
var index = 1;
|
||||
var _len = string_length(txt);
|
||||
var _ch = "";
|
||||
var _ch_h = string_height("l") * _s * fsize;
|
||||
var _ch_h = string_height("l") * _ss;
|
||||
var _mode = 0;
|
||||
|
||||
var _cmd = "";
|
||||
var _str = "";
|
||||
var width = 0;
|
||||
|
||||
var _tw, _th;
|
||||
|
@ -146,7 +157,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
var _cc = draw_get_color();
|
||||
var _aa = draw_get_alpha();
|
||||
|
||||
while(index <= _len) {
|
||||
repeat(_len) {
|
||||
_ch = string_char_at(txt, index);
|
||||
index++;
|
||||
|
||||
|
@ -166,14 +177,14 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
var _bw = string_width(_bch);
|
||||
|
||||
_tx += 4 * _s;
|
||||
_tw = _bw * _s * fsize;
|
||||
_th = string_height(_bch) * _s * fsize;
|
||||
_tw = _bw * _ss;
|
||||
_th = string_height(_bch) * _ss;
|
||||
|
||||
draw_sprite_stretched_points(THEME.ui_panel_bg, 0, _tx - 4, _y - 4, _tx + _tw + 4, _y + _th + 4, COLORS._main_icon_light);
|
||||
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_add_float(_tx, _y, _bch, _s * fsize);
|
||||
draw_text_add_float(_tx, _y, _bch, _ss);
|
||||
|
||||
var _reac = button_reactive(string_to_var(_bch));
|
||||
if(_reac > 0) {
|
||||
|
@ -181,7 +192,7 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
|
||||
draw_set_color(merge_color(0, COLORS.panel_bg_clear_inner, 0.5));
|
||||
draw_set_alpha(_reac);
|
||||
draw_text_transformed(_tx, _y, _bch, _s * fsize, _s * fsize, 0);
|
||||
draw_text_transformed(_tx, _y, _bch, _ss, _ss, 0);
|
||||
draw_set_alpha(_aa);
|
||||
draw_set_color(_cc);
|
||||
}
|
||||
|
@ -198,14 +209,14 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
var _bw = string_width(_bch);
|
||||
|
||||
_tx += 4 * _s;
|
||||
_tw = _bw * _s * fsize;
|
||||
_th = string_height(_bch) * _s * fsize;
|
||||
_tw = _bw * _ss;
|
||||
_th = string_height(_bch) * _ss;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.node_bg, 0, _tx - 4, _y - 4, _tw + 8, _th + 8, c_white, .75);
|
||||
draw_sprite_stretched_add(THEME.node_bg, 0, _tx - 4, _y - 4, _tw + 8, _th + 8, c_white, .10);
|
||||
|
||||
draw_set_color(_cc);
|
||||
draw_text_add_float(_tx, _y, _bch, _s * fsize);
|
||||
draw_text_add_float(_tx, _y, _bch, _ss);
|
||||
|
||||
_tx += _tw + 4 * _s;
|
||||
width += _bw * fsize + 8;
|
||||
|
@ -271,26 +282,34 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
}
|
||||
|
||||
switch(_mode) {
|
||||
case 0 :
|
||||
_tw = string_width(_ch);
|
||||
_th = string_height(_ch);
|
||||
|
||||
gpu_set_colorwriteenable(1, 1, 1, 0);
|
||||
BLEND_OVERRIDE
|
||||
draw_text_add_float(_tx, _y, _ch, _s * fsize);
|
||||
BLEND_NORMAL
|
||||
|
||||
gpu_set_colorwriteenable(1, 1, 1, 1);
|
||||
draw_text_add_float(_tx, _y, _ch, _s * fsize);
|
||||
|
||||
_tx += _tw * _s * fsize;
|
||||
width += _tw * fsize;
|
||||
case 0 :
|
||||
_str += _ch;
|
||||
break;
|
||||
|
||||
case 1 : _cmd += _ch; break;
|
||||
case 1 :
|
||||
if(_str != "") {
|
||||
draw_text_add_float(_tx, _y, _str, _ss);
|
||||
_tw = string_width(_str);
|
||||
|
||||
_tx += _tw * _ss;
|
||||
width += _tw * fsize;
|
||||
_str = "";
|
||||
}
|
||||
|
||||
_cmd += _ch;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(_str != "") {
|
||||
draw_text_add_float(_tx, _y, _str, _ss);
|
||||
_tw = string_width(_str);
|
||||
|
||||
_tx += _tw * _ss;
|
||||
width += _tw * fsize;
|
||||
_str = "";
|
||||
}
|
||||
|
||||
return width;
|
||||
}
|
||||
|
||||
|
@ -378,6 +397,8 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
} else
|
||||
ss += _ps;
|
||||
}
|
||||
|
||||
array_push(_lines, "/");
|
||||
}
|
||||
|
||||
if(ss != "") array_push(_lines, ss);
|
||||
|
@ -416,15 +437,18 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
}
|
||||
|
||||
static drawNodeBase = function(xx, yy, mx, my, _s) {
|
||||
if(draw_graph_culled && !init_size) return;
|
||||
|
||||
var color = getInputData(0);
|
||||
var txt = getInputData(1);
|
||||
if(txt == "") txt = "..."
|
||||
draw_simple = string_pos("<", txt) == 0;
|
||||
|
||||
var sty = getInputData(2);
|
||||
var alp = _color_get_alpha(color);
|
||||
var wid = getInputData(4);
|
||||
var posi = getInputData(5);
|
||||
smooth = getInputData(6);
|
||||
line_h = getInputData(6);
|
||||
|
||||
pos_x = posi[0];
|
||||
pos_y = posi[1];
|
||||
|
@ -457,7 +481,13 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
draw_set_text(font, fa_left, fa_top, color);
|
||||
for( var i = 0, n = array_length(_lines); i < n; i++ ) {
|
||||
var _line = _lines[i];
|
||||
var _h = line_get_height(font) * fsize;
|
||||
if(_line == "/") {
|
||||
hh += 8;
|
||||
ty += 8 * _s;
|
||||
continue;
|
||||
}
|
||||
|
||||
var _h = line_get_height(font) * fsize + line_h;
|
||||
var _w = draw_text_style(tx, ty, _line, _s, mx, my);
|
||||
|
||||
ww = max(ww, _w);
|
||||
|
@ -477,6 +507,8 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
draw_scale = _s;
|
||||
w = ww + 8;
|
||||
h = hh + 8;
|
||||
|
||||
init_size = false;
|
||||
}
|
||||
|
||||
static drawJunctions = function(_x, _y, _mx, _my, _s) {
|
||||
|
@ -495,21 +527,22 @@ function Node_Display_Text(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
|||
return hover;
|
||||
}
|
||||
|
||||
static update = function() {
|
||||
init_size = true;
|
||||
}
|
||||
|
||||
static drawNode = function(_x, _y, _mx, _my, _s) {
|
||||
x = smooth? lerp_float(x, pos_x, 4) : pos_x;
|
||||
y = smooth? lerp_float(y, pos_y, 4) : pos_y;
|
||||
|
||||
var xx = x * _s + _x;
|
||||
var yy = y * _s + _y;
|
||||
|
||||
button_reactive_update();
|
||||
drawNodeBase(xx, yy, _mx, _my, _s);
|
||||
|
||||
if(active_draw_index > -1) {
|
||||
draw_sprite_stretched_ext(bg_sel_spr, 0, xx, yy, w * _s, h * _s, COLORS._main_accent, 1);
|
||||
active_draw_index = -1;
|
||||
}
|
||||
|
||||
button_reactive_update();
|
||||
drawNodeBase(xx, yy, _mx, _my, _s);
|
||||
|
||||
return drawJunctions(xx, yy, _mx, _my, _s);
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"$GMScript":"",
|
||||
"%Name":"node_display_text",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
|
|
|
@ -248,7 +248,7 @@ function Node_Tunnel_In(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
|||
|
||||
static onClone = function() { onValueUpdate(0); }
|
||||
|
||||
static postConnect = function() { onValueUpdate(0); }
|
||||
static postConnect = function() { step(); onValueUpdate(0); }
|
||||
|
||||
static onDestroy = function() {
|
||||
if(error_notification != noone)
|
||||
|
|
|
@ -185,5 +185,5 @@ function Node_Tunnel_Out(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
|||
|
||||
static onClone = function() { onValueUpdate(0); }
|
||||
|
||||
static postConnect = function() { onValueUpdate(0); }
|
||||
static postConnect = function() { step(); onValueUpdate(0); }
|
||||
}
|
|
@ -184,6 +184,8 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
show_view_control = 1;
|
||||
|
||||
bg_color = c_black;
|
||||
|
||||
slider_width = 0;
|
||||
#endregion
|
||||
|
||||
#region ---- position ----
|
||||
|
@ -609,12 +611,6 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
|
||||
function getFocusingNode() { return array_empty(nodes_selecting)? noone : nodes_selecting[0]; }
|
||||
|
||||
function getCurrentContext() { return array_empty(node_context)? noone : node_context[array_length(node_context) - 1]; }
|
||||
|
||||
function getNodeList(cont = getCurrentContext()) { #region
|
||||
return cont == noone? project.nodes : cont.getNodeList();
|
||||
} #endregion
|
||||
|
||||
//// =========== Menus ===========
|
||||
|
||||
menu_sent_to_preview = menuItem(__txtx("panel_graph_send_to_preview", "Send to preview"), function() /*=>*/ { setCurrentPreview(node_hover); });
|
||||
|
@ -765,8 +761,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
nodes_list = project.nodes;
|
||||
|
||||
setTitle();
|
||||
run_in(2, function() /*=>*/ { setSlideShow(0); });
|
||||
struct_override(display_parameter, project.graph_display_parameter);
|
||||
run_in(2, function() /*=>*/ {
|
||||
setSlideShow(0);
|
||||
struct_override(display_parameter, project.graph_display_parameter);
|
||||
});
|
||||
}
|
||||
|
||||
//// ============ Views ============
|
||||
|
@ -934,9 +932,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
|
||||
function setSlideShow(index, skip = false) {
|
||||
var _targ = project.slideShowSet(index);
|
||||
|
||||
if(_targ == noone) return;
|
||||
|
||||
setContext(_targ);
|
||||
|
||||
var _gx = w / 2 / graph_s;
|
||||
var _gy = h / 2 / graph_s;
|
||||
|
||||
|
@ -966,6 +965,29 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
|
||||
//// =========== Context ==========
|
||||
|
||||
|
||||
function getCurrentContext() { return array_empty(node_context)? noone : node_context[array_length(node_context) - 1]; }
|
||||
|
||||
function getNodeList(cont = getCurrentContext()) { return cont == noone? project.nodes : cont.getNodeList(); }
|
||||
|
||||
function setContext(context) {
|
||||
if(context.group == getCurrentContext()) return;
|
||||
|
||||
node_context = [];
|
||||
nodes_list = project.nodes;
|
||||
|
||||
var _ctxs = [];
|
||||
var _ctx = context;
|
||||
|
||||
while(_ctx.group != noone) {
|
||||
array_insert(_ctxs, 0, _ctx.group);
|
||||
_ctx = _ctx.group;
|
||||
}
|
||||
|
||||
for (var i = 0, n = array_length(_ctxs); i < n; i++)
|
||||
addContext(_ctxs[i]);
|
||||
}
|
||||
|
||||
function resetContext() {
|
||||
node_context = [];
|
||||
nodes_list = project.nodes;
|
||||
|
@ -2336,17 +2358,18 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
var _sl_y = h - toolbar_height - ui(8) - _sl_h;
|
||||
var _ss_y = _sl_y + _sl_h - ui(16);
|
||||
|
||||
if(cur != noone) {
|
||||
if(cur != noone && cur.slide_title != "") {
|
||||
draw_set_text(f_p2, fa_center, fa_top, COLORS._main_icon_light);
|
||||
var _txtw = string_width(cur.slide_title) + ui(32);
|
||||
_sl_w = max(_sl_w, _txtw);
|
||||
_sl_h = _sl_h + ui(8 + 12);
|
||||
|
||||
_sl_x = w / 2 - _sl_w / 2;
|
||||
_sl_y = h - toolbar_height - ui(8) - _sl_h;
|
||||
}
|
||||
|
||||
draw_sprite_stretched(THEME.ui_panel_bg, 3, _sl_x, _sl_y, _sl_w, _sl_h);
|
||||
slider_width = slider_width == 0? _sl_w : lerp_float(slider_width, _sl_w, 10);
|
||||
_sl_x = w / 2 - slider_width / 2;
|
||||
_sl_y = h - toolbar_height - ui(8) - _sl_h;
|
||||
|
||||
draw_sprite_stretched(THEME.ui_panel_bg, 3, _sl_x, _sl_y, slider_width, _sl_h);
|
||||
|
||||
if(cur != noone) draw_text_add(round(w / 2), round(_sl_y + ui(8)), cur.slide_title);
|
||||
|
||||
|
@ -2374,12 +2397,12 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
draw_sprite_ext(THEME.circle, 0, _sx, _sy, ss, ss, 0, cc, aa);
|
||||
}
|
||||
|
||||
if(point_in_rectangle(mx, my, _sl_x, _sl_y, _sl_x + _sl_w, _sl_y + _sl_h)) {
|
||||
if(point_in_rectangle(mx, my, _sl_x, _sl_y, _sl_x + slider_width, _sl_y + _sl_h)) {
|
||||
mouse_on_graph = false;
|
||||
|
||||
if(pHOVER && !_hv) {
|
||||
draw_sprite_stretched_add(THEME.ui_panel_bg, 4, _sl_x, _sl_y, _sl_w, _sl_h, COLORS._main_icon, 0.05);
|
||||
draw_sprite_stretched_add(THEME.ui_panel_fg, 1, _sl_x, _sl_y, _sl_w, _sl_h, c_white, 0.1);
|
||||
draw_sprite_stretched_add(THEME.ui_panel_bg, 4, _sl_x, _sl_y, slider_width, _sl_h, COLORS._main_icon, 0.05);
|
||||
draw_sprite_stretched_add(THEME.ui_panel_fg, 1, _sl_x, _sl_y, slider_width, _sl_h, c_white, 0.1);
|
||||
|
||||
if(mouse_press(mb_left, pFOCUS))
|
||||
setSlideShow((ind + 1) % amo);
|
||||
|
|