diff --git a/objects/o_dialog_add_node/Draw_64.gml b/objects/o_dialog_add_node/Draw_64.gml index 50c2be567..0a65c2ebc 100644 --- a/objects/o_dialog_add_node/Draw_64.gml +++ b/objects/o_dialog_add_node/Draw_64.gml @@ -58,7 +58,7 @@ if(DIALOG_SHOW_FOCUS) DIALOG_DRAW_FOCUS var bx = dialog_x + dialog_w - ui(44); var by = dialog_y + ui(16); - var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, view_tooltip, THEME.view_mode, PREFERENCES.dialog_add_node_view, COLORS._main_icon); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, view_tooltip, THEME.view_mode, PREFERENCES.dialog_add_node_view, COLORS._main_icon); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) mod_dec_mf0 PREFERENCES.dialog_add_node_view mod_dec_mf1 PREFERENCES.dialog_add_node_view mod_dec_mf2 2 mod_dec_mf3 2 mod_dec_mf4; if(key_mod_press(SHIFT) && mouse_wheel_down()) mod_inc_mf0 PREFERENCES.dialog_add_node_view mod_inc_mf1 PREFERENCES.dialog_add_node_view mod_inc_mf2 2 mod_inc_mf3; @@ -66,7 +66,7 @@ if(DIALOG_SHOW_FOCUS) DIALOG_DRAW_FOCUS if(b == 2) mod_inc_mf0 PREFERENCES.dialog_add_node_view mod_inc_mf1 PREFERENCES.dialog_add_node_view mod_inc_mf2 2 mod_inc_mf3; bx -= ui(32); - var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, group_tooltip, THEME.view_group, PREFERENCES.dialog_add_node_grouping, COLORS._main_icon); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, group_tooltip, THEME.view_group, PREFERENCES.dialog_add_node_grouping, COLORS._main_icon); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) mod_dec_mf0 PREFERENCES.dialog_add_node_grouping mod_dec_mf1 PREFERENCES.dialog_add_node_grouping mod_dec_mf2 3 mod_dec_mf3 3 mod_dec_mf4; if(key_mod_press(SHIFT) && mouse_wheel_down()) mod_inc_mf0 PREFERENCES.dialog_add_node_grouping mod_inc_mf1 PREFERENCES.dialog_add_node_grouping mod_inc_mf2 3 mod_inc_mf3; @@ -78,14 +78,14 @@ if(DIALOG_SHOW_FOCUS) DIALOG_DRAW_FOCUS 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, sHOVER, sFOCUS, txt, THEME.filter_type, node_show_connectable, cc); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.filter_type, node_show_connectable, cc); if(b == 2) node_show_connectable = !node_show_connectable; } if(search_string != "") { var txt = __txtx("add_node_highlight", "Hightlight Query"); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.add_node_search_high, PREFERENCES.dialog_add_node_search_high, COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.add_node_search_high, PREFERENCES.dialog_add_node_search_high, COLORS._main_icon) == 2) PREFERENCES.dialog_add_node_search_high = !PREFERENCES.dialog_add_node_search_high; } #endregion diff --git a/objects/o_dialog_color_selector/Draw_64.gml b/objects/o_dialog_color_selector/Draw_64.gml index 6a2df538b..ca1623a47 100644 --- a/objects/o_dialog_color_selector/Draw_64.gml +++ b/objects/o_dialog_color_selector/Draw_64.gml @@ -44,16 +44,16 @@ if !ready exit; var by = dialog_y + ui(12); var bs = ui(28); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) __initPalette(); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2) shellOpenExplorer($"{DIRECTORY}Palettes"); draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE; bx -= ui(32); #endregion @@ -78,5 +78,5 @@ if !ready exit; bx -= ui(48); b_cancel.register(); b_cancel.setFocusHover(sFOCUS, sHOVER); - b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide); + b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide_fill); #endregion \ No newline at end of file diff --git a/objects/o_dialog_file_name_action/Draw_64.gml b/objects/o_dialog_file_name_action/Draw_64.gml index ce5a6ae05..2cea26a6e 100644 --- a/objects/o_dialog_file_name_action/Draw_64.gml +++ b/objects/o_dialog_file_name_action/Draw_64.gml @@ -46,7 +46,7 @@ var icon = THEME.accept; var clr = COLORS._main_value_positive; - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { } @@ -56,7 +56,7 @@ var icon = THEME.cross; var clr = COLORS._main_value_negative; - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { instance_destroy(); } diff --git a/objects/o_dialog_file_name_collection/Draw_64.gml b/objects/o_dialog_file_name_collection/Draw_64.gml index ae5b8bbf4..15baccaa6 100644 --- a/objects/o_dialog_file_name_collection/Draw_64.gml +++ b/objects/o_dialog_file_name_collection/Draw_64.gml @@ -29,7 +29,7 @@ var bx = dialog_x + dialog_w - ui(8) - bw; var by = dialog_y + ui(24) - bh / 2; - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txt("Close"), THEME.cross_16, 0, COLORS._main_value_negative) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txt("Close"), THEME.cross_16, 0, COLORS._main_value_negative) == 2) instance_destroy(); bx -= bw + ui(4); @@ -59,7 +59,7 @@ instance_destroy(); } else { - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, icon, 0, clr) == 2) { if(meta.author_steam_id == 0) meta.author_steam_id = STEAM_USER_ID; @@ -107,7 +107,7 @@ bx -= bw + ui(4); var txt = __txtx("new_collection_meta_edit", "Edit metadata"); - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, THEME.arrow, meta_expand? 3 : 0) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, txt, THEME.arrow, meta_expand? 3 : 0) == 2) doExpand(); #endregion diff --git a/objects/o_dialog_gradient/Draw_64.gml b/objects/o_dialog_gradient/Draw_64.gml index 2954eb7ce..37cad3d48 100644 --- a/objects/o_dialog_gradient/Draw_64.gml +++ b/objects/o_dialog_gradient/Draw_64.gml @@ -49,7 +49,7 @@ if !ready exit; var by = dialog_y + ui(12); var bs = ui(28); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) { var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); dia.onModify = function (txt) { var gradStr = ""; @@ -66,11 +66,11 @@ if !ready exit; } bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) __initGradient(); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("graident_editor_open_folder", "Open gradient folder"), THEME.path_open_20) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("graident_editor_open_folder", "Open gradient folder"), THEME.path_open_20) == 2) { var _realpath = DIRECTORY + "Gradients"; shellOpenExplorer(_realpath) } @@ -87,7 +87,7 @@ if !ready exit; var bx = palette_x + palette_w - ui(44); var by = dialog_y + ui(12); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, __txt("Show on Selector"), THEME.display_palette, NODE_COLOR_SHOW_PALETTE, c_white) == 2) NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE; bx -= ui(32); #endregion @@ -98,7 +98,7 @@ if !ready exit; var bx = content_x + content_w - ui(50); var by = dialog_y + ui(16); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("gradient_editor_key_blend", "Key blending"), THEME.grad_blend) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("gradient_editor_key_blend", "Key blending"), THEME.grad_blend) == 2) { menuCall("gradient_window_blend_menu", [ menuItem(__txtx("gradient_editor_blend_hard", "Solid"), function() { gradient.type = 1; onApply(gradient); }), menuItem(__txtx("gradient_editor_blend_RGB", "RGB"), function() { gradient.type = 0; onApply(gradient); }), @@ -108,7 +108,7 @@ if !ready exit; } bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("gradient_editor_reverse", "Reverse"), THEME.reverse) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("gradient_editor_reverse", "Reverse"), THEME.reverse) == 2) { for( var i = 0, n = array_length(gradient.keys); i < n; i++ ) gradient.keys[i].time = 1 - gradient.keys[i].time; gradient.keys = array_reverse(gradient.keys); @@ -256,5 +256,5 @@ if !ready exit; bx -= ui(48); b_cancel.register(); b_cancel.setFocusHover(sFOCUS, sHOVER); - b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide); + b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide_fill); #endregion \ No newline at end of file diff --git a/objects/o_dialog_group_input_order/Create_0.gml b/objects/o_dialog_group_input_order/Create_0.gml index 5495668d4..67f753639 100644 --- a/objects/o_dialog_group_input_order/Create_0.gml +++ b/objects/o_dialog_group_input_order/Create_0.gml @@ -95,7 +95,7 @@ event_inherited(); if(dragging == disp) { draw_sprite_ui(THEME.hamburger_s, 0, hg / 2, _y + hg / 2,,,, COLORS._main_accent, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, 0, _y0, con_w, hg, COLORS._main_icon, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, 0, _y0, con_w, hg, COLORS._main_icon, 1); } _y += hg + padd; diff --git a/objects/o_dialog_group_input_order/Draw_64.gml b/objects/o_dialog_group_input_order/Draw_64.gml index 9d97b3d3c..24523df11 100644 --- a/objects/o_dialog_group_input_order/Draw_64.gml +++ b/objects/o_dialog_group_input_order/Draw_64.gml @@ -24,7 +24,7 @@ if !ready exit; if(type == CONNECT_TYPE.input) { var _txt = __txtx("dialog_group_order_add", "Add separator"); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, _txt, THEME.add_16, 1, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, _txt, THEME.add_16, 1, COLORS._main_value_positive) == 2) { array_push(node.attributes.input_display_list, [ "Separator", false ]); node.sortIO(); } diff --git a/objects/o_dialog_group_output_order/Create_0.gml b/objects/o_dialog_group_output_order/Create_0.gml index 0345b86eb..e3820bcaa 100644 --- a/objects/o_dialog_group_output_order/Create_0.gml +++ b/objects/o_dialog_group_output_order/Create_0.gml @@ -57,7 +57,7 @@ event_inherited(); if(dragging == disp) { draw_sprite_ui(THEME.hamburger_s, 0, hg / 2, _y + hg / 2,,,, COLORS._main_accent, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, 0, _y0, con_w, hg, COLORS._main_icon, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, 0, _y0, con_w, hg, COLORS._main_icon, 1); } _y += hg + padd; diff --git a/objects/o_dialog_image_array_edit/Draw_64.gml b/objects/o_dialog_image_array_edit/Draw_64.gml index 93f20d531..d34e9634d 100644 --- a/objects/o_dialog_image_array_edit/Draw_64.gml +++ b/objects/o_dialog_image_array_edit/Draw_64.gml @@ -27,7 +27,7 @@ if !target exit; var bx = dialog_x + dialog_w - ui(padding - 8) - bw; var by = dialog_y + ui(18); - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txt("Add") + "...", THEME.add,, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txt("Add") + "...", THEME.add,, COLORS._main_value_positive) == 2) { var path = get_open_filenames_compat("image|*.png;*.jpg", ""); key_release(); @@ -44,6 +44,6 @@ if !target exit; bx -= ui(36); - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txtx("array_edit_sort_name", "Sort by name"), THEME.text) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, mouse_ui, sHOVER, sFOCUS, __txtx("array_edit_sort_name", "Sort by name"), THEME.text) == 2) sortByName(); #endregion \ No newline at end of file diff --git a/objects/o_dialog_palette/Draw_64.gml b/objects/o_dialog_palette/Draw_64.gml index 75e228ff4..f612fd846 100644 --- a/objects/o_dialog_palette/Draw_64.gml +++ b/objects/o_dialog_palette/Draw_64.gml @@ -43,7 +43,7 @@ if palette == 0 exit; var by = dialog_y + ui(12); var bs = ui(28); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("add_preset", "Add to preset"), THEME.add_20) == 2) { var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); dia.onModify = function (txt) { var file = file_text_open_write(txt + ".hex"); @@ -63,11 +63,11 @@ if palette == 0 exit; } bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txt("Refresh"), THEME.refresh_20) == 2) __initPalette(); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, mouse_ui, sHOVER, sFOCUS, __txtx("color_selector_open_palette", "Open palette folder"), THEME.path_open_20) == 2) { var _realpath = DIRECTORY + "Palettes"; shellOpenExplorer(_realpath) } @@ -83,7 +83,7 @@ if palette == 0 exit; var bc = index_selecting[1] < 2? COLORS._main_icon : merge_color(COLORS._main_icon, COLORS._main_accent, 0.5); var _txt = index_selecting[1] < 2? __txtx("palette_editor_sort", "Sort palette") : __txtx("palette_editor_sort_selected", "Sort selected"); - var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, _txt, THEME.sort, 0, bc); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, _txt, THEME.sort, 0, bc); if(b) mouse_draggable = false; if(b == 2) { menuCall("palette_window_sort_menu", [ @@ -98,7 +98,7 @@ if palette == 0 exit; bx -= ui(32); var _txt = index_selecting[1] < 2? __txtx("palette_editor_reverse", "Reverse palette") : __txtx("palette_editor_reverse_selected", "Reverse selected"); - var b = buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, _txt, THEME.reverse, 0, bc); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, _txt, THEME.reverse, 0, bc); if(b) mouse_draggable = false; if(b == 2) { @@ -358,7 +358,7 @@ if palette == 0 exit; var by = pl_y - ui(2); if(array_length(palette) > 1) { - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, "", THEME.minus) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, "", THEME.minus) == 2) { array_delete(palette, index_selecting[0], index_selecting[1]); if(array_empty(palette)) palette = [ c_black ]; @@ -371,7 +371,7 @@ if palette == 0 exit; } bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, "", THEME.add) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, "", THEME.add) == 2) { palette[array_length(palette)] = c_black; index_selecting = [ array_length(palette), 1 ]; @@ -379,7 +379,7 @@ if palette == 0 exit; } bx = content_x + ui(18); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("palette_editor_load", "Load palette file") + " (.hex)", THEME.file) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, interactable && sFOCUS, __txtx("palette_editor_load", "Load palette file") + " (.hex)", THEME.file) == 2) { var path = get_open_filename_pxc("HEX palette|*.hex", ""); key_release(); @@ -409,5 +409,5 @@ if palette == 0 exit; bx -= ui(48); b_cancel.register(); b_cancel.setFocusHover(sFOCUS, sHOVER); - b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide); + b_cancel.draw(bx - ui(18), by - ui(18), ui(36), ui(36), mouse_ui, THEME.button_hide_fill); #endregion \ No newline at end of file diff --git a/objects/o_dialog_panel/Draw_64.gml b/objects/o_dialog_panel/Draw_64.gml index 79c8b4d42..a24bfde52 100644 --- a/objects/o_dialog_panel/Draw_64.gml +++ b/objects/o_dialog_panel/Draw_64.gml @@ -62,7 +62,7 @@ if(content.showHeader) { var _bs = ui(20); if(instanceof(content) != "Panel_Menu") - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, "", THEME.window_exit_icon) == 2) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, "", THEME.window_exit_icon) == 2) { DIALOG_POSTDRAW onDestroy(); instance_destroy(); @@ -77,7 +77,7 @@ if(content.showHeader) { _bx -= _bs; _b.setFocusHover(sFOCUS, sHOVER); - _b.draw(_bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], THEME.button_hide); + _b.draw(_bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], THEME.button_hide_fill); _bs -= ui(4); } } @@ -91,7 +91,7 @@ var ss = content.showHeader? ui(20) : ui(28); var sc = content.showHeader? 0.75 : 1; if(window == noone && instanceof(content) != "Panel_Menu") { - var b = buttonInstant(THEME.button_hide, bx, by, ss, ss, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, txt, THEME.pin, ind, cc, 1, sc); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ss, ss, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, txt, THEME.pin, ind, cc, 1, sc); if(b == 2) destroy_on_click_out = !destroy_on_click_out; } diff --git a/objects/o_dialog_patreon/Draw_64.gml b/objects/o_dialog_patreon/Draw_64.gml index 79a44e401..ae39776a7 100644 --- a/objects/o_dialog_patreon/Draw_64.gml +++ b/objects/o_dialog_patreon/Draw_64.gml @@ -12,7 +12,7 @@ if !ready exit; var _by = dialog_y + ui(8); var _bs = ui(20); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, "", THEME.window_exit_icon) == 2) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mouse_mx, mouse_my ], sHOVER, sFOCUS, "", THEME.window_exit_icon) == 2) { DIALOG_POSTDRAW onDestroy(); instance_destroy(); diff --git a/objects/o_dialog_preference/Create_0.gml b/objects/o_dialog_preference/Create_0.gml index 9f9f8505f..1edfafed9 100644 --- a/objects/o_dialog_preference/Create_0.gml +++ b/objects/o_dialog_preference/Create_0.gml @@ -4,7 +4,7 @@ event_inherited(); #region data dialog_w = min(WIN_W - ui(16), ui(1000)); dialog_h = min(WIN_H - ui(16), ui(700)); - page_width = ui(160); + page_width = ui(128); // title_height = 8; destroy_on_click_out = true; @@ -35,7 +35,6 @@ event_inherited(); sp_pref.resize( panel_width, panel_height); sp_hotkey.resize(panel_width, hotkey_height); - sp_colors.resize(panel_width, panel_height - ui(40)); } #endregion @@ -57,14 +56,14 @@ event_inherited(); var hh = 0; var yl = _y; - var hg = line_get_height(f_p0, 16); - var hs = line_get_height(f_p1, 8); + var hg = line_get_height(f_p1, 8); + var hs = line_get_height(f_p2, 8); for(var i = 0; i < array_length(page); i++) { - if(i == page_current) draw_set_text(f_p0b, fa_left, fa_center, COLORS._main_text_accent); - else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner); + if(i == page_current) draw_set_text(f_p1b, fa_left, fa_center, COLORS._main_text_accent); + else draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text_inner); - if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hg)) { + if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hg - 1)) { sp_page.hover_content = true; draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yl, ww, hg, CDEF.main_white, 1); @@ -82,7 +81,7 @@ event_inherited(); for( var j = 0, m = array_length(sections[i]); j < m; j++ ) { var sect = sections[i][j]; - draw_set_text(f_p1, fa_left, fa_center, section_current == sect[0]? COLORS._main_text : COLORS._main_text_sub); + draw_set_text(f_p2, fa_left, fa_center, section_current == sect[0]? COLORS._main_text : COLORS._main_text_sub); if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hs - 1)) { sp_page.hover_content = true; @@ -568,7 +567,12 @@ event_inherited(); #endregion #region theme + + ////- Themes + themes = []; + themeCurrent = noone; + var f = file_find_first(DIRECTORY + "Themes/*", fa_directory); while(f != "") { var _file = f; @@ -587,35 +591,142 @@ event_inherited(); } var _meta = json_load_struct(_metaPath); + _meta.file = _file; + var _item = new scrollItem(_meta.name, _meta.version >= VERSION? noone : THEME.circle, 0, COLORS._main_accent); - _item.data = _file; - + _item.data = _meta; + + if(PREFERENCES.theme == _file) themeCurrent = _meta; + if(_meta.version < VERSION) _item.tooltip = "Theme made for earlier version."; array_push(themes, _item); } file_find_close(); sb_theme = new scrollBox(themes, function(index) { - var thm = themes[index].data; - if(PREFERENCES.theme == thm) return; - - PREFERENCES.theme = thm; - PREF_SAVE(); - - loadGraphic(thm); - loadColor(thm); - loadFonts(); - }, false); + var dat = themes[index].data; + var thm = dat.file; + if(PREFERENCES.theme == thm) return; + + themeCurrent = dat; + PREFERENCES.theme = thm; + PREF_SAVE(); + + loadGraphic(thm); + loadColor(thm); + loadFonts(); + }, false); + sb_theme.font = f_p2; sb_theme.align = fa_left; - sp_colors = new scrollPane(panel_width, panel_height - ui(40), function(_y, _m, _r) { + tb_override = new textBox(TEXTBOX_INPUT.text, function(val) /*=>*/ { PREFERENCES.theme_override = val; loadColor(PREFERENCES.theme); PREF_SAVE(); }) + + sp_theme = new scrollPane(panel_width, panel_height - ui(40), function(_y, _m, _r) { draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); - var ww = sp_colors.surface_w; + + var _hover = sp_theme.hover; + var _focus = sp_theme.active; + var _rx = sp_theme.x; + var _ry = sp_theme.y; + + var ww = sp_theme.surface_w; + var hh = sp_theme.surface_h; + + var hh = ui(8); + _y += ui(8); + + var _h = ui(24); + if(buttonInstant(THEME.button_hide_fill, ww - _h, _y, _h, _h, _m, _hover, _focus, __txt("Reset colors"), THEME.refresh_16) == 2) { + var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/{PREFERENCES.theme_override}.json"; + if(file_exists_empty(path)) file_delete(path); + loadColor(PREFERENCES.theme); + } + + var _wdw = ui(128); + var _wpar = new widgetParam(ww - _h - ui(4) - _wdw, _y, _wdw, _h, 0, 0, _m, _rx, _ry) + .setFont(f_p3) + .setFocusHover(_focus, _hover); + + var thName = themeCurrent == noone? PREFERENCES.theme : themeCurrent.name; + draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(8), _y + _h / 2, __txt("Theme")); + sb_theme.drawParam(_wpar.setData(thName)); + _y += _h + ui(8); + hh += _h + ui(8); + + draw_set_text(f_p2, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(8), _y + _h / 2, __txt("Variant")); + tb_override.drawParam(_wpar.setY(_y).setData(PREFERENCES.theme_override)); + _y += _h + ui(8 + 4); + hh += _h + ui(8 + 4); + + var _mh = themeCurrent == noone? ui(16) : ui(8 + 4 + 20 * 4); + draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, 0, _y, ww, _mh, COLORS._main_icon_light); + + if(themeCurrent) { + var _yy = _y + ui(8); + draw_set_text(f_p3, fa_left, fa_top, COLORS._main_text_sub); + draw_text_add(ui(16), _yy, __txt("Name")); + + draw_set_text(f_p3, fa_right, fa_top, COLORS._main_text); + draw_text_add(ww - ui(16), _yy, themeCurrent.name); + + _yy += ui(20); + draw_set_text(f_p3, fa_left, fa_top, COLORS._main_text_sub); + draw_text_add(ui(16), _yy, __txt("Author")); + + draw_set_text(f_p3, fa_right, fa_top, COLORS._main_text); + draw_text_add(ww - ui(16), _yy, themeCurrent.author); + + _yy += ui(20); + draw_set_text(f_p3, fa_left, fa_top, COLORS._main_text_sub); + draw_text_add(ui(16), _yy, __txt("Version")); + + draw_set_text(f_p3, fa_right, fa_top, COLORS._main_text); + draw_text_add(ww - ui(16), _yy, themeCurrent.version); + + _yy += ui(20); + draw_set_text(f_p3, fa_left, fa_top, COLORS._main_text_sub); + draw_text_add(ui(16), _yy, __txt("Dependency")); + + var _d = struct_try_get(themeCurrent, "dependency", "none"); + draw_set_text(f_p3, fa_right, fa_top, COLORS._main_text); + draw_text_add(ww - ui(16), _yy, _d); + } + + _y += _mh + ui(8 + 4); + hh += _mh + ui(8 + 4); + + return hh; + }); + + ////- Colors + + color_selector_key = noone; + + color_selector_edit = noone; + tb_color_key_edit = new textBox(TEXTBOX_INPUT.text, function(t) /*=>*/ { + if(color_selector_edit == noone) return; + + var _v = _loadColorStringParse(t); + COLORS_KEYS.define[$ color_selector_edit] = _v; + COLORS[$ color_selector_edit] = _loadColorString(_v); + overrideColor(color_selector_edit, _v); + + color_selector_edit = noone; + }).setFont(f_p3); + + sp_theme_colors = new scrollPane(panel_width, panel_height - ui(40), function(_y, _m, _r) { + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); + var ww = sp_theme_colors.surface_w; var hh = 0; - var x1 = sp_colors.surface_w; + var _hover = sp_theme_colors.hover; + var _focus = sp_theme_colors.active; + + var x1 = sp_theme_colors.surface_w; var yy = _y + ui(8); - var padx = ui(8); + var padx = ui(0); var pady = ui(6); var th = line_get_height(font); var ind = 0; @@ -623,8 +734,8 @@ event_inherited(); var cp = ui(0) var cw = ui(100); var ch = th - cp * 2; - var cx = x1 - cw - padx * 2 - ui(8); - var category = ""; + var cx = x1 - cw - padx - ui(24 + 8); + var category = "", cat; var group_labels = []; var sectH = ui(24); @@ -633,6 +744,72 @@ event_inherited(); var _search_text = string_lower(search_text); + for( var i = 0, n = array_length(global.palette_keys); i < n; i++ ) { + var key = global.palette_keys[i]; + var val = CDEF[$ key]; + + if(_search_text != "" && string_pos(_search_text, string_lower(key)) == 0) continue; + + var cat = "global"; + + if(cat != category) { + category = cat; + + var _sect = string_title(category); + var _coll = struct_try_get(collapsed, cat, 0); + + array_push(sect, [ _sect, sp_theme_colors, hh + ui(12) ]); + array_push(group_labels, { y: yy, text: _sect, key: cat }); + + if(yy >= 0 && section_current == "") section_current = psect; + psect = _sect; + + yy += sectH + ui(!_coll * 4 + 4); + hh += sectH + ui(!_coll * 4 + 4); + ind = 0; + } + + if(struct_try_get(collapsed, cat, 0)) continue; + + if(ind % 2) draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, padx, yy - pady, ww - padx * 2, th + pady * 2, COLORS.dialog_preference_prop_bg, .75); + + var keyStr = string_title(key); + + draw_set_text(font, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(32), yy + th / 2, keyStr); + + var b = buttonInstant(THEME.button_def, cx, yy + cp, cw, ch, _m, _hover, _focus); + draw_sprite_stretched_ext(THEME.palette_mask, 1, cx + ui(2), yy + ui(2), cw - ui(4), ch - ui(4), val, 1); + + if(b) sp_theme_colors.hover_content = true; + if(b == 2) { + color_selector_key = key; + + var clrSelect = dialogCall(o_dialog_color_selector) + .setDefault(val) + .setApply(function(color) /*=>*/ { CDEF[$ color_selector_key] = color; overrideColor(color_selector_key, color); refreshThemePalette(); }); + + addChildren(clrSelect); + } + + var _bs = ui(24); + var _bx = x1 - padx - ui(4) - _bs; + var _by = yy + th / 2 - _bs / 2; + + if(struct_has(COLORS_OVERRIDE, key)) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, _hover, _focus, __txt("Reset"), THEME.refresh_16) == 2) { + CDEF[$ key] = color_from_rgb(COLORS_DEF.colors[$ key]); + overrideColorRemove(key); + refreshThemePalette(); + } + } else + draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); + + yy += th + pady * 2; + hh += th + pady * 2; + ind++; + } + for( var i = 0, n = array_length(COLOR_KEYS); i < n; i++ ) { var key = COLOR_KEYS[i]; var val = COLORS[$ key]; @@ -648,7 +825,7 @@ event_inherited(); var _sect = string_title(category); var _coll = struct_try_get(collapsed, cat, 0); - array_push(sect, [ _sect, sp_colors, hh + ui(12) ]); + array_push(sect, [ _sect, sp_theme_colors, hh + ui(12) ]); array_push(group_labels, { y: yy, text: _sect, key: cat }); if(yy >= 0 && section_current == "") section_current = psect; @@ -667,29 +844,80 @@ event_inherited(); keyStr = string_replace(keyStr, cat + " ", ""); keyStr = string_title(keyStr); - draw_set_text(font, fa_left, fa_center, COLORS._main_text); - draw_text_add(ui(32), yy + th / 2, keyStr); + var cy = yy + th / 2; - var b = buttonInstant(THEME.button_def, cx, yy + cp, cw, ch, _m, sHOVER, sFOCUS && sp_colors.hover); + draw_set_text(font, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(32), cy, keyStr); + + var _dx1 = cx - ui(4); + var _dx0 = _dx1 - ui(16); + var _dy0 = cy - ui(12); + var _dy1 = cy + ui(12); + + if(struct_has(COLORS_KEYS.define, key)) { + var _def_key = COLORS_KEYS.define[$ key]; + + draw_set_text(f_p3, fa_right, fa_center, COLORS._main_text_sub); + draw_text_add(cx - ui(8), cy, _def_key); + + _dx0 = _dx1 - ui(8) - string_width(_def_key); + } + + if(color_selector_edit == key) { + var _tbw = ui(128) + var _tbh = ui(24) + tb_color_key_edit.setFocusHover(_focus, _hover); + tb_color_key_edit.draw(_dx1 - _tbw, cy - _tbh / 2, _tbw, _tbh, COLORS_KEYS.define[$ key], _m) + + } else { + if(sHOVER && point_in_rectangle(_m[0], _m[1], _dx0, _dy0, _dx1, _dy1)) { + draw_sprite_stretched_ext(THEME.button_hide, 1, _dx0, _dy0, _dx1 - _dx0, _dy1 - _dy0); + if(mouse_press(mb_left, _focus)) { + color_selector_edit = key; + tb_color_key_edit.activate(COLORS_KEYS.define[$ key]); + } + } + } + + var b = buttonInstant(THEME.button_def, cx, yy + cp, cw, ch, _m, _hover, _focus); draw_sprite_stretched_ext(THEME.palette_mask, 1, cx + ui(2), yy + ui(2), cw - ui(4), ch - ui(4), val, 1); - if(b) sp_colors.hover_content = true; + if(b) sp_theme_colors.hover_content = true; if(b == 2) { color_selector_key = key; var clrSelect = dialogCall(o_dialog_color_selector) .setDefault(val) - .setApply(function(color) /*=>*/ { COLORS[$ color_selector_key] = color; overrideColor(color_selector_key); }); + .setApply(function(color) /*=>*/ { + COLORS_KEYS.define[$ color_selector_key] = color; + COLORS[$ color_selector_key] = color; + overrideColor(color_selector_key, color); + }); addChildren(clrSelect); } + var _bs = ui(24); + var _bx = x1 - padx - ui(4) - _bs; + var _by = cy - _bs / 2; + + if(struct_has(COLORS_OVERRIDE, key)) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, _hover, _focus, __txt("Reset"), THEME.refresh_16) == 2) { + var _v = COLORS_DEF.define[$ key]; + + COLORS_KEYS.define[$ key] = _v; + COLORS[$ key] = _loadColorString(_v); + overrideColorRemove(key); + } + } else + draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); + yy += th + pady * 2; hh += th + pady * 2; ind++; } - #region section label + #region ------------ section label ------------ var len = array_length(group_labels); if(len && group_labels[0].y < 0) { gpu_set_blendmode(bm_subtract); @@ -707,13 +935,13 @@ event_inherited(); var _coll = struct_try_get(collapsed, _key, 0); var _yy = max(lb.y, i == len - 1? ui(8) : min(ui(8), group_labels[i + 1].y - ui(32))); - var _hv = sHOVER && point_in_rectangle(_m[0], _m[1], 0, _yy, ww, _yy + sectH); + var _hv = _hover && point_in_rectangle(_m[0], _m[1], 0, _yy, ww, _yy + sectH); var _tc = CDEF.main_ltgrey; BLEND_OVERRIDE draw_sprite_stretched_ext(THEME.s_box_r5_clr, 0, padx, _yy, ww - padx * 2, sectH, _hv? COLORS.panel_inspector_group_hover : COLORS.panel_inspector_group_bg, 1); - if(_hv && sFOCUS) { + if(_hv && _focus) { if(DOUBLE_CLICK) { _cAll = _coll? -1 : 1; @@ -740,13 +968,154 @@ event_inherited(); return hh + ui(16); }); - function overrideColor(key) { - var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/override.json"; + function overrideColor(key, val) { + var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/{PREFERENCES.theme_override}.json"; var json = file_exists_empty(path)? json_load_struct(path) : {}; - json[$ key] = COLORS[$ key]; + json[$ key] = val; + COLORS_OVERRIDE[$ key] = val; + json_save_struct(path, json, true); } + + function overrideColorRemove(key) { + var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/{PREFERENCES.theme_override}.json"; + var json = file_exists_empty(path)? json_load_struct(path) : {}; + + struct_remove(json, key); + struct_remove(COLORS_OVERRIDE, key); + + json_save_struct(path, json, true); + } + + ////- Sprites + + sprKeys = variable_struct_get_names(THEME); + array_sort(sprKeys, true); + + sp_theme_sprites = new scrollPane(panel_width, panel_height - ui(40), function(_y, _m, _r) { + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); + + var _hover = sp_theme_sprites.hover; + var _focus = sp_theme_sprites.active; + var _rx = sp_theme_sprites.x; + var _ry = sp_theme_sprites.y; + + var ww = sp_theme_sprites.surface_w; + var hh = sp_theme_sprites.surface_h; + + var _h = ui(8); + _y += ui(8); + var hg = ui(24); + var ind = 0; + var padx = ui(0); + var pady = ui(4); + + for( var i = 0, n = array_length(sprKeys); i < n; i++ ) { + var _key = sprKeys[i]; + var _spr = THEME[$ _key]; + + var yc = _y + hg / 2; + if(ind % 2) draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, padx, _y - pady, ww - padx * 2, hg + pady * 2, COLORS.dialog_preference_prop_bg, .75); + + if(_y > -hg && _y < hh) { + draw_set_text(font, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(32), yc, _key); + + if(sprite_exists(_spr)) { + var _sw = sprite_get_width(_spr); + var _sh = sprite_get_height(_spr); + + var _ss = min(hg / _sh, ui(128) / _sw); + + var _ox = (sprite_get_xoffset(_spr) - _sw / 2) * _ss; + var _oy = (sprite_get_yoffset(_spr) - _sh / 2) * _ss; + + var _sx = ww / 2 + _ox; + var _sy = yc + _oy; + + draw_sprite_ext(_spr, 0, _sx, _sy, _ss, _ss); + + draw_set_text(font, fa_left, fa_center, COLORS._main_text_sub); + draw_text_add(ww / 2 + ui(96), yc, $"{_sw}x{_sh} [{sprite_get_number(_spr)}]"); + } + } + + ind++; + _y += hg + pady * 2; + _h += hg + pady * 2; + } + + return _h; + }); + + ////- Fonts + + fontKeys = variable_struct_get_names(FONT_LIST); + array_sort(fontKeys, true); + + array_push_to_back(fontKeys, "code"); + array_push_to_back(fontKeys, "f_sdf"); + array_push_to_back(fontKeys, "f_sdf_medium"); + + sp_theme_fonts = new scrollPane(panel_width, panel_height - ui(40), function(_y, _m, _r) { + draw_clear_alpha(COLORS.panel_bg_clear_inner, 1); + + var _hover = sp_theme_fonts.hover; + var _focus = sp_theme_fonts.active; + var _rx = sp_theme_fonts.x; + var _ry = sp_theme_fonts.y; + + var ww = sp_theme_fonts.surface_w; + var hh = sp_theme_fonts.surface_h; + + var _h = ui(8); + _y += ui(8); + var hg = ui(24); + var ind = 0; + var padx = ui(0); + var pady = ui(4); + + for( var i = 0, n = array_length(fontKeys); i < n; i++ ) { + var _key = fontKeys[i]; + var _fnt = FONT_LIST[$ _key]; + var _font = _fnt.font; + + var hgg = font_exists(_font)? line_get_height(_font) : hg; + + var yc = _y + hgg / 2; + if(ind % 2) draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, padx, _y - pady, ww - padx * 2, hgg + pady * 2, COLORS.dialog_preference_prop_bg, .75); + + if(_y > -hgg && _y < hh) { + draw_set_text(font, fa_left, fa_center, COLORS._main_text); + draw_text_add(ui(32), yc, _key); + + if(font_exists(_font)) { + draw_set_text(_font, fa_right, fa_center, COLORS._main_text); + draw_text_add(ww - ui(16), yc, $"Pixel Composer"); + } + } + + ind++; + _y += hgg + pady * 2; + _h += hgg + pady * 2; + } + + return _h; + }); + + ////- Resources tab + + theme_page = 0; + theme_page_name = [ + $"Colors [{array_length(global.palette_keys) + array_length(COLOR_KEYS)}]", + $"Sprites [{array_length(sprKeys)}]", + $"Fonts [{array_length(fontKeys)}]", + ]; + tab_resources = new buttonGroup(theme_page_name, function(i) /*=>*/ { theme_page = i }) + .setButton([ THEME.button_hide_left, THEME.button_hide_middle, THEME.button_hide_right ]) + .setFont(f_p2, COLORS._main_text_sub); + #endregion #region hotkey @@ -864,12 +1233,12 @@ event_inherited(); var cc = c_white; if(hk_editing == key) { - // draw_sprite_stretched_ext(THEME.ui_panel, 1, bx, by, bw, bh, COLORS._main_accent); + draw_sprite_stretched_ext(THEME.ui_panel, 1, bx, by, bw, bh, COLORS._main_accent); cc = COLORS._main_text_accent; } else { - if(_hov && point_in_rectangle(_m[0], _m[1], bx, by, bx + bw, by + bh)) { - // draw_sprite_stretched_ext(THEME.ui_panel, 1, bx, by, bw, bh, CDEF.main_ltgrey); + if(_hov && point_in_rectangle(_m[0], _m[1], _ww / 2, by, bx + bw, by + bh)) { + draw_sprite_stretched_ext(THEME.ui_panel, 1, bx, by, bw, bh, CDEF.main_ltgrey); sp_hotkey.hover_content = true; cc = CDEF.main_white; @@ -891,7 +1260,7 @@ event_inherited(); modified = true; var bx = _ww - ui(32); var by = _yy + th / 2 - ui(12); - var b = buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, _hov, sFOCUS, __txt("Reset"), THEME.refresh_16); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(24), ui(24), _m, _hov, sFOCUS, __txt("Reset"), THEME.refresh_16); if(b) sp_hotkey.hover_content = true; if(b == 2) { @@ -1024,7 +1393,7 @@ event_inherited(); if(isEqual(data, _defVal)) draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); else { - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, sHOVER, sFOCUS && sp_pref.hover, __txt("Reset"), THEME.refresh_16) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, sHOVER, sFOCUS && sp_pref.hover, __txt("Reset"), THEME.refresh_16) == 2) _pref.onEdit(_defVal); } } diff --git a/objects/o_dialog_preference/Draw_64.gml b/objects/o_dialog_preference/Draw_64.gml index ffec6bb83..54c1aef74 100644 --- a/objects/o_dialog_preference/Draw_64.gml +++ b/objects/o_dialog_preference/Draw_64.gml @@ -10,7 +10,7 @@ if !ready exit; var bx = dialog_x + ui(24); var by = dialog_y + ui(18); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, destroy_on_click_out? __txt("Pin") : __txt("Unpin"), + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, destroy_on_click_out? __txt("Pin") : __txt("Unpin"), THEME.pin, !destroy_on_click_out, destroy_on_click_out? COLORS._main_icon : COLORS._main_icon_light) == 2) destroy_on_click_out = !destroy_on_click_out; @@ -67,29 +67,30 @@ if !ready exit; sp_pref.draw(px, py); } else if(page_current == 3) { - var _w = ui(200); - var _h = ui(32); + var _sp_x = ui(296); + var _sp_y = ui(28); - var _x = dialog_x + dialog_w - ui(8); - var bx = _x - ui(48); - var _txt = __txtx("pref_reset_color", "Reset colors"); - var b = buttonInstant(THEME.button_hide, bx, py, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, _txt, THEME.refresh_icon); - if(b == 2) { - var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/override.json"; - if(file_exists_empty(path)) file_delete(path); - loadColor(PREFERENCES.theme); + var x1 = px + _sp_x - ui(8); + sp_theme.verify(_sp_x - ui(8), panel_height); + sp_theme.setFocusHover(sFOCUS, sHOVER); + sp_theme.draw(px, py); + + var _res_w = panel_width - _sp_x; + + tab_resources.setFocusHover(sFOCUS, sHOVER); + tab_resources.draw(px + _sp_x + ui(32), py, _res_w - ui(64), ui(24), theme_page); + + var sp = sp_theme_colors; + + switch(theme_page) { + case 0 : sp = sp_theme_colors; break; + case 1 : sp = sp_theme_sprites; break; + case 2 : sp = sp_theme_fonts; break; } - var x1 = dialog_x + ui(padding) + page_width; - var x2 = _x - ui(32); - - draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text); - draw_text(x1 + ui(8), py + _h / 2, __txt("Theme")); - sb_theme.setFocusHover(sFOCUS, sHOVER); - sb_theme.draw(x2 - ui(24) - _w, py, _w, _h, PREFERENCES.theme); - - sp_colors.setFocusHover(sFOCUS, sHOVER); - sp_colors.draw(px, py + ui(40)); + sp.verify(_res_w, panel_height - _sp_y); + sp.setFocusHover(sFOCUS, sHOVER); + sp.draw(px + _sp_x, py + _sp_y); } else if(page_current == 4) { if(mouse_press(mb_left, sFOCUS)) diff --git a/objects/o_dialog_preset/Draw_64.gml b/objects/o_dialog_preset/Draw_64.gml index b2c564d53..3eafb771d 100644 --- a/objects/o_dialog_preset/Draw_64.gml +++ b/objects/o_dialog_preset/Draw_64.gml @@ -22,7 +22,7 @@ if !ready exit; var bx = dialog_x + dialog_w - ui(32 + 16); var by = dialog_y + ui(16); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, __txtx("preset_new", "New preset"), THEME.add, 1) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, __txtx("preset_new", "New preset"), THEME.add, 1) == 2) { adding = !adding; if(adding) tb_add.activate(); } diff --git a/objects/o_dialog_scrollbox_horizontal/Draw_64.gml b/objects/o_dialog_scrollbox_horizontal/Draw_64.gml index fdb82a6c6..95cf92fcd 100644 --- a/objects/o_dialog_scrollbox_horizontal/Draw_64.gml +++ b/objects/o_dialog_scrollbox_horizontal/Draw_64.gml @@ -21,7 +21,7 @@ draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h); if(search_string == "") - if(buttonInstant(THEME.button_hide, dialog_x + dialog_w - ui(8) - ui(24), dialog_y + ui(8), ui(24), ui(24), mouse_ui, sHOVER, sFOCUS, "", THEME.scrollbox_direction, horizon) == 2) { + if(buttonInstant(THEME.button_hide_fill, dialog_x + dialog_w - ui(8) - ui(24), dialog_y + ui(8), ui(24), ui(24), mouse_ui, sHOVER, sFOCUS, "", THEME.scrollbox_direction, horizon) == 2) { horizon = !horizon; setSize(); } diff --git a/objects/o_dialog_splash/Draw_64.gml b/objects/o_dialog_splash/Draw_64.gml index 6e29183ad..533673e64 100644 --- a/objects/o_dialog_splash/Draw_64.gml +++ b/objects/o_dialog_splash/Draw_64.gml @@ -52,20 +52,20 @@ if !ready exit; var bx = x1 - ui(28); var by = y0 - ui(28 + 4); var txt = __txtx("splash_clear_recent", "Clear recent files"); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.icon_delete,, COLORS._main_value_negative) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.icon_delete,, COLORS._main_value_negative) == 2) { ds_list_clear(RECENT_FILES); RECENT_SAVE(); } // bx -= ui(28 + 4); // txt = recent_thumbnail? __txtx("splash_hide_thumbnail", "Hide thumbnail") : __txtx("splash_show_thumbnail", "Show thumbnail"); - // if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.splash_thumbnail, recent_thumbnail) == 2) { + // if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.splash_thumbnail, recent_thumbnail) == 2) { // recent_thumbnail = !recent_thumbnail; // } bx -= ui(28 + 4); txt = __txtx("splash_open_autosave", "Open autosave folder"); - if(buttonInstant(THEME.button_hide, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.save_auto, 0) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(28), ui(28), mouse_ui, sHOVER, sFOCUS, txt, THEME.save_auto, 0) == 2) { shellOpenExplorer(DIRECTORY + "autosave"); } diff --git a/scripts/__panel_linear_setting/__panel_linear_setting.gml b/scripts/__panel_linear_setting/__panel_linear_setting.gml index e0267492a..42cb23aea 100644 --- a/scripts/__panel_linear_setting/__panel_linear_setting.gml +++ b/scripts/__panel_linear_setting/__panel_linear_setting.gml @@ -211,7 +211,7 @@ function Panel_Linear_Setting() : PanelContent() constructor { if(isEqual(_data, _defVal)) draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); else { - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, __txt("Reset"), THEME.refresh_16) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, __txt("Reset"), THEME.refresh_16) == 2) _prop.onEdit(_defVal); } } diff --git a/scripts/__tiler_rule/__tiler_rule.gml b/scripts/__tiler_rule/__tiler_rule.gml index c0869c8bf..ed1d48369 100644 --- a/scripts/__tiler_rule/__tiler_rule.gml +++ b/scripts/__tiler_rule/__tiler_rule.gml @@ -167,7 +167,7 @@ function Tileset_Rule(_tileset) : Inspector_Custom_Renderer(noone, noone) constr var by = _yy; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "New rule", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "New rule", THEME.add_16, 0, COLORS._main_value_positive) == 2) { var _new_rl = new tiler_rule(); _new_rl.name = $"rule {array_length(ruleTiles)}" _new_rl.open = true; @@ -224,7 +224,7 @@ function Tileset_Rule(_tileset) : Inspector_Custom_Renderer(noone, noone) constr var bs = ui(24); var bx = _w - bs - ui(4); var by = _yy + _hg / 2 - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del = i; } diff --git a/scripts/areaBox/areaBox.gml b/scripts/areaBox/areaBox.gml index 2b39769bf..dd149ca33 100644 --- a/scripts/areaBox/areaBox.gml +++ b/scripts/areaBox/areaBox.gml @@ -210,7 +210,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { var _bx = _x + _w - _bs; var _by = _y + _h / 2 - _bs / 2; - var b = buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, hover, active, tooltip, THEME.inspector_area_type, mode); + var b = buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, hover, active, tooltip, THEME.inspector_area_type, mode); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) mode = setMode(_data, (mode - 1 + 3) % 3); if(key_mod_press(SHIFT) && mouse_wheel_down()) mode = setMode(_data, (mode + 1) % 3); @@ -221,7 +221,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { var _by = _y + _h + ui(4) + _h / 2 - _bs / 2; var _btxt = __txtx("widget_area_fill_surface", "Fill surface"); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, hover, active, _btxt, THEME.fill, 0) == 2) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, hover, active, _btxt, THEME.fill, 0) == 2) { var cnvt = unit != noone && unit.mode == VALUE_UNIT.reference; switch(mode) { @@ -256,7 +256,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { var _bx = _x; var _by = _y + _h / 2 - _bs / 2; - if(useShape && !is_array(_bind) && buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, _bhov, _bact,, THEME.inspector_area, _bind) == 2) { + if(useShape && !is_array(_bind) && buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, _bhov, _bact,, THEME.inspector_area, _bind) == 2) { var val = (array_safe_get_fast(_data, 4) + 1) % 2; onModify(val, 4); } @@ -266,7 +266,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor { var _btxt = __txt("Link values"); var _bby = useShape? _by + _h + ui(4) : _y + h / 2 - _bs / 2; - if(buttonInstant(THEME.button_hide, _bx, _bby, _bs, _bs, _m, hover, active, _btxt, THEME.value_link, link_value, cc) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _bby, _bs, _bs, _m, hover, active, _btxt, THEME.value_link, link_value, cc) == 2) link_value = !link_value; } diff --git a/scripts/array_functions/array_functions.gml b/scripts/array_functions/array_functions.gml index 8b0c3e336..6a051ae3d 100644 --- a/scripts/array_functions/array_functions.gml +++ b/scripts/array_functions/array_functions.gml @@ -371,6 +371,13 @@ function array_insert_before(arr, before, values) { array_insert(arr, _ind + i, values[i]); } +function array_push_to_back(arr, value) { + if(!array_exists(arr, value)) return; + + array_remove(arr, value); + array_push(arr, value); +} + #macro array_equals array_equals_overwrite #macro __array_equals array_equals diff --git a/scripts/buttonColor/buttonColor.gml b/scripts/buttonColor/buttonColor.gml index 3c70b4d00..3237b06d7 100644 --- a/scripts/buttonColor/buttonColor.gml +++ b/scripts/buttonColor/buttonColor.gml @@ -81,7 +81,7 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { b_picker.setFocusHover(active && !instance_exists(o_dialog_color_quick_pick), hover); - b_picker.draw(bx, _y + _h / 2 - _bs / 2, ui(32), _bs, _m, THEME.button_hide); + b_picker.draw(bx, _y + _h / 2 - _bs / 2, ui(32), _bs, _m, THEME.button_hide_fill); b_picker.icon_blend = c_white; b_picker.icon_index = 0; if(instance_exists(o_dialog_color_selector) && o_dialog_color_selector.selector.dropper_active && o_dialog_color_selector.drop_target != noone) { @@ -97,7 +97,7 @@ function buttonColor(_onApply, dialog = noone) : widget() constructor { _cw -= ui(32 + 4); b_quick_pick.setFocusHover(active, hover); - b_quick_pick.draw(bx, _y + _h / 2 - _bs / 2, ui(32), _bs, _m, THEME.button_hide); + b_quick_pick.draw(bx, _y + _h / 2 - _bs / 2, ui(32), _bs, _m, THEME.button_hide_fill); } _cw -= ui(8); diff --git a/scripts/buttonGradient/buttonGradient.gml b/scripts/buttonGradient/buttonGradient.gml index 7bacc7343..98fc7bc61 100644 --- a/scripts/buttonGradient/buttonGradient.gml +++ b/scripts/buttonGradient/buttonGradient.gml @@ -59,7 +59,7 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor { if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { 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_fill); _w -= _bs + ui(8); } diff --git a/scripts/buttonGroup/buttonGroup.gml b/scripts/buttonGroup/buttonGroup.gml index 734a8c87b..0697d6395 100644 --- a/scripts/buttonGroup/buttonGroup.gml +++ b/scripts/buttonGroup/buttonGroup.gml @@ -55,7 +55,7 @@ function buttonGroup(_data, _onClick) : widget() constructor { return draw(params.x, params.y, params.w, params.h, params.data, params.m, params.rx, params.ry); } - static draw = function(_x, _y, _w, _h, _selecting, _m, _rx = 0, _ry = 0) { + static draw = function(_x, _y, _w, _h, _selecting, _m = mouse_ui, _rx = 0, _ry = 0) { x = _x; y = _y; w = _w; diff --git a/scripts/buttonPalette/buttonPalette.gml b/scripts/buttonPalette/buttonPalette.gml index 0d02b3fbb..94f34459a 100644 --- a/scripts/buttonPalette/buttonPalette.gml +++ b/scripts/buttonPalette/buttonPalette.gml @@ -54,7 +54,7 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor { if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { 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_fill); _w -= _bs + ui(8); } diff --git a/scripts/color_loader/color_loader.gml b/scripts/color_loader/color_loader.gml index 5e7ddecb0..c0d00b3e4 100644 --- a/scripts/color_loader/color_loader.gml +++ b/scripts/color_loader/color_loader.gml @@ -1,35 +1,109 @@ #region colors - globalvar CDEF, COLORS, THEME_VALUE; + globalvar THEME_VALUE; + globalvar CDEF, COLORS, COLORS_KEYS; + globalvar COLORS_DEF, COLORS_OVERRIDE; - CDEF = new ThemeColorDef(); - COLORS = new ThemeColor(); - THEME_VALUE = new ThemeValue(); + CDEF = new ThemeColorDef(); + COLORS = new ThemeColor(); + THEME_VALUE = new ThemeValue(); + COLORS_KEYS = {}; + COLORS_OVERRIDE = {}; + COLORS_DEF = {}; + + global.palette_keys = [ + "main_dkblack", + "main_mdblack", + "main_black", + "main_dkgrey", + "main_dark", + "main_grey", + "main_ltgrey", + "main_mdwhite", + "main_white", + "main_bg", + + "blue", + "cyan", + "yellow", + "orange", + "red", + "pink", + "purple", + "lime", + "pgreen", + "pblue", + + "black", + "dkgrey", + "smoke", + "white", + ]; #endregion function loadColor(theme = "default") { - CDEF = new ThemeColorDef(); - COLORS = new ThemeColor(); - THEME_VALUE = new ThemeValue(); + CDEF = new ThemeColorDef(); + COLORS = new ThemeColor(); + THEME_VALUE = new ThemeValue(); + COLORS_KEYS = {}; + COLORS_OVERRIDE = {}; + COLORS_DEF = { + colors: new ThemeColorDef(), + define: new ThemeColor(), + }; _loadColor(theme); } +function _loadColorStringParse(str) { + str = string_trim(str); + + if(string_starts_with(str, "[") && string_ends_with(str, "]")) { + str = string_trim(str, ["[", "]"]); + var sp = string_splice(str, ","); + + if(array_length(sp) == 3) { + sp[0] = string_trim(sp[0]); + sp[1] = string_trim(sp[1]); + sp[2] = toNumber(sp[2]); + return sp; + } + } + + return str; +} + +function _loadColorString(str) { + if(!is_array(str)) return struct_has(CDEF, str)? CDEF[$ str] : color_from_rgb(str); + if(array_length(str) != 3) return 0; + + var c0 = struct_try_get(CDEF, str[0], 0); + var c1 = struct_try_get(CDEF, str[1], 0); + var m = toNumber(str[2]); + return merge_color(c0, c1, m); +} + function _loadColor(theme = "default", replace = false) { var t = get_timer(); var dirr = DIRECTORY + "Themes/" + theme; - var path = dirr + "/values.json"; - var pathO = dirr + "/override.json"; + var path = $"{dirr}/values.json"; + var pathO = $"{dirr}/{PREFERENCES.theme_override}.json"; COLOR_KEYS = variable_struct_get_names(COLORS); array_sort(COLOR_KEYS, true); - if(theme == "default" && !file_exists_empty(pathO)) return; + if(theme == "default" && !file_exists_empty(pathO)) { + COLORS_KEYS = json_load_struct(path); + return; + } + if(!file_exists_empty(path)) { noti_status($"Colors not defined at {path}, rollback to default color."); return; } var clrs = json_load_struct(path); if(!struct_has(clrs, "values")) { print("Load color error"); return; } + COLORS_KEYS = clrs; + ////- Value (parameters) var valkeys = variable_struct_get_names(clrs.values); @@ -38,37 +112,80 @@ function _loadColor(theme = "default", replace = false) { ////- Colors - var defkeys = variable_struct_get_names(clrs.define); var clrkeys = variable_struct_get_names(clrs.colors); + var defkeys = variable_struct_get_names(clrs.define); var arrkeys = variable_struct_get_names(clrs.array); var override = file_exists_empty(pathO)? json_load_struct(pathO) : {}; + COLORS_OVERRIDE = override; for( var i = 0, n = array_length(clrkeys); i < n; i++ ) { var key = clrkeys[i]; - var str = struct_has(override, key)? override[$ key] : clrs.colors[$ key]; + var str = clrs.colors[$ key]; + + COLORS_DEF.colors[$ key] = str; + + if(struct_has(override, key)) { + str = override[$ key]; + COLORS_KEYS.colors[$ key] = str; + } CDEF[$ key] = color_from_rgb(str); } for( var i = 0, n = array_length(defkeys); i < n; i++ ) { var key = defkeys[i]; - var def = struct_has(override, key)? override[$ key] : clrs.define[$ key]; var c = c_white; - - if(is_array(def)) c = merge_color(CDEF[$ def[0]], CDEF[$ def[1]], def[2]); - else c = struct_has(CDEF, def)? CDEF[$ def] : color_from_rgb(def); + var def = clrs.define[$ key]; - COLORS[$ key] = c; + COLORS_DEF.define[$ key] = def; + + if(struct_has(override, key)) { + def = override[$ key]; + COLORS_KEYS.define[$ key] = def; + } + + COLORS[$ key] = _loadColorString(def); } for( var i = 0, n = array_length(arrkeys); i < n; i++ ) { var key = arrkeys[i]; - var def = struct_has(override, key)? override[$ key] : clrs.array[$ key]; + var def = clrs.array[$ key]; + + COLORS_DEF.define[$ key] = def; + + if(struct_has(override, key)) { + def = override[$ key]; + COLORS_KEYS.array[$ key] = def; + } var c = array_create(array_length(def)); for( var j = 0; j < array_length(def); j++ ) - c[j] = struct_has(CDEF, def[j])? CDEF[$ def[j]] : color_from_rgb(def[j]); + c[j] = _loadColorString(def[j]); + + COLORS[$ key] = c; + } +} + +function refreshThemePalette() { + var defkeys = variable_struct_get_names(COLORS_KEYS.define); + var arrkeys = variable_struct_get_names(COLORS_KEYS.array); + + for( var i = 0, n = array_length(defkeys); i < n; i++ ) { + var key = defkeys[i]; + var def = COLORS_KEYS.define[$ key]; + var c = c_white; + + COLORS[$ key] = _loadColorString(def); + } + + for( var i = 0, n = array_length(arrkeys); i < n; i++ ) { + var key = arrkeys[i]; + var def = COLORS_KEYS.array[$ key]; + + var c = array_create(array_length(def)); + for( var j = 0; j < array_length(def); j++ ) + c[j] = _loadColorString(def[j]); COLORS[$ key] = c; } diff --git a/scripts/color_selector/color_selector.gml b/scripts/color_selector/color_selector.gml index 2edfa57ae..fc8781129 100644 --- a/scripts/color_selector/color_selector.gml +++ b/scripts/color_selector/color_selector.gml @@ -414,7 +414,7 @@ function colorSelector(onApply = noone) constructor { cx += ui(48); if(interactable) - if(buttonInstant(THEME.button_hide, cx - ui(18), cy - ui(18), ui(36), ui(36), mouse_ui, focus, hover, "", THEME.color_picker_dropper, 0, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, cx - ui(18), cy - ui(18), ui(36), ui(36), mouse_ui, focus, hover, "", THEME.color_picker_dropper, 0, c_white) == 2) dropper_active = true; } } \ No newline at end of file diff --git a/scripts/cornerBox/cornerBox.gml b/scripts/cornerBox/cornerBox.gml index 9a1289fb8..427524030 100644 --- a/scripts/cornerBox/cornerBox.gml +++ b/scripts/cornerBox/cornerBox.gml @@ -81,7 +81,7 @@ function cornerBox(_onModify, _unit = noone) : widget() constructor { var _bx = _x; var _by = _y + _h / 2 - _bs / 2; - b_link.draw(_bx, _by, _bs, _bs, _m, THEME.button_hide); + b_link.draw(_bx, _by, _bs, _bs, _m, THEME.button_hide_fill); _w -= _bs + ui(4); _x += _bs + ui(4); diff --git a/scripts/draw_setter/draw_setter.gml b/scripts/draw_setter/draw_setter.gml index 3241eb475..8f12cb0cd 100644 --- a/scripts/draw_setter/draw_setter.gml +++ b/scripts/draw_setter/draw_setter.gml @@ -1,4 +1,4 @@ -#macro draw_set_color draw_set_color_ext +//#macro draw_set_color draw_set_color_ext #macro __draw_set_color draw_set_color #macro draw_clear draw_clear_ext_override diff --git a/scripts/draw_text_function/draw_text_function.gml b/scripts/draw_text_function/draw_text_function.gml index 5f8de2f6f..ae6cc282a 100644 --- a/scripts/draw_text_function/draw_text_function.gml +++ b/scripts/draw_text_function/draw_text_function.gml @@ -6,6 +6,7 @@ function draw_text_line(_x, _y, _text, _sep, _w, forceCut = false) { function draw_text_add(_x, _y, _text, scale = 1) { INLINE BLEND_ALPHA_MULP + // BLEND_OVERRIDE if(scale == 1) draw_text(round(_x), round(_y), _text); else draw_text_transformed(round(_x), round(_y), _text, scale, scale, 0); BLEND_NORMAL diff --git a/scripts/fontScrollBox/fontScrollBox.gml b/scripts/fontScrollBox/fontScrollBox.gml index cc5aafe3f..ebc5e2484 100644 --- a/scripts/fontScrollBox/fontScrollBox.gml +++ b/scripts/fontScrollBox/fontScrollBox.gml @@ -42,7 +42,7 @@ function fontScrollBox(_onModify) : widget() constructor { if(_w - _bs > ui(100) && extra_button != noone) { 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_fill); w -= _bs + ui(4); } diff --git a/scripts/font_loader/font_loader.gml b/scripts/font_loader/font_loader.gml index 1bb6f163c..4903f5793 100644 --- a/scripts/font_loader/font_loader.gml +++ b/scripts/font_loader/font_loader.gml @@ -1,4 +1,4 @@ -globalvar FONT_DEF, FONT_ISLOADED, FONT_CACHE, FONT_CUST_CACHE, GLYPH_MAP; +globalvar FONT_DEF, FONT_ISLOADED, FONT_CACHE, FONT_CUST_CACHE, GLYPH_MAP, FONT_LIST; globalvar f_h1, f_h2, f_h3, f_h5, f_p0, f_p0b, f_p1, f_p1b, f_p2, f_p2b, f_p3, f_p4; globalvar f_code, f_sdf, f_sdf_medium; @@ -10,6 +10,7 @@ global.LINE_HEIGHTS = {}; FONT_CUST_CACHE = {}; FONT_ISLOADED = false; GLYPH_MAP = {}; + FONT_LIST = {}; f_h1 = _f_h1; f_h2 = _f_h2; @@ -111,6 +112,11 @@ function _font_path(rel) { return defPath; } +function _font_load_default(name, def) { + FONT_LIST[$ name] = { data: noone, font: def } + return def; +} + function _font_load_from_struct(str, name, def, over = true) { if(!struct_has(str, name)) return def; @@ -131,12 +137,15 @@ function _font_load_from_struct(str, name, def, over = true) { var _sdf = struct_try_get(font, "sdf", false); var _font = _font_add(path, round(font.size * UI_SCALE), _sdf); + FONT_LIST[$ name] = { data: str, font: _font } + return _font; } function font_clear(font) { if(font_exists(font)) font_delete(font); } function loadFonts() { + if(FONT_ISLOADED) { font_clear(f_h1); font_clear(f_h2); @@ -162,24 +171,26 @@ function loadFonts() { var path = _font_path("./fonts.json"); + FONT_LIST = {}; + if(FONT_DEF || !file_exists_empty(path)) { - f_h1 = _f_h1; - f_h2 = _f_h2; - f_h3 = _f_h3; - f_h5 = _f_h5; - f_p0 = _f_p0; - f_p0b = _f_p0b; - f_p1 = _f_p1; - f_p1b = _f_p1b; - f_p2 = _f_p2; - f_p2b = _f_p2b; + f_h1 = _font_load_default("h1", _f_h1); + f_h2 = _font_load_default("h2", _f_h2); + f_h3 = _font_load_default("h3", _f_h3); + f_h5 = _font_load_default("h5", _f_h5); + f_p0 = _font_load_default("p0", _f_p0); + f_p0b = _font_load_default("p0b", _f_p0b); + f_p1 = _font_load_default("p1", _f_p1); + f_p1b = _font_load_default("p1b", _f_p1b); + f_p2 = _font_load_default("p2", _f_p2); + f_p2b = _font_load_default("p2b", _f_p2b); - f_p3 = _f_p3; - f_p4 = _f_p4; + f_p3 = _font_load_default("p3", _f_p3); + f_p4 = _font_load_default("p4", _f_p4); - f_code = _f_code; - f_sdf = _f_sdf; - f_sdf_medium = _f_sdf_medium; + f_code = _font_load_default("code", _f_code); + f_sdf = _font_load_default("sdf", _f_sdf); + f_sdf_medium = _font_load_default("sdf_medium", _f_sdf_medium); FONT_ISLOADED = false; __font_refresh(); @@ -198,7 +209,7 @@ function loadFonts() { f_p0b = _font_load_from_struct(fontDef, "p0b", _f_p0b); f_p1 = _font_load_from_struct(fontDef, "p1", _f_p1); - // f_p1b = _font_load_from_struct(fontDef, "p1b", _f_p1b); + f_p1b = _font_load_from_struct(fontDef, "p1b", _f_p1b); f_p2 = _font_load_from_struct(fontDef, "p2", _f_p2); f_p3 = _font_load_from_struct(fontDef, "p3", _f_p3); diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index 45e3b1e84..761ef1f7a 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -44,7 +44,7 @@ LATEST_VERSION = 1_18_00_0; VERSION = 1_18_06_2; SAVE_VERSION = 1_18_05_0; - VERSION_STRING = MAC? "1.18.003m" : "1.18.7.002"; + VERSION_STRING = MAC? "1.18.003m" : "1.18.7.003"; BUILD_NUMBER = 1_18_06_2; PREF_VERSION = 1_17_1; diff --git a/scripts/globalvar_drawer/globalvar_drawer.gml b/scripts/globalvar_drawer/globalvar_drawer.gml index 2424f2c40..3208b5eb1 100644 --- a/scripts/globalvar_drawer/globalvar_drawer.gml +++ b/scripts/globalvar_drawer/globalvar_drawer.gml @@ -84,7 +84,7 @@ function globalvar_viewer_draw(xx, yy, ww, _m, focus, hover, _scrollPane, rx, ry var _wd_ww = wd_w - _wd_h - ui(32 + 4); _edit.tb_name.draw(_wd_xx, yy, _wd_ww, _wd_h, _inpu.name, _m, TEXTBOX_INPUT.text); - if(buttonInstant(THEME.button_hide, _wd_x + wd_w - _wd_h, yy, _wd_h, _wd_h, _m, _hov, _foc,, THEME.icon_delete,, COLORS._main_value_negative) == 2) + if(buttonInstant(THEME.button_hide_fill, _wd_x + wd_w - _wd_h, yy, _wd_h, _wd_h, _m, _hov, _foc,, THEME.icon_delete,, COLORS._main_value_negative) == 2) del = j; yy += _wd_h + _pd_h * 2; hh += _wd_h + _pd_h * 2; diff --git a/scripts/matrixGrid/matrixGrid.gml b/scripts/matrixGrid/matrixGrid.gml index 3964070f8..a4bab8336 100644 --- a/scripts/matrixGrid/matrixGrid.gml +++ b/scripts/matrixGrid/matrixGrid.gml @@ -84,7 +84,7 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct if((_w - _bs) / size > ui(64)) { if(extras && instanceof(extras) == "buttonClass") { extras.setFocusHover(active, hover); - extras.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); + extras.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill); _w -= _bs + ui(8); } @@ -104,7 +104,7 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct var th = _h * size - ui(8); var bx = _x; var by = _y + th / 2 - _bs / 2; - b_link.draw(bx, by, _bs, _bs, _m, THEME.button_hide); + b_link.draw(bx, by, _bs, _bs, _m, THEME.button_hide_fill); _x += _bs + ui(4); _w -= _bs + ui(4); diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index 498c14757..07bd68b4d 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -172,7 +172,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc var _anim = jun.animator; var bx = xx + ww - ui(12); var by = lb_y; - var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, "", THEME.prop_keyframe, 2) + var b = buttonInstant(THEME.button_hide_fill, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, "", THEME.prop_keyframe, 2) if(b) cHov = true; if(b == 2) { @@ -198,7 +198,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc } var _tlp = kfFocus? __txtx("panel_inspector_remove_key", "Remove keyframe") : __txtx("panel_inspector_add_key", "Add keyframe"); - var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, _tlp, THEME.prop_keyframe, 1, cc) + var b = buttonInstant(THEME.button_hide_fill, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, _tlp, THEME.prop_keyframe, 1, cc) if(b) cHov = true; if(b == 2) { @@ -217,7 +217,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc } bx -= ui(26); - var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, "", THEME.prop_keyframe, 0) + var b = buttonInstant(THEME.button_hide_fill, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, "", THEME.prop_keyframe, 0) if(b) cHov = true; if(b == 2) { @@ -241,7 +241,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc bx -= ui(26 + 12); tooltip_loop_type.index = jun.on_end; - var b = buttonInstant(THEME.button_hide, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, tooltip_loop_type, THEME.prop_on_end, jun.on_end) + var b = buttonInstant(THEME.button_hide_fill, bx - ui(12), by - ui(12), ui(24), ui(24), _m, _hover, _focus, tooltip_loop_type, THEME.prop_on_end, jun.on_end) if(b) cHov = true; if(b == 1) { @@ -260,7 +260,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc bx -= bs + ui(4); if(jun.is_modified) { - var b = buttonInstant(THEME.button_hide, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_16, 0, COLORS._main_icon) + var b = buttonInstant(THEME.button_hide_fill, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_reset", "Reset value"), THEME.refresh_16, 0, COLORS._main_icon) if(b) cHov = true; if(b == 2) jun.resetValue(); @@ -269,7 +269,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc bx -= bs + ui(4); var ic_b = jun.expUse? c_white : COLORS._main_icon; - var b = buttonInstant(THEME.button_hide, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_use_expression", "Use expression"), THEME.node_use_expression, jun.expUse, ic_b) + var b = buttonInstant(THEME.button_hide_fill, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_use_expression", "Use expression"), THEME.node_use_expression, jun.expUse, ic_b) if(b) cHov = true; if(b == 2) { @@ -281,7 +281,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc if(jun.expUse) { bx -= bs + ui(4); var cc = NODE_DROPPER_TARGET == jun? COLORS._main_value_positive : COLORS._main_icon; - var b = buttonInstant(THEME.button_hide, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_dropper", "Node Dropper"), THEME.node_dropper, 0, cc) + var b = buttonInstant(THEME.button_hide_fill, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_dropper", "Node Dropper"), THEME.node_dropper, 0, cc) if(b) cHov = true; if(b == 2) NODE_DROPPER_TARGET = NODE_DROPPER_TARGET == jun? noone : jun; @@ -290,7 +290,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc if(jun.expUse || jun.type == VALUE_TYPE.text) { bx -= bs + ui(4); var cc = jun.popup_dialog == noone? COLORS._main_icon : COLORS._main_value_positive; - var b = buttonInstant(THEME.button_hide, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_pop_text", "Pop up Editor"), THEME.text_popup, 0, cc) + var b = buttonInstant(THEME.button_hide_fill, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txtx("panel_inspector_pop_text", "Pop up Editor"), THEME.text_popup, 0, cc) if(b) cHov = true; if(b == 2) { @@ -303,7 +303,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc if(jun.bypass_junc) { bx -= bs + ui(4); var ic_b = jun.bypass_junc.visible? COLORS._main_icon_light : COLORS._main_icon; - var b = buttonInstant(THEME.button_hide, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txt("Bypass"), THEME.junction_bypass, jun.bypass_junc.visible, ic_b) + var b = buttonInstant(THEME.button_hide_fill, bx - bsh, by - bsh, bs, bs, _m, _hover, _focus, __txt("Bypass"), THEME.junction_bypass, jun.bypass_junc.visible, ic_b) if(b) cHov = true; if(b == 2) { diff --git a/scripts/node_2d_light/node_2d_light.gml b/scripts/node_2d_light/node_2d_light.gml index 800516b43..45057f284 100644 --- a/scripts/node_2d_light/node_2d_light.gml +++ b/scripts/node_2d_light/node_2d_light.gml @@ -102,7 +102,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bs = ui(24); var bx = _x + ui(20); var by = _y; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { createNewInput(); triggerRender(); } @@ -145,7 +145,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bs = ui(24); var bx = _x1 - bs; var by = _yy - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del_light = i; } } diff --git a/scripts/node_array/node_array.gml b/scripts/node_array/node_array.gml index 37b4733cf..17b68f5d9 100644 --- a/scripts/node_array/node_array.gml +++ b/scripts/node_array/node_array.gml @@ -15,13 +15,13 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { attributes.size = max(attributes.size, (array_length(inputs) - input_fix_len) / data_length ) + 1; onInputResize(); } var act = attributes.size > 0; - if(buttonTextIconInstant(act, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { + if(buttonTextIconInstant(act, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { attributes.size--; onInputResize(); } diff --git a/scripts/node_canvas_group/node_canvas_group.gml b/scripts/node_canvas_group/node_canvas_group.gml index a6e04e772..67a939168 100644 --- a/scripts/node_canvas_group/node_canvas_group.gml +++ b/scripts/node_canvas_group/node_canvas_group.gml @@ -40,7 +40,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con var bx = _x; var by = _yy; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) layerAdd(); _h += bs + ui(8); diff --git a/scripts/node_colors_replace/node_colors_replace.gml b/scripts/node_colors_replace/node_colors_replace.gml index 120b58b8a..82f3994ae 100644 --- a/scripts/node_colors_replace/node_colors_replace.gml +++ b/scripts/node_colors_replace/node_colors_replace.gml @@ -52,22 +52,22 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g var by = _y; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus,, THEME.refresh_16) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus,, THEME.refresh_16) == 2) refreshPalette(); bx += bs + ui(4); var jun = inputs[2]; var index = jun.value_from == noone? jun.is_anim : 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus,, THEME.animate_clock, index, index == 2? COLORS._main_accent : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus,, THEME.animate_clock, index, index == 2? COLORS._main_accent : COLORS._main_icon) == 2) jun.setAnim(!jun.is_anim); bx += bs + ui(4); var vis = jun.visible; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus,, THEME.junc_visible, vis) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus,, THEME.junc_visible, vis) == 2) jun.visible = !vis; bx += bs + ui(4); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus,, THEME.sort_16) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus,, THEME.sort_16) == 2) menuCall("", sort_menu); var _from = getInputData(1); @@ -109,7 +109,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g bx = _x2 - ui(32); _x2 -= ui(32 + 4); by = _y0 + ss / 2 - ui(32) / 2; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), _m, _hover, _focus,, THEME.color_picker_dropper,, c_white) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), _m, _hover, _focus,, THEME.color_picker_dropper,, c_white) == 2) { var dialog = dialogCall(o_dialog_color_selector) .setApply(setColor); @@ -121,7 +121,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g bx = _x2 - ui(32); _x2 -= ui(32 + 4); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), _m, _hover, _focus,, THEME.color_wheel,, c_white) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), _m, _hover, _focus,, THEME.color_wheel,, c_white) == 2) { var pick = instance_create(mouse_mx, mouse_my, o_dialog_color_quick_pick); array_insert(pick.palette, 0, to); pick.onApply = setColor; diff --git a/scripts/node_dll/node_dll.gml b/scripts/node_dll/node_dll.gml index 2397e0d1c..ac3c9bc1e 100644 --- a/scripts/node_dll/node_dll.gml +++ b/scripts/node_dll/node_dll.gml @@ -21,14 +21,14 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { attributes.size++; refreshDynamicInput(); triggerRender(); } var amo = attributes.size; - if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { + if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { attributes.size--; refreshDynamicInput(); triggerRender(); diff --git a/scripts/node_equation/node_equation.gml b/scripts/node_equation/node_equation.gml index d2bf74a92..eda5c08f6 100644 --- a/scripts/node_equation/node_equation.gml +++ b/scripts/node_equation/node_equation.gml @@ -50,14 +50,14 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { attributes.size++; refreshDynamicInput(); update(); } var amo = attributes.size; - if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { + if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { attributes.size--; refreshDynamicInput(); update(); diff --git a/scripts/node_level/node_level.gml b/scripts/node_level/node_level.gml index d022d58d1..49cc25d35 100644 --- a/scripts/node_level/node_level.gml +++ b/scripts/node_level/node_level.gml @@ -58,7 +58,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _bx = x1 - 20 - i * 24; var _by = y0; - if(buttonInstant(THEME.button_hide, _bx, _by, 20, 20, _m, _hover, _focus) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, 20, 20, _m, _hover, _focus) == 2) histShow[i] = !histShow[i]; draw_sprite_ui_uniform(THEME.circle, 0, _bx + 10, _by + 10, 1, COLORS.histogram[i], 0.5 + histShow[i] * 0.5); } diff --git a/scripts/node_level_selector/node_level_selector.gml b/scripts/node_level_selector/node_level_selector.gml index dbb76f7c1..809950a65 100644 --- a/scripts/node_level_selector/node_level_selector.gml +++ b/scripts/node_level_selector/node_level_selector.gml @@ -62,7 +62,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g var _bx = x1 - 20 - i * 24; var _by = y0; - if(buttonInstant(THEME.button_hide, _bx, _by, 20, 20, _m, _hover, _focus) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, 20, 20, _m, _hover, _focus) == 2) histShow[i] = !histShow[i]; draw_sprite_ui_uniform(THEME.circle, 0, _bx + 10, _by + 10, 1, COLORS.histogram[i], 0.5 + histShow[i] * 0.5); } diff --git a/scripts/node_liquefy/node_liquefy.gml b/scripts/node_liquefy/node_liquefy.gml index 08c18811a..e25b368fb 100644 --- a/scripts/node_liquefy/node_liquefy.gml +++ b/scripts/node_liquefy/node_liquefy.gml @@ -75,7 +75,7 @@ function Node_Liquefy(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var bs = ui(24); var bx = _x + ui(20); var by = _y; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { createNewInput(); triggerRender(); } @@ -118,7 +118,7 @@ function Node_Liquefy(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c var bs = ui(24); var bx = _x1 - bs; var by = _yy - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del_light = i; } } diff --git a/scripts/node_midi_in/node_midi_in.gml b/scripts/node_midi_in/node_midi_in.gml index a2feb7041..04d88083c 100644 --- a/scripts/node_midi_in/node_midi_in.gml +++ b/scripts/node_midi_in/node_midi_in.gml @@ -27,12 +27,12 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) { createNewInput(); } var amo = array_length(inputs); - if(buttonTextIconInstant(amo > 1, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { + if(buttonTextIconInstant(amo > 1, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) { var _out = outputs[array_length(outputs) - 1]; for( var i = 0, n = array_length(_out.value_to); i < n; i++ ) _out.value_to[i].removeFrom(); @@ -62,7 +62,7 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var bs = TEXTBOX_HEIGHT; var bx = _x; var by = _wy; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus) == 2) index_watching = index_watching == i? noone : i; var cc = index_watching == i? COLORS._main_value_negative : COLORS._main_icon; draw_sprite_ext(THEME.circle_16, 0, bx + bs / 2, by + bs / 2, 1, 1, 0, cc, 1); diff --git a/scripts/node_mk_flare/node_mk_flare.gml b/scripts/node_mk_flare/node_mk_flare.gml index eae40f246..fe7978d1e 100644 --- a/scripts/node_mk_flare/node_mk_flare.gml +++ b/scripts/node_mk_flare/node_mk_flare.gml @@ -259,7 +259,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var by = _fy; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { array_push(_flares, new __FlarePart()); inputs[5].setValue(_flares); triggerRender(); @@ -267,7 +267,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) bx += bs + ui(8); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, COLORS._main_value_negative) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, COLORS._main_value_negative) == 2) { array_delete(_flares, array_length(_flares) - 1, 1); inputs[5].setValue(_flares); triggerRender(); diff --git a/scripts/node_normal_light/node_normal_light.gml b/scripts/node_normal_light/node_normal_light.gml index b720e784b..00d8cb5cc 100644 --- a/scripts/node_normal_light/node_normal_light.gml +++ b/scripts/node_normal_light/node_normal_light.gml @@ -49,7 +49,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var bs = ui(24); var bx = _x + ui(20); var by = _y; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { createNewInput(); triggerRender(); } @@ -92,7 +92,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var bs = ui(24); var bx = _x1 - bs; var by = _yy - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del_light = i; } } diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 44b3efe06..5c2527174 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -174,7 +174,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var bs = ui(24); var bx = _x + ui(20); var by = _y; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.add_16, 0, COLORS._main_value_positive) == 2) { createNewInput(); triggerRender(); } @@ -219,7 +219,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var bs = ui(24); var bx = _x1 - bs; var by = _yy - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del_animator = i; } diff --git a/scripts/node_struct/node_struct.gml b/scripts/node_struct/node_struct.gml index 71322ce43..c20749600 100644 --- a/scripts/node_struct/node_struct.gml +++ b/scripts/node_struct/node_struct.gml @@ -8,11 +8,11 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) addInput(); var amo = attributes.size; - if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) + if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) deleteInput(array_length(inputs) - data_length); return _h; diff --git a/scripts/node_switch/node_switch.gml b/scripts/node_switch/node_switch.gml index cbbc80222..0b3b9c4b3 100644 --- a/scripts/node_switch/node_switch.gml +++ b/scripts/node_switch/node_switch.gml @@ -15,11 +15,11 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var bw = _w / 2 - ui(4); var bh = ui(36); - if(buttonTextIconInstant(true, THEME.button_hide, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) + if(buttonTextIconInstant(true, THEME.button_hide_fill, _x, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.add, __txt("Add"), COLORS._main_value_positive) == 2) addInput(); var amo = attributes.size; - if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) + if(buttonTextIconInstant(attributes.size > 0, THEME.button_hide_fill, _x + _w - bw, _y + ui(8), bw, bh, _m, _focus, _hover, "", THEME.minus, __txt("Remove"), COLORS._main_value_negative) == 2) deleteInput(array_length(inputs) - data_length); return _h; diff --git a/scripts/node_tiler_convert/node_tiler_convert.gml b/scripts/node_tiler_convert/node_tiler_convert.gml index 8df1a26ca..0c675fa00 100644 --- a/scripts/node_tiler_convert/node_tiler_convert.gml +++ b/scripts/node_tiler_convert/node_tiler_convert.gml @@ -30,7 +30,7 @@ function Node_Tile_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var by = _y; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus,, THEME.refresh_16) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus,, THEME.refresh_16) == 2) refreshPalette(); var _cmap = attributes.colorMap; diff --git a/scripts/node_tiler_tileset/node_tiler_tileset.gml b/scripts/node_tiler_tileset/node_tiler_tileset.gml index ade057e62..1dfb12087 100644 --- a/scripts/node_tiler_tileset/node_tiler_tileset.gml +++ b/scripts/node_tiler_tileset/node_tiler_tileset.gml @@ -107,7 +107,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var by = _yy; var bs = ui(24); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "Clear selection", THEME.canvas_tools_selection_rectangle, 0, COLORS._main_icon_light) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "Clear selection", THEME.canvas_tools_selection_rectangle, 0, COLORS._main_icon_light) == 2) { brush.brush_indices = [[]]; brush.brush_width = 0; brush.brush_height = 0; @@ -116,7 +116,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _lx = bx + bs + ui(8); bx = _x + _w - bs; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "Zoom to fit", THEME.path_tools_transform, 0, COLORS._main_icon_light) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "Zoom to fit", THEME.path_tools_transform, 0, COLORS._main_icon_light) == 2) { if(is_surface(_tileSet)) { var _tdim = surface_get_dimension(_tileSet); var _sw = _w - _pd * 2; @@ -603,7 +603,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _fromSel = _brush_tiles == 9 || _brush_tiles == 15 || _brush_tiles == 25 ||_brush_tiles == 48 || _brush_tiles == 55; var _txt = _fromSel? "New autoterrain from selection" : "New autoterrain"; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, _txt, THEME.add_16, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, _txt, THEME.add_16, 0, COLORS._main_value_positive) == 2) { var _new_at = noone; var _indx = array_create(brush.brush_width * brush.brush_height); @@ -673,7 +673,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var by = _yy + _hg / 2 - bs / 2; var bc = _hov? COLORS._main_value_negative : COLORS._main_icon; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, bc) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, bc) == 2) del = i; } @@ -944,13 +944,13 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _tsh = palette_viewer.fixHeight > 0? palette_viewer.fixHeight - ui(24 + 4) : brush_palette_h; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "Pencil", THEME.canvas_tools_pencil, 0, palette_tool == 1? COLORS._main_accent : c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "Pencil", THEME.canvas_tools_pencil, 0, palette_tool == 1? COLORS._main_accent : c_white) == 2) palette_tool = palette_tool == 1? 0 : 1; draw_sprite_ui_uniform(THEME.canvas_tools_pencil, 1, bx + bs / 2, by + bs / 2, 1, palette_tool == 1? COLORS._main_accent : c_white); bx += bs + ui(1); - var b = buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "Eraser", THEME.canvas_tools_eraser, 0, palette_tool == 2? COLORS._main_accent : c_white) + var b = buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "Eraser", THEME.canvas_tools_eraser, 0, palette_tool == 2? COLORS._main_accent : c_white) gpu_set_tex_filter(true); draw_sprite_ext(THEME.arrow, 0, bx + bs - 4, by + bs - 4, .75, .75, -45, COLORS._main_icon); gpu_set_tex_filter(false); if(b == 2) palette_tool = palette_tool == 2? 0 : 2; @@ -963,7 +963,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _lx = bx + bs + ui(8); bx = _x + _w - bs; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "Zoom to fit", THEME.path_tools_transform, 0, COLORS._main_icon_light) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "Zoom to fit", THEME.path_tools_transform, 0, COLORS._main_icon_light) == 2) { if(is_surface(brush_palette_tile)) { var _tdim = surface_get_dimension(brush_palette_tile); var _sw = _w - _pd * 2; @@ -1411,7 +1411,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(_brush_tiles < 1) draw_sprite_uniform(THEME.add_16, 0, bx + bs / 2, by + bs / 2, 1, COLORS._main_icon); - else if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "New animated tiles", THEME.add_16, 0, COLORS._main_value_positive) == 2) { + else if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "New animated tiles", THEME.add_16, 0, COLORS._main_value_positive) == 2) { var _new_at = noone; var _indx = array_create(brush.brush_width * brush.brush_height); @@ -1478,7 +1478,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr var bs = ui(24); var bx = _w - bs - ui(4); var by = _yy + _hg / 2 - bs / 2; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, _m, _hover, _focus, "", THEME.minus_16, 0, _hov? COLORS._main_value_negative : COLORS._main_icon) == 2) del = i; } diff --git a/scripts/node_value_types/node_value_types.gml b/scripts/node_value_types/node_value_types.gml index 3c186deaf..93c6049c0 100644 --- a/scripts/node_value_types/node_value_types.gml +++ b/scripts/node_value_types/node_value_types.gml @@ -529,7 +529,7 @@ function nodeValueUnit(__nodeValue) constructor { static draw = function(_x, _y, _w, _h, _m) { triggerButton.icon_index = mode; triggerButton.tooltip.index = mode; - triggerButton.draw(_x, _y, _w, _h, _m, THEME.button_hide); + triggerButton.draw(_x, _y, _w, _h, _m, THEME.button_hide_fill); } static invApply = function(value, index = 0) { diff --git a/scripts/outputBox/outputBox.gml b/scripts/outputBox/outputBox.gml index 4c481d9b2..9c45e30a0 100644 --- a/scripts/outputBox/outputBox.gml +++ b/scripts/outputBox/outputBox.gml @@ -63,7 +63,7 @@ function outputBox() : widget() constructor { var _bx = _x + _w - ui(8) - _bs; var _by = _y + ui(8); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, ihover, iactive, "", THEME.arrow, expand? 3 : 0) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, ihover, iactive, "", THEME.arrow, expand? 3 : 0) == 2) expand = !expand; return _hh; @@ -118,7 +118,7 @@ function outputStructBox() : widget() constructor { var _bx = _x + _w - ui(8) - _bs; var _by = _y + ui(8); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, _m, ihover, iactive, "", THEME.arrow, expand? 3 : 0) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, _m, ihover, iactive, "", THEME.arrow, expand? 3 : 0) == 2) expand = !expand; return _hh; diff --git a/scripts/paddingBox/paddingBox.gml b/scripts/paddingBox/paddingBox.gml index 6920efc15..8453a9647 100644 --- a/scripts/paddingBox/paddingBox.gml +++ b/scripts/paddingBox/paddingBox.gml @@ -90,7 +90,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor { var _bx = _x; var _by = _y + _h / 2 - _bs / 2; - b_link.draw(_bx, _by, _bs, _bs, _m, THEME.button_hide); + b_link.draw(_bx, _by, _bs, _bs, _m, THEME.button_hide_fill); _w -= _bs + ui(4); _x += _bs + ui(4); diff --git a/scripts/panel_addon/panel_addon.gml b/scripts/panel_addon/panel_addon.gml index 543c6c2db..328c27847 100644 --- a/scripts/panel_addon/panel_addon.gml +++ b/scripts/panel_addon/panel_addon.gml @@ -116,12 +116,12 @@ function Panel_Addon() : PanelContent() constructor { var _bx = bx - ui(4); var _by = by + ui(4); - var b = buttonInstant(THEME.button_hide, _bx, _by, ui(32), ui(32), _m, pHOVER, pFOCUS, __txt("Open in explorer"), THEME.folder_content); + var b = buttonInstant(THEME.button_hide_fill, _bx, _by, ui(32), ui(32), _m, pHOVER, pFOCUS, __txt("Open in explorer"), THEME.folder_content); if(b) hover = false; if(b == 2) shellOpenExplorer(DIRECTORY + "Addons/" + _addon.name); _bx -= ui(36) - if(_act && buttonInstant(THEME.button_hide, _bx, _by, ui(32), ui(32), _m, pHOVER, pFOCUS, __txt("Addon settings"), THEME.addon_setting) == 2) { + if(_act && buttonInstant(THEME.button_hide_fill, _bx, _by, ui(32), ui(32), _m, pHOVER, pFOCUS, __txt("Addon settings"), THEME.addon_setting) == 2) { var _addObj = noone; with(_addon_custom) if(name == _addon.name) _addObj = self; diff --git a/scripts/panel_animation/panel_animation.gml b/scripts/panel_animation/panel_animation.gml index b05bc71ab..63fca0556 100644 --- a/scripts/panel_animation/panel_animation.gml +++ b/scripts/panel_animation/panel_animation.gml @@ -2519,7 +2519,7 @@ function Panel_Animation() : PanelContent() constructor { var cc = IS_RENDERING? COLORS._main_icon_dark : but[2](); var fnc = but[3]; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER && !IS_RENDERING, pFOCUS && !IS_RENDERING, txt, THEME.sequence_control, ind, cc) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER && !IS_RENDERING, pFOCUS && !IS_RENDERING, txt, THEME.sequence_control, ind, cc) == 2) fnc(); bx += ui(36); @@ -2569,11 +2569,11 @@ function Panel_Animation() : PanelContent() constructor { by += ui(36); bx = w - ui(44); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_animation_animation_settings", "Animation settings"), THEME.gear, 2) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_animation_animation_settings", "Animation settings"), THEME.gear, 2) == 2) dialogPanelCall(new Panel_Animation_Setting(), x + bx + ui(32), y + by - ui(8), { anchor: ANCHOR.right | ANCHOR.bottom }); by -= ui(40); if(by < 8) return; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_animation_scale_animation", "Scale animation"), THEME.animation_timing, 2) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_animation_scale_animation", "Scale animation"), THEME.animation_timing, 2) == 2) dialogPanelCall(new Panel_Animation_Scaler(), x + bx + ui(32), y + by - ui(8), { anchor: ANCHOR.right | ANCHOR.bottom }); var max_y = by - ui(28); @@ -2581,14 +2581,14 @@ function Panel_Animation() : PanelContent() constructor { by = ui(8); var txt = __txt("New folder"); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.folder_content) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.folder_content) == 2) { var _dir = new timelineItemGroup(); PROJECT.timelines.addItem(_dir); } by += ui(32); if(by > max_y) return; node_name_tooltip.index = node_name_type; - var b = buttonInstant(THEME.button_hide, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, node_name_tooltip, THEME.node_name_type, node_name_type); + var b = buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, node_name_tooltip, THEME.node_name_type, node_name_type); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) mod_dec_mf0 node_name_type mod_dec_mf1 node_name_type mod_dec_mf2 3 mod_dec_mf3 3 mod_dec_mf4; if(key_mod_press(SHIFT) && mouse_wheel_down()) mod_inc_mf0 node_name_type mod_inc_mf1 node_name_type mod_inc_mf2 3 mod_inc_mf3; @@ -2596,17 +2596,17 @@ function Panel_Animation() : PanelContent() constructor { if(b == 2) mod_inc_mf0 node_name_type mod_inc_mf1 node_name_type mod_inc_mf2 3 mod_inc_mf3; by += ui(32); if(by > max_y) return; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, tooltip_toggle_nodes, THEME.junc_visible, show_nodes) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, tooltip_toggle_nodes, THEME.junc_visible, show_nodes) == 2) show_nodes = !show_nodes; by += ui(32); if(by > max_y) return; txt = __txtx("panel_animation_keyframe_override", "Override Keyframe"); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.keyframe_override, global.FLAG.keyframe_override) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.keyframe_override, global.FLAG.keyframe_override) == 2) global.FLAG.keyframe_override = !global.FLAG.keyframe_override; by += ui(32); if(by > max_y) return; txt = __txt("Onion skin"); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.onion_skin,, PROJECT.onion_skin.enabled? c_white : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(28), [mx, my], pHOVER, pFOCUS, txt, THEME.onion_skin,, PROJECT.onion_skin.enabled? c_white : COLORS._main_icon) == 2) PROJECT.onion_skin.enabled = !PROJECT.onion_skin.enabled; } diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index 9636219dc..a97f6b88e 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -828,7 +828,7 @@ function Panel_Collection() : PanelContent() constructor { var by = ui(9); var bs = ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, __txt("Search"), THEME.search_24, 0, searching? COLORS._main_accent : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, __txt("Search"), THEME.search_24, 0, searching? COLORS._main_accent : COLORS._main_icon) == 2) search_toggle(); bx -= ui(36); @@ -847,7 +847,7 @@ function Panel_Collection() : PanelContent() constructor { if(bx < rootx) return; if(context != root) { var txt = __txtx("panel_collection_add_node", "Add selecting node as collection"); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.add_20, 0, COLORS._main_value_positive) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.add_20, 0, COLORS._main_value_positive) == 2) { if(PANEL_INSPECTOR.getInspecting() != noone) { data_path = context.path; var dia = dialogCall(o_dialog_file_name_collection, mouse_mx + ui(8), mouse_my + ui(8)); @@ -864,7 +864,7 @@ function Panel_Collection() : PanelContent() constructor { if(bx < rootx) return; var txt = __txtx("panel_collection_add_folder", "Add folder"); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt) == 2) { fileNameCall(context.path, function (txt) { directory_create(txt); refreshContext(); @@ -878,14 +878,14 @@ function Panel_Collection() : PanelContent() constructor { if(pageStr[page] != "Nodes") { if(bx < rootx) return; var txt = __txtx("panel_collection_open_file", "Open in file explorer"); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.path_open) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.path_open) == 2) shellOpenExplorer(context.path); draw_sprite_ui_uniform(THEME.path_open, 1, bx + bs / 2, by + bs / 2, 1, c_white); bx -= ui(36); if(bx < rootx) return; var txt = __txt("Refresh"); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.refresh_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.refresh_icon) == 2) refreshContext(); bx -= ui(36); @@ -893,7 +893,7 @@ function Panel_Collection() : PanelContent() constructor { if(bx < rootx) return; var txt = __txt("Settings"); - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.gear) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [mx, my], pHOVER, pFOCUS, txt, THEME.gear) == 2) dialogPanelCall(new Panel_Collections_Setting(), x + bx, y + by - 8, { anchor: ANCHOR.bottom | ANCHOR.left }); bx -= ui(36); } diff --git a/scripts/panel_file_explorer/panel_file_explorer.gml b/scripts/panel_file_explorer/panel_file_explorer.gml index c941f9290..e036b1db9 100644 --- a/scripts/panel_file_explorer/panel_file_explorer.gml +++ b/scripts/panel_file_explorer/panel_file_explorer.gml @@ -427,11 +427,11 @@ function Panel_File_Explorer() : PanelContent() constructor { var _ppw = _pw; if(point_in_rectangle(_m[0], _m[1], _px, _py, _px + _pw, _py + _ph)) { - if(buttonInstant(THEME.button_hide, _px + _ppw - _ph, _py, _ph, _ph, _m, pHOVER, pFOCUS, "Set as root", THEME.path_open_20) == 2) + if(buttonInstant(THEME.button_hide_fill, _px + _ppw - _ph, _py, _ph, _ph, _m, pHOVER, pFOCUS, "Set as root", THEME.path_open_20) == 2) setRoot(_dir.path); _ppw -= _ph + ui(2); - if(buttonInstant(THEME.button_hide, _px + _ppw - _ph, _py, _ph, _ph, _m, pHOVER, pFOCUS, "Copy path", THEME.copy_20) == 2) + if(buttonInstant(THEME.button_hide_fill, _px + _ppw - _ph, _py, _ph, _ph, _m, pHOVER, pFOCUS, "Copy path", THEME.copy_20) == 2) clipboard_set_text(_dir.path); _ppw -= _ph + ui(2); @@ -665,7 +665,7 @@ function Panel_File_Explorer() : PanelContent() constructor { draw_sprite_stretched(THEME.ui_panel_bg, 1, cnt_x, cnt_y, cnt_w, cnt_h); var bs = top_bar - pad - ui(8); - if(buttonInstant(THEME.button_hide, pad, pad, bs, bs, [mx, my], pHOVER, pFOCUS, "Go up", THEME.arrow, 1, root != ""? COLORS._main_icon : COLORS._main_icon_dark) == 2) + if(buttonInstant(THEME.button_hide_fill, pad, pad, bs, bs, [mx, my], pHOVER, pFOCUS, "Go up", THEME.arrow, 1, root != ""? COLORS._main_icon : COLORS._main_icon_dark) == 2) if(root != "") setRoot(filename_dir(root)); var tb_x = cnt_x + ui(32); @@ -673,7 +673,7 @@ function Panel_File_Explorer() : PanelContent() constructor { var tb_w = w - pad - tb_x - bs - ui(4); var tb_h = top_bar - pad - ui(8); - var b = buttonInstant(THEME.button_hide, w - pad - bs, pad, bs, bs, [mx, my], pHOVER, pFOCUS, view_mode_tooltip, THEME.view_mode, !view_mode); + var b = buttonInstant(THEME.button_hide_fill, w - pad - bs, pad, bs, bs, [mx, my], pHOVER, pFOCUS, view_mode_tooltip, THEME.view_mode, !view_mode); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) { view_mode = !view_mode; PREFERENCES.file_explorer_view = view_mode; } if(key_mod_press(SHIFT) && mouse_wheel_down()) { view_mode = !view_mode; PREFERENCES.file_explorer_view = view_mode; } diff --git a/scripts/panel_gm_explorer/panel_gm_explorer.gml b/scripts/panel_gm_explorer/panel_gm_explorer.gml index dd5a0f658..41ed8259c 100644 --- a/scripts/panel_gm_explorer/panel_gm_explorer.gml +++ b/scripts/panel_gm_explorer/panel_gm_explorer.gml @@ -52,7 +52,7 @@ function Panel_GM_Explore(gmBinder) : PanelContent() constructor { var _bx = px + pw - _bs; var _by = py; - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "", THEME.refresh_16) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "", THEME.refresh_16) == 2) gmBinder.refreshResources(); sc_content.setFocusHover(pFOCUS, pHOVER); diff --git a/scripts/panel_gradient/panel_gradient.gml b/scripts/panel_gradient/panel_gradient.gml index 92b4b0f52..ca66685c7 100644 --- a/scripts/panel_gradient/panel_gradient.gml +++ b/scripts/panel_gradient/panel_gradient.gml @@ -74,7 +74,7 @@ function Panel_Gradient() : PanelContent() constructor { // var bx = w - ui(32 + 16); // var by = padding / 2 - ui(16 + !in_dialog * 2); - // if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txt("Refresh"), THEME.refresh_icon, 1, COLORS._main_icon) == 2) + // if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txt("Refresh"), THEME.refresh_icon, 1, COLORS._main_icon) == 2) // __initGradient(); } } \ No newline at end of file diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 70ff36d25..437c9947d 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -2243,7 +2243,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { var bs = ui(28); if(tbx - (bs + ui(4)) < cont_x) break; - var b = buttonInstant(THEME.button_hide, tbx - bs, tby - bs / 2, bs, bs, _m, pHOVER, pFOCUS, tbTooltip, tbObj, tbInd); + var b = buttonInstant(THEME.button_hide_fill, tbx - bs, tby - bs / 2, bs, bs, _m, pHOVER, pFOCUS, tbTooltip, tbObj, tbInd); if(b == 2) tb[3]( { x: x + tbx - bs, y: y + tby - bs / 2 } ); tbx -= bs + ui(4); } @@ -2253,7 +2253,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor { tbx -= ui(2); draw_set_color(COLORS.panel_toolbar_separator); - draw_line_width(tbx, tby - toolbar_height / 2 + ui(8), tbx, tby + toolbar_height / 2 - ui(8), 2); + draw_line_round(tbx, tby - toolbar_height / 2 + ui(8), tbx, tby + toolbar_height / 2 - ui(8), 2); if(tbx < cont_x) break; tbx -= ui(6); diff --git a/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml b/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml index 1f9ec2d2b..cca5d026b 100644 --- a/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml +++ b/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml @@ -161,7 +161,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor { var bx = _sx1 - ui(24) - ui(4); var by = _sy + ui(1) + ui(4); - if(buttonInstant(THEME.button_hide, bx, by, ui(24), ui(24), _m, pHOVER, pFOCUS) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(24), ui(24), _m, pHOVER, pFOCUS) == 2) refresh(); draw_sprite_ui(THEME.refresh_16, 0, bx + ui(12), by + ui(12),,,, COLORS._main_icon, 1); diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index 3e7b31b5a..12f2d0572 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -1227,10 +1227,10 @@ function Panel_Inspector() : PanelContent() constructor { draw_set_font(f_p1); var lx = w / 2 - string_width(inspecting.name) / 2 - ui(10); var ly = ui(56 - 8); - if(buttonInstant(THEME.button_hide, lx, ly, ui(16), ui(16), [mx, my], pHOVER, pFOCUS, __txt("Lock"), THEME.lock_12, !locked, locked? COLORS._main_icon_light : COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, lx, ly, ui(16), ui(16), [mx, my], pHOVER, pFOCUS, __txt("Lock"), THEME.lock_12, !locked, locked? COLORS._main_icon_light : COLORS._main_icon) == 2) locked = !locked; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txt("Presets"), THEME.preset, 1) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txt("Presets"), THEME.preset, 1) == 2) dialogPanelCall(new Panel_Presets(inspecting), x + bx, y + by + ui(36)); } else { draw_sprite_ui_uniform(THEME.preset, 1, bx + ui(32) / 2, by + ui(32) / 2, 1, COLORS._main_icon_dark); @@ -1248,7 +1248,7 @@ function Panel_Inspector() : PanelContent() constructor { var tt = inspecting.insp1UpdateTooltip; if(inspectGroup) tt += " [All]"; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER && ac, pFOCUS && ac, tt, icon[0], icon[1], cc) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER && ac, pFOCUS && ac, tt, icon[0], icon[1], cc) == 2) { if(inspectGroup == 1) { for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector1Update(); } else @@ -1265,7 +1265,7 @@ function Panel_Inspector() : PanelContent() constructor { var tt = inspecting.insp2UpdateTooltip; if(inspectGroup) tt += " [All]"; - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER && ac, pFOCUS && ac, tt, icon[0], icon[1], cc) = 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER && ac, pFOCUS && ac, tt, icon[0], icon[1], cc) = 2) { if(inspectGroup) { for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector2Update(); } else @@ -1281,7 +1281,7 @@ function Panel_Inspector() : PanelContent() constructor { if(inspecting && !inspecting.active) inspecting = noone; view_mode_tooltip.index = viewMode; - var b = buttonInstant(THEME.button_hide, ui(8), ui(48), ui(32), ui(32), [mx, my], pHOVER, pFOCUS, view_mode_tooltip, THEME.inspector_view, viewMode); + var b = buttonInstant(THEME.button_hide_fill, ui(8), ui(48), ui(32), ui(32), [mx, my], pHOVER, pFOCUS, view_mode_tooltip, THEME.inspector_view, viewMode); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) { viewMode = !viewMode; PREFERENCES.inspector_view_default = viewMode; } if(key_mod_press(SHIFT) && mouse_wheel_down()) { viewMode = !viewMode; PREFERENCES.inspector_view_default = viewMode; } @@ -1332,7 +1332,7 @@ function Panel_Inspector() : PanelContent() constructor { var bx = w - ui(44); var by = ui(12); - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_set_default", "Set Metadata as default"), THEME.save, 0, COLORS._main_icon) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_set_default", "Set Metadata as default"), THEME.save, 0, COLORS._main_icon) == 2) json_save_struct(DIRECTORY + "meta.json", PROJECT.meta.serialize()); by += ui(36); @@ -1341,7 +1341,7 @@ function Panel_Inspector() : PanelContent() constructor { buttonInstant(noone, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_workshop_save", "Save file before upload"), THEME.workshop_upload, 0, COLORS._main_icon, 0.5); } else { if(PROJECT.meta.steam == FILE_STEAM_TYPE.local) { //project made locally - if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_workshop_upload", "Upload to Steam Workshop"), THEME.workshop_upload, 0, COLORS._main_icon) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_workshop_upload", "Upload to Steam Workshop"), THEME.workshop_upload, 0, COLORS._main_icon) == 2) { var s = PANEL_PREVIEW.getNodePreviewSurface(); if(is_surface(s)) { PROJECT.meta.author_steam_id = STEAM_USER_ID; @@ -1357,8 +1357,8 @@ function Panel_Inspector() : PanelContent() constructor { if(PROJECT.meta.steam && PROJECT.meta.author_steam_id == STEAM_USER_ID) { if(PROJECT.meta.steam == FILE_STEAM_TYPE.steamUpload) { - buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], false, pHOVER, __txtx("panel_inspector_workshop_restart", "Open project from the workshop tab to update."), THEME.workshop_update, 0, COLORS._main_icon); - } else if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_workshop_update", "Update Steam Workshop content"), THEME.workshop_update, 0, COLORS._main_icon) == 2) { + buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], false, pHOVER, __txtx("panel_inspector_workshop_restart", "Open project from the workshop tab to update."), THEME.workshop_update, 0, COLORS._main_icon); + } else if(buttonInstant(THEME.button_hide_fill, bx, by, ui(32), ui(32), [mx, my], pHOVER, pFOCUS, __txtx("panel_inspector_workshop_update", "Update Steam Workshop content"), THEME.workshop_update, 0, COLORS._main_icon) == 2) { SAVE_AT(PROJECT, PROJECT.path); steam_ugc_update_project(); workshop_uploading = true; diff --git a/scripts/panel_node_align/panel_node_align.gml b/scripts/panel_node_align/panel_node_align.gml index 6b46774c1..1bc63e699 100644 --- a/scripts/panel_node_align/panel_node_align.gml +++ b/scripts/panel_node_align/panel_node_align.gml @@ -11,15 +11,15 @@ function Panel_Node_Align() : PanelContent() constructor { ///////////////////////////// - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 0, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 0, c_white) == 2) node_halign(PANEL_GRAPH.nodes_selecting, fa_left); xx += 34 - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 1, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 1, c_white) == 2) node_halign(PANEL_GRAPH.nodes_selecting, fa_center); xx += 34 - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 2, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_halign, 2, c_white) == 2) node_halign(PANEL_GRAPH.nodes_selecting, fa_right); xx += 34 @@ -30,15 +30,15 @@ function Panel_Node_Align() : PanelContent() constructor { ///////////////////////////// - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 0, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 0, c_white) == 2) node_valign(PANEL_GRAPH.nodes_selecting, fa_top); xx += 34 - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 1, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 1, c_white) == 2) node_valign(PANEL_GRAPH.nodes_selecting, fa_middle); xx += 34 - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 2, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.object_valign, 2, c_white) == 2) node_valign(PANEL_GRAPH.nodes_selecting, fa_bottom); xx += 34 @@ -49,11 +49,11 @@ function Panel_Node_Align() : PanelContent() constructor { ///////////////////////////// - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.obj_distribute_h, 0, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.obj_distribute_h, 0, c_white) == 2) node_hdistribute(PANEL_GRAPH.nodes_selecting); xx += 34 - if(buttonInstant(THEME.button_hide, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.obj_distribute_v, 0, c_white) == 2) + if(buttonInstant(THEME.button_hide_fill, xx, yy, 32, 32, [mx, my], pHOVER, pFOCUS,, THEME.obj_distribute_v, 0, c_white) == 2) node_vdistribute(PANEL_GRAPH.nodes_selecting); xx += 34 } diff --git a/scripts/panel_nodes/panel_nodes.gml b/scripts/panel_nodes/panel_nodes.gml index b37fc13e6..5a002a7e2 100644 --- a/scripts/panel_nodes/panel_nodes.gml +++ b/scripts/panel_nodes/panel_nodes.gml @@ -71,7 +71,7 @@ function Panel_Nodes() : PanelContent() constructor { var bx = _x1 - ui(4) - bw; var by = _y + (hg - bh) / 2; - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_nodes.hover, sc_nodes.active, __txtx("panel_node_goto", "Go to node"), THEME.node_goto,, COLORS._main_icon, 0.75, 0.75) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, _m, sc_nodes.hover, sc_nodes.active, __txtx("panel_node_goto", "Go to node"), THEME.node_goto,, COLORS._main_icon, 0.75, 0.75) == 2) graphFocusNode(node); bx -= ui(32); diff --git a/scripts/panel_palette_mixer/panel_palette_mixer.gml b/scripts/panel_palette_mixer/panel_palette_mixer.gml index 0353c289a..25abb013c 100644 --- a/scripts/panel_palette_mixer/panel_palette_mixer.gml +++ b/scripts/panel_palette_mixer/panel_palette_mixer.gml @@ -185,7 +185,7 @@ function Panel_Palette_Mixer() : PanelContent() constructor { var _by = pal_y; var _bs = ui(24); - var _b = buttonInstant(THEME.button_hide, _bx, _by, _bs, pal_h, [ mx, my ], pHOVER, pFOCUS, "", THEME.hamburger_s); + var _b = buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, pal_h, [ mx, my ], pHOVER, pFOCUS, "", THEME.hamburger_s); if(_b == 2) { menuCall("", [ menuItem("Save palette as...", function() { diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index 857a15f2d..c661e7e55 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -1906,15 +1906,15 @@ function Panel_Preview() : PanelContent() constructor { if(point_in_rectangle(_mx, _my, _sx0, _sy0 + 1, _sx1, _sy1 - 1)) { TOOLTIP = tool.getDisplayName(j); - draw_sprite_stretched(THEME.button_hide, 1, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2); + draw_sprite_stretched(THEME.button_hide_fill, 1, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2); if(mouse_press(mb_left, pFOCUS)) tool.toggle(j); } if(tool_current == tool && tool.selecting == j) { - draw_sprite_stretched_ext(THEME.button_hide, 2, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 2, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); } draw_sprite_colored(stool[j], 0, _sxx, _syy); @@ -1925,7 +1925,7 @@ function Panel_Preview() : PanelContent() constructor { } else { // single tools if(tool_hovering == tool) { - draw_sprite_stretched(THEME.button_hide, 1, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2); + draw_sprite_stretched(THEME.button_hide_fill, 1, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2); TOOLTIP = tool.getDisplayName(); if(mouse_press(mb_left, pFOCUS)) @@ -1940,8 +1940,8 @@ function Panel_Preview() : PanelContent() constructor { } if(tool_current == tool) { - draw_sprite_stretched_ext(THEME.button_hide, 2, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 2, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); } if(tool.subtools > 0) draw_sprite_colored(tool.spr[tool.selecting], 0, xx, yy); @@ -2020,15 +2020,15 @@ function Panel_Preview() : PanelContent() constructor { if(point_in_rectangle(_mx, _my, _sx0, _sy0 + 1, _sx1, _sy1 - 1)) { TOOLTIP = tool.getDisplayName(_sind); - draw_sprite_stretched(THEME.button_hide, 1, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2); + draw_sprite_stretched(THEME.button_hide_fill, 1, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2); if(mouse_press(mb_left, pFOCUS)) tool.toggle(_sind); } if(tool_current == tool && tool.selecting == _sind) { - draw_sprite_stretched_ext(THEME.button_hide, 2, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 2, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, _sx0 + pd, _sy0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); } draw_sprite_colored(stool[_sind], 0, _sxx, _syy); @@ -2040,7 +2040,7 @@ function Panel_Preview() : PanelContent() constructor { } else { // single tools if(tool_hovering == tool) { - draw_sprite_stretched(THEME.button_hide, 1, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2); + draw_sprite_stretched(THEME.button_hide_fill, 1, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2); TOOLTIP = tool.getDisplayName(); if(mouse_press(mb_left, pFOCUS)) @@ -2054,8 +2054,8 @@ function Panel_Preview() : PanelContent() constructor { } if(tool_current == tool) { - draw_sprite_stretched_ext(THEME.button_hide, 2, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); - draw_sprite_stretched_ext(THEME.button_hide, 3, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 2, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS.panel_preview_grid, 1); + draw_sprite_stretched_ext(THEME.button_hide_fill, 3, _x0 + pd, _y0 + pd, tool_size - pd * 2, tool_size - pd * 2, COLORS._main_accent, 1); } if(tool.subtools > 0) draw_sprite_colored(tool.spr[tool.selecting], 0, xx, yy); @@ -2229,7 +2229,7 @@ function Panel_Preview() : PanelContent() constructor { tbTooltip.index = tbInd; var tooltip = instance_exists(o_dialog_menubox)? "" : tbTooltip; - var b = buttonInstant(THEME.button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pHOVER, pFOCUS, tooltip, tbSpr, tbInd); + var b = buttonInstant(THEME.button_hide_fill, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pHOVER, pFOCUS, tooltip, tbSpr, tbInd); switch(b) { case 1 : if(onWUp != 0 && key_mod_press(SHIFT) && mouse_wheel_up()) onWUp(); @@ -2250,7 +2250,7 @@ function Panel_Preview() : PanelContent() constructor { var tbTooltip = tb[1]; var tbIndex = tb[3](); - var b = buttonInstant(THEME.button_hide, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pHOVER, pFOCUS, tbTooltip, tbSpr, tbIndex); + var b = buttonInstant(THEME.button_hide_fill, tbx - ui(14), tby - ui(14), ui(28), ui(28), [mx, my], pHOVER, pFOCUS, tbTooltip, tbSpr, tbIndex); if(b == 2) tb[2]( { x: x + tbx - ui(14), y: y + tby - ui(14) } ); tbx -= ui(32); @@ -2358,7 +2358,7 @@ function Panel_Preview() : PanelContent() constructor { } else { dragCanvas(); - draw_set_color(COLORS.panel_preview_surface_outline, .75); + draw_set_color_alpha(COLORS.panel_preview_surface_outline, .75); draw_rectangle(canvas_x, canvas_y, canvas_x + DEF_SURF_W * canvas_s - 1, canvas_y + DEF_SURF_H * canvas_s - 1, true); draw_set_alpha(1); } diff --git a/scripts/panel_profile_render/panel_profile_render.gml b/scripts/panel_profile_render/panel_profile_render.gml index ae211cfee..8e64ccfd9 100644 --- a/scripts/panel_profile_render/panel_profile_render.gml +++ b/scripts/panel_profile_render/panel_profile_render.gml @@ -596,7 +596,7 @@ function Panel_Profile_Render() : PanelContent() constructor { var _bx = _pd; var _by = _pd; - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Render all", s_run, 1, COLORS._main_value_positive, 1, 1) == 2) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Render all", s_run, 1, COLORS._main_value_positive, 1, 1) == 2) { PROFILER_STAT = 1; PROFILER_DATA = []; setReport(noone); @@ -611,7 +611,7 @@ function Panel_Profile_Render() : PanelContent() constructor { } _bx += _bs + ui(2); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Render partial", s_run_partial, 1, COLORS._main_value_positive, 1, 1) == 2) { + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Render partial", s_run_partial, 1, COLORS._main_value_positive, 1, 1) == 2) { PROFILER_STAT = 1; PROFILER_DATA = []; setReport(noone); @@ -637,19 +637,19 @@ function Panel_Profile_Render() : PanelContent() constructor { var _bx = _pd + list_w - _bs; var _by = _pd; - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, $"Log level {show_log_level}", s_filter_log_level, show_log_level, COLORS._main_icon, 1, 1) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, $"Log level {show_log_level}", s_filter_log_level, show_log_level, COLORS._main_icon, 1, 1) == 2) show_log_level = (show_log_level + 1) % 5; _bx -= _bs + ui(4); if(report_selecting == noone) draw_sprite_ext(s_filter_node, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon, 0.25); - else if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Filter node", s_filter_node, 0, filter_node == noone? COLORS._main_icon : COLORS._main_accent, 1, 1) == 2) { + else if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Filter node", s_filter_node, 0, filter_node == noone? COLORS._main_icon : COLORS._main_accent, 1, 1) == 2) { filter_node = filter_node == report_selecting.node? noone : report_selecting.node; searchData(); } _bx -= _bs + ui(4); - if(buttonInstant(THEME.button_hide, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Match selecting", s_filter_node_inspector, 0, set_selecting_node? COLORS._main_accent : COLORS._main_icon, 1, 1) == 2) + if(buttonInstant(THEME.button_hide_fill, _bx, _by, _bs, _bs, [ mx, my ], pHOVER, pFOCUS, "Match selecting", s_filter_node_inspector, 0, set_selecting_node? COLORS._main_accent : COLORS._main_icon, 1, 1) == 2) set_selecting_node = !set_selecting_node; _bx -= ui(4); diff --git a/scripts/panel_text_editor/panel_text_editor.gml b/scripts/panel_text_editor/panel_text_editor.gml index 6fcb17a85..5bc34d0bf 100644 --- a/scripts/panel_text_editor/panel_text_editor.gml +++ b/scripts/panel_text_editor/panel_text_editor.gml @@ -27,27 +27,27 @@ function Panel_Text_Editor(_textArea, _inputFunc, _context) : PanelContent() con var bs = ui(32); var txt = shift_new_line? "New line with Shift + Enter" : "New line with Enter"; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.new_line_shift, shift_new_line) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.new_line_shift, shift_new_line) == 2) shift_new_line = !shift_new_line; bx += bs + ui(4); var txt = _textArea.show_line_number? "Hide line number" : "Show line number"; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_show_line, _textArea.show_line_number) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_show_line, _textArea.show_line_number) == 2) _textArea.show_line_number = !_textArea.show_line_number; bx += bs + ui(4); var txt = _textArea.use_autocomplete? "Disable Autocomplete" : "Enable Autocomplete"; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_show_auto, _textArea.use_autocomplete) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_show_auto, _textArea.use_autocomplete) == 2) _textArea.use_autocomplete = !_textArea.use_autocomplete; bx += bs + ui(4); var txt = "Syntax Highlight"; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_syntax_highlight, _textArea.syntax_highlight) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, txt, THEME.code_syntax_highlight, _textArea.syntax_highlight) == 2) _textArea.syntax_highlight = !_textArea.syntax_highlight; bx += bs + ui(4); var bx = w - ui(8) - bs; - if(buttonInstant(THEME.button_hide, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, "Apply", THEME.accept,, COLORS._main_value_positive) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bs, bs, [ mx, my ], pHOVER, pFOCUS, "Apply", THEME.accept,, COLORS._main_value_positive) == 2) _textArea.apply(); bx -= bs + ui(4); diff --git a/scripts/panel_tunnels/panel_tunnels.gml b/scripts/panel_tunnels/panel_tunnels.gml index 4f579c0f0..2efd5b7a4 100644 --- a/scripts/panel_tunnels/panel_tunnels.gml +++ b/scripts/panel_tunnels/panel_tunnels.gml @@ -84,11 +84,11 @@ function Panel_Tunnels() : PanelContent() constructor { var bx = ww - ui(4) - bw; var by = _y + (hg - bh) / 2; - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_tunnel.hover, sc_tunnel.active, __txtx("panel_node_goto", "Go to node"), THEME.node_goto) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, _m, sc_tunnel.hover, sc_tunnel.active, __txtx("panel_node_goto", "Go to node"), THEME.node_goto) == 2) graphFocusNode(node); bx -= ui(32); - if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_tunnel.hover, sc_tunnel.active, __txtx("panel_tunnel_create_tunnel", "Create tunnel out"), THEME.tunnel) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, bw, bh, _m, sc_tunnel.hover, sc_tunnel.active, __txtx("panel_tunnel_create_tunnel", "Create tunnel out"), THEME.tunnel) == 2) { var _node = nodeBuild("Node_Tunnel_Out", build_x, build_y - 8); _node.inputs[0].setValue(key); diff --git a/scripts/pathAnchorBox/pathAnchorBox.gml b/scripts/pathAnchorBox/pathAnchorBox.gml index 666809585..6a2f34af3 100644 --- a/scripts/pathAnchorBox/pathAnchorBox.gml +++ b/scripts/pathAnchorBox/pathAnchorBox.gml @@ -132,7 +132,7 @@ function pathAnchorBox(_onModify) : widget() constructor { var bx = _x + _w / 2 - _bw / 2; var by = _ty + _th / 2 - _bw / 2; - if(buttonInstant(THEME.button_hide, bx, by, _bw, _bw, _m, hover, active, "Linked", THEME.value_link, !_linked, _blend) == 2) + if(buttonInstant(THEME.button_hide_fill, bx, by, _bw, _bw, _m, hover, active, "Linked", THEME.value_link, !_linked, _blend) == 2) onModify(!_linked, _li); resetFocus(); diff --git a/scripts/pathArrayBox/pathArrayBox.gml b/scripts/pathArrayBox/pathArrayBox.gml index daa33c113..cd8ea0365 100644 --- a/scripts/pathArrayBox/pathArrayBox.gml +++ b/scripts/pathArrayBox/pathArrayBox.gml @@ -33,7 +33,7 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor { var _bs = min(_h, ui(32)); if(_w - _bs > ui(100)) { openPath.setFocusHover(active, hover); - openPath.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); + openPath.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill); _w -= _bs + ui(4); } diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index dc0bb4895..61a935db7 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -15,6 +15,7 @@ PREFERENCES.window_fix_height = 800; PREFERENCES.theme = "default"; + PREFERENCES.theme_override = "override"; PREFERENCES.local = "en"; PREFERENCES.font_overwrite = ""; diff --git a/scripts/quarternionBox/quarternionBox.gml b/scripts/quarternionBox/quarternionBox.gml index f5995676c..99697f191 100644 --- a/scripts/quarternionBox/quarternionBox.gml +++ b/scripts/quarternionBox/quarternionBox.gml @@ -102,7 +102,7 @@ function quarternionBox(_onModify) : widget() constructor { var tg = false; tooltip.index = _disp; - var b = buttonInstant(THEME.button_hide, bx, by, _bs, _bs, _m, ihover, iactive, tooltip, THEME.unit_angle, _disp, c_white); + var b = buttonInstant(THEME.button_hide_fill, bx, by, _bs, _bs, _m, ihover, iactive, tooltip, THEME.unit_angle, _disp, c_white); if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true; if(key_mod_press(SHIFT) && mouse_wheel_down()) tg = true; diff --git a/scripts/rangeBox/rangeBox.gml b/scripts/rangeBox/rangeBox.gml index 2b15129ce..0362f0079 100644 --- a/scripts/rangeBox/rangeBox.gml +++ b/scripts/rangeBox/rangeBox.gml @@ -73,13 +73,13 @@ function rangeBox(_type, _onModify) : widget() constructor { if((_w - _bs) / 2 > ui(64)) { if(side_button) { 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_fill); _w -= _bs + ui(4); } var bx = _x; var by = _y + _h / 2 - _bs / 2; - var b = buttonInstant(THEME.button_hide, bx, by, _bs, _bs, _m, hover, active, tooltip, THEME.value_link, linked, _icon_blend); + var b = buttonInstant(THEME.button_hide_fill, bx, by, _bs, _bs, _m, hover, active, tooltip, THEME.value_link, linked, _icon_blend); var tg = false; if(b == 1) { diff --git a/scripts/rotator/rotator.gml b/scripts/rotator/rotator.gml index 6a0ba5ced..d668e6019 100644 --- a/scripts/rotator/rotator.gml +++ b/scripts/rotator/rotator.gml @@ -45,7 +45,7 @@ function rotator(_onModify, _step = -1) : widget() constructor { if(_drawRot && side_button) { 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_fill); _w -= _bs + ui(4); } diff --git a/scripts/scrollBox/scrollBox.gml b/scripts/scrollBox/scrollBox.gml index be116eda9..0a69d8b30 100644 --- a/scripts/scrollBox/scrollBox.gml +++ b/scripts/scrollBox/scrollBox.gml @@ -87,7 +87,7 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor if(extra_button != noone) { extra_button.setFocusHover(active, hover); - extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); + extra_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide_fill); w -= ui(40); } diff --git a/scripts/string_hexadecimal/string_hexadecimal.gml b/scripts/string_hexadecimal/string_hexadecimal.gml index f48401645..6a77c5cae 100644 --- a/scripts/string_hexadecimal/string_hexadecimal.gml +++ b/scripts/string_hexadecimal/string_hexadecimal.gml @@ -43,6 +43,7 @@ function color_get_hex(color, alpha = true) { } function color_from_rgb(str) { + if(!is_string(str)) return str; if(string_length(str) < 6) return -1; var _r = string_hexadecimal(string_copy(str, 1, 2)); diff --git a/scripts/textArea/textArea.gml b/scripts/textArea/textArea.gml index 2932c2c54..4f671154e 100644 --- a/scripts/textArea/textArea.gml +++ b/scripts/textArea/textArea.gml @@ -791,7 +791,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { 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_fill); _w -= _bs + ui(8); } diff --git a/scripts/textBox/textBox.gml b/scripts/textBox/textBox.gml index 1af8db378..bc37db468 100644 --- a/scripts/textBox/textBox.gml +++ b/scripts/textBox/textBox.gml @@ -127,6 +127,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { return self; } + static setColor = function(color) { self.color = color; return self; } static setAlign = function(align) { self.align = align; return self; } static setHide = function(hide) { self.hide = hide; return self; } static setFont = function(font) { self.font = font; return self; } @@ -517,7 +518,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { if(_w - _bs > ui(100) && front_button) { front_button.setFocusHover(active, hover); - front_button.draw(_x, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); + front_button.draw(_x, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill); _x += _bs + ui(4); _w -= _bs + ui(4); @@ -531,7 +532,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { if(_w - _bs > ui(100) && side_button) { 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_fill); _w -= _bs + ui(4); } diff --git a/scripts/theme_definition/theme_definition.gml b/scripts/theme_definition/theme_definition.gml index 3e0d92262..0346ba688 100644 --- a/scripts/theme_definition/theme_definition.gml +++ b/scripts/theme_definition/theme_definition.gml @@ -369,7 +369,7 @@ function Theme() constructor { button_hide_left = s_button_hide_left; button_hide_middle = s_button_hide_middle; button_hide_right = s_button_hide_right; - button_hide = s_button_hide_fill; + button_hide = s_button_hide; button_left = s_button_left; button_lime = s_button_lime; button_middle = s_button_middle; @@ -388,7 +388,7 @@ function ThemeColorDef() constructor { main_mdblack = #1e1e2c; main_black = #272736; main_dkgrey = #3b3b4e; - main_dark = #4da6ff; + main_dark = #505066; main_grey = #6d6d81; main_ltgrey = #7e7e8f; main_mdwhite = #9f9fb5; diff --git a/scripts/vectorBox/vectorBox.gml b/scripts/vectorBox/vectorBox.gml index bb0565927..f5b9e2f39 100644 --- a/scripts/vectorBox/vectorBox.gml +++ b/scripts/vectorBox/vectorBox.gml @@ -117,7 +117,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { if(is(side_button, buttonAnchor)) side_button.index = round(array_safe_get(_data, 0) * 2 + array_safe_get(_data, 1) * 6); 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_fill); _w -= _bs + ui(4); } @@ -131,7 +131,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor { var _icon_blend = linked? COLORS._main_accent : (link_inactive_color == noone? COLORS._main_icon : link_inactive_color); var bx = _x; var by = _y + _h / 2 - _bs / 2; - var b = buttonInstant(THEME.button_hide, bx, by, _bs, _bs, _m, hover, active, tooltip, THEME.value_link, linked, _icon_blend); + var b = buttonInstant(THEME.button_hide_fill, bx, by, _bs, _bs, _m, hover, active, tooltip, THEME.value_link, linked, _icon_blend); var tg = false; if(b == 1) { diff --git a/scripts/vectorRangeBox/vectorRangeBox.gml b/scripts/vectorRangeBox/vectorRangeBox.gml index 2bae540a4..195e634d2 100644 --- a/scripts/vectorRangeBox/vectorRangeBox.gml +++ b/scripts/vectorRangeBox/vectorRangeBox.gml @@ -86,7 +86,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const if((_w - _bs) / 2 > ui(64)) { if(side_button) { 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_fill); _w -= _bs + ui(4); } @@ -94,7 +94,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const var by = _y + _h / 2 - _bs / 2; var bc = linked? COLORS._main_accent : COLORS._main_icon; - if(buttonInstant(THEME.button_hide, bx, by, _bs, _bs, _m, hover, active, __txt("Link axis"), THEME.value_link, linked, bc) == 2) { + if(buttonInstant(THEME.button_hide_fill, bx, by, _bs, _bs, _m, hover, active, __txt("Link axis"), THEME.value_link, linked, bc) == 2) { linked = !linked; _display_data.linked = linked; @@ -107,7 +107,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const by += _h + ui(4); tooltip_ranged.index = ranged; - var b = buttonInstant(THEME.button_hide, bx, by, _bs, _bs, _m, hover, active, tooltip_ranged, THEME.value_range, ranged, COLORS._main_icon); + var b = buttonInstant(THEME.button_hide_fill, bx, by, _bs, _bs, _m, hover, active, tooltip_ranged, THEME.value_range, ranged, COLORS._main_icon); var tg = false; if(b == 1) { if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true; diff --git a/scripts/widget/widget.gml b/scripts/widget/widget.gml index b73d35bbe..dd068ced7 100644 --- a/scripts/widget/widget.gml +++ b/scripts/widget/widget.gml @@ -150,6 +150,9 @@ function widgetParam(x, y, w, h, data, display_data = {}, m = mouse_ui, rx = 0, interact = undefined; scrollpane = undefined; + static setX = function(_x) { x = _x; return self; } + static setY = function(_y) { y = _y; return self; } + static setData = function(d) { data = d; return self; } static setColor = function(c) { color = c; return self; } static setFont = function(f) { font = f; return self; } static setScrollpane = function(s) { scrollpane = s; return self; }