Pixel-Composer/objects/o_dialog_add_node/Draw_64.gml

41 lines
1.4 KiB
Plaintext
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description init
if !ready exit;
#region base UI
draw_sprite_stretched(s_dialog_bg, 0, dialog_x, dialog_y, dialog_w, dialog_h);
2022-11-03 11:44:49 +01:00
if(sFOCUS)
2022-01-13 05:24:03 +01:00
draw_sprite_stretched(s_dialog_active, 0, dialog_x, dialog_y, dialog_w, dialog_h);
#endregion
#region search
TEXTBOX_ACTIVE = 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
2022-11-03 11:44:49 +01:00
catagory_pane.active = sFOCUS;
catagory_pane.draw(dialog_x + ui(14), dialog_y + ui(52));
2022-01-13 05:24:03 +01:00
2022-11-03 11:44:49 +01:00
draw_sprite_stretched(s_ui_panel_bg, 0, dialog_x + ui(120), dialog_y + ui(52), dialog_w - ui(134), dialog_h - ui(66));
content_pane.active = sFOCUS;
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-03 11:44:49 +01:00
draw_sprite_stretched(s_ui_panel_bg, 0, dialog_x + ui(14), dialog_y + ui(52), dialog_w - ui(28), dialog_h - ui(66));
search_pane.active = sFOCUS;
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
2022-11-03 11:44:49 +01:00
tb_search.draw(dialog_x + ui(14), dialog_y + ui(14), dialog_w - ui(64), ui(32), search_string, mouse_ui);
var bx = dialog_x + dialog_w - ui(44);
var by = dialog_y + ui(16);
var b = buttonInstant(s_button_hide, bx, by, ui(28), ui(28), mouse_ui, sFOCUS, sHOVER,
2022-09-21 06:09:40 +02:00
ADD_NODE_MODE == 1? "List view" : "Grid view", s_add_node_view, ADD_NODE_MODE, c_ui_blue_grey);
if(b == 2)
ADD_NODE_MODE = !ADD_NODE_MODE;
2022-01-13 05:24:03 +01:00
#endregion