2022-01-13 05:24:03 +01:00
|
|
|
/// @description init
|
|
|
|
if !ready exit;
|
|
|
|
|
|
|
|
#region base UI
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched(THEME.dialog_bg, 0, dialog_x, dialog_y, dialog_w, dialog_h);
|
2022-11-03 11:44:49 +01:00
|
|
|
if(sFOCUS)
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched_ext(THEME.dialog_active, 0, dialog_x, dialog_y, dialog_w, dialog_h, COLORS._main_accent, 1);
|
2022-01-13 05:24:03 +01:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region search
|
2023-01-17 08:11:55 +01:00
|
|
|
WIDGET_CURRENT = tb_search;
|
2022-09-21 06:09:40 +02:00
|
|
|
|
2022-01-13 05:24:03 +01:00
|
|
|
if(search_string == "") {
|
2022-09-21 06:09:40 +02:00
|
|
|
tb_search.focus = false;
|
|
|
|
tb_search.hover = false;
|
|
|
|
tb_search.sprite_index = 1;
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2023-02-28 09:43:01 +01:00
|
|
|
catagory_pane.setActiveFocus(sFOCUS, sHOVER);
|
2022-11-03 11:44:49 +01:00
|
|
|
catagory_pane.draw(dialog_x + ui(14), dialog_y + ui(52));
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(120), dialog_y + ui(52), dialog_w - ui(134), dialog_h - ui(66));
|
2023-02-28 09:43:01 +01:00
|
|
|
content_pane.setActiveFocus(sFOCUS, sHOVER);
|
2022-11-03 11:44:49 +01:00
|
|
|
content_pane.draw(dialog_x + ui(120), dialog_y + ui(52));
|
2022-01-18 05:31:19 +01:00
|
|
|
|
|
|
|
node_selecting = 0;
|
2022-01-13 05:24:03 +01:00
|
|
|
} else {
|
2022-09-21 06:09:40 +02:00
|
|
|
tb_search.focus = true;
|
|
|
|
tb_search.hover = true;
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched(THEME.ui_panel_bg, 0, dialog_x + ui(14), dialog_y + ui(52), dialog_w - ui(28), dialog_h - ui(66));
|
2023-02-28 09:43:01 +01:00
|
|
|
search_pane.setActiveFocus(sFOCUS, sHOVER);
|
2022-11-03 11:44:49 +01:00
|
|
|
search_pane.draw(dialog_x + ui(16), dialog_y + ui(52));
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
2022-09-21 06:09:40 +02:00
|
|
|
|
2023-02-14 11:40:24 +01:00
|
|
|
var tw = dialog_w - ui(96);
|
|
|
|
if(node_called != noone || junction_hovering != noone)
|
|
|
|
tw -= ui(32);
|
|
|
|
tb_search.draw(dialog_x + ui(14), dialog_y + ui(14), tw, ui(32), search_string, mouse_ui);
|
2023-01-09 03:14:20 +01:00
|
|
|
|
2022-11-03 11:44:49 +01:00
|
|
|
var bx = dialog_x + dialog_w - ui(44);
|
|
|
|
var by = dialog_y + ui(16);
|
2022-11-18 03:20:31 +01:00
|
|
|
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
|
2023-02-14 11:40:24 +01:00
|
|
|
PREF_MAP[? "dialog_add_node_view"]? get_text("view_list", "List view") : get_text("view_grid", "Grid view"),
|
|
|
|
THEME.view_mode, PREF_MAP[? "dialog_add_node_view"], COLORS._main_icon);
|
2022-09-21 06:09:40 +02:00
|
|
|
if(b == 2)
|
2023-01-09 03:14:20 +01:00
|
|
|
PREF_MAP[? "dialog_add_node_view"] = !PREF_MAP[? "dialog_add_node_view"];
|
|
|
|
|
|
|
|
bx -= ui(32);
|
|
|
|
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
|
2023-02-14 11:40:24 +01:00
|
|
|
PREF_MAP[? "dialog_add_node_grouping"]? get_text("add_node_group_enabled", "Group enabled") : get_text("add_node_group_disabled", "Group disabled"),
|
|
|
|
THEME.view_group, PREF_MAP[? "dialog_add_node_grouping"], COLORS._main_icon);
|
2023-01-09 03:14:20 +01:00
|
|
|
if(b == 2)
|
|
|
|
PREF_MAP[? "dialog_add_node_grouping"] = !PREF_MAP[? "dialog_add_node_grouping"];
|
2023-02-14 11:40:24 +01:00
|
|
|
|
|
|
|
if(node_called != noone || junction_hovering != noone) {
|
|
|
|
var txt = node_show_connectable? get_text("add_node_show_connect", "Showing connectable") : get_text("add_node_show_all", "Showing all");
|
|
|
|
var cc = node_show_connectable? COLORS._main_accent : COLORS._main_icon;
|
|
|
|
bx -= ui(32);
|
|
|
|
var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER, txt, THEME.filter_type, node_show_connectable, cc);
|
|
|
|
if(b == 2)
|
|
|
|
node_show_connectable = !node_show_connectable;
|
|
|
|
}
|
2023-01-25 06:49:00 +01:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
//#region dec
|
|
|
|
// if(node_called) {
|
|
|
|
// var jx = 0;
|
|
|
|
// var jy = dialog_y + ui(26);
|
|
|
|
|
|
|
|
// if(node_called.connect_type == JUNCTION_CONNECT.input)
|
|
|
|
// jx = dialog_x;
|
|
|
|
// else
|
|
|
|
// jx = dialog_x + dialog_w;
|
|
|
|
// }
|
|
|
|
//#endregion
|