theme sprite, font views

This commit is contained in:
Tanasart 2025-01-05 17:21:56 +07:00
parent 6e98b274e6
commit 68163c4ec6
86 changed files with 818 additions and 306 deletions

View file

@ -58,7 +58,7 @@ if(DIALOG_SHOW_FOCUS) DIALOG_DRAW_FOCUS
var bx = dialog_x + dialog_w - ui(44); var bx = dialog_x + dialog_w - ui(44);
var by = dialog_y + ui(16); 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(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_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; 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; 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); 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(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_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; 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; var cc = node_show_connectable? COLORS._main_accent : COLORS._main_icon;
bx -= ui(32); 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(b == 2) node_show_connectable = !node_show_connectable;
} }
if(search_string != "") { if(search_string != "") {
var txt = __txtx("add_node_highlight", "Hightlight Query"); var txt = __txtx("add_node_highlight", "Hightlight Query");
bx -= ui(32); 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; PREFERENCES.dialog_add_node_search_high = !PREFERENCES.dialog_add_node_search_high;
} }
#endregion #endregion

View file

@ -44,16 +44,16 @@ if !ready exit;
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28); 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(); __initPalette();
bx -= ui(32); 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"); shellOpenExplorer($"{DIRECTORY}Palettes");
draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white); draw_sprite_ui_uniform(THEME.path_open_20, 1, bx + bs / 2, by + bs / 2, 1, c_white);
bx -= ui(32); 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; NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE;
bx -= ui(32); bx -= ui(32);
#endregion #endregion
@ -78,5 +78,5 @@ if !ready exit;
bx -= ui(48); bx -= ui(48);
b_cancel.register(); b_cancel.register();
b_cancel.setFocusHover(sFOCUS, sHOVER); 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 #endregion

View file

@ -46,7 +46,7 @@
var icon = THEME.accept; var icon = THEME.accept;
var clr = COLORS._main_value_positive; 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 icon = THEME.cross;
var clr = COLORS._main_value_negative; 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(); instance_destroy();
} }

View file

@ -29,7 +29,7 @@
var bx = dialog_x + dialog_w - ui(8) - bw; var bx = dialog_x + dialog_w - ui(8) - bw;
var by = dialog_y + ui(24) - bh / 2; 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(); instance_destroy();
bx -= bw + ui(4); bx -= bw + ui(4);
@ -59,7 +59,7 @@
instance_destroy(); instance_destroy();
} else { } 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) if(meta.author_steam_id == 0)
meta.author_steam_id = STEAM_USER_ID; meta.author_steam_id = STEAM_USER_ID;
@ -107,7 +107,7 @@
bx -= bw + ui(4); bx -= bw + ui(4);
var txt = __txtx("new_collection_meta_edit", "Edit metadata"); 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(); doExpand();
#endregion #endregion

View file

@ -49,7 +49,7 @@ if !ready exit;
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28); 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)); var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8));
dia.onModify = function (txt) { dia.onModify = function (txt) {
var gradStr = ""; var gradStr = "";
@ -66,11 +66,11 @@ if !ready exit;
} }
bx -= ui(32); 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(); __initGradient();
bx -= ui(32); 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"; var _realpath = DIRECTORY + "Gradients";
shellOpenExplorer(_realpath) shellOpenExplorer(_realpath)
} }
@ -87,7 +87,7 @@ if !ready exit;
var bx = palette_x + palette_w - ui(44); var bx = palette_x + palette_w - ui(44);
var by = dialog_y + ui(12); 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; NODE_COLOR_SHOW_PALETTE = !NODE_COLOR_SHOW_PALETTE;
bx -= ui(32); bx -= ui(32);
#endregion #endregion
@ -98,7 +98,7 @@ if !ready exit;
var bx = content_x + content_w - ui(50); var bx = content_x + content_w - ui(50);
var by = dialog_y + ui(16); 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", [ menuCall("gradient_window_blend_menu", [
menuItem(__txtx("gradient_editor_blend_hard", "Solid"), function() { gradient.type = 1; onApply(gradient); }), 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); }), menuItem(__txtx("gradient_editor_blend_RGB", "RGB"), function() { gradient.type = 0; onApply(gradient); }),
@ -108,7 +108,7 @@ if !ready exit;
} }
bx -= ui(32); 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++ ) for( var i = 0, n = array_length(gradient.keys); i < n; i++ )
gradient.keys[i].time = 1 - gradient.keys[i].time; gradient.keys[i].time = 1 - gradient.keys[i].time;
gradient.keys = array_reverse(gradient.keys); gradient.keys = array_reverse(gradient.keys);
@ -256,5 +256,5 @@ if !ready exit;
bx -= ui(48); bx -= ui(48);
b_cancel.register(); b_cancel.register();
b_cancel.setFocusHover(sFOCUS, sHOVER); 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 #endregion

View file

@ -95,7 +95,7 @@ event_inherited();
if(dragging == disp) { if(dragging == disp) {
draw_sprite_ui(THEME.hamburger_s, 0, hg / 2, _y + hg / 2,,,, COLORS._main_accent, 1); 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; _y += hg + padd;

View file

@ -24,7 +24,7 @@ if !ready exit;
if(type == CONNECT_TYPE.input) { if(type == CONNECT_TYPE.input) {
var _txt = __txtx("dialog_group_order_add", "Add separator"); 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 ]); array_push(node.attributes.input_display_list, [ "Separator", false ]);
node.sortIO(); node.sortIO();
} }

View file

@ -57,7 +57,7 @@ event_inherited();
if(dragging == disp) { if(dragging == disp) {
draw_sprite_ui(THEME.hamburger_s, 0, hg / 2, _y + hg / 2,,,, COLORS._main_accent, 1); 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; _y += hg + padd;

View file

@ -27,7 +27,7 @@ if !target exit;
var bx = dialog_x + dialog_w - ui(padding - 8) - bw; var bx = dialog_x + dialog_w - ui(padding - 8) - bw;
var by = dialog_y + ui(18); 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", ""); var path = get_open_filenames_compat("image|*.png;*.jpg", "");
key_release(); key_release();
@ -44,6 +44,6 @@ if !target exit;
bx -= ui(36); 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(); sortByName();
#endregion #endregion

View file

@ -43,7 +43,7 @@ if palette == 0 exit;
var by = dialog_y + ui(12); var by = dialog_y + ui(12);
var bs = ui(28); 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)); var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8));
dia.onModify = function (txt) { dia.onModify = function (txt) {
var file = file_text_open_write(txt + ".hex"); var file = file_text_open_write(txt + ".hex");
@ -63,11 +63,11 @@ if palette == 0 exit;
} }
bx -= ui(32); 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(); __initPalette();
bx -= ui(32); 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"; var _realpath = DIRECTORY + "Palettes";
shellOpenExplorer(_realpath) 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 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 _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) mouse_draggable = false;
if(b == 2) { if(b == 2) {
menuCall("palette_window_sort_menu", [ menuCall("palette_window_sort_menu", [
@ -98,7 +98,7 @@ if palette == 0 exit;
bx -= ui(32); bx -= ui(32);
var _txt = index_selecting[1] < 2? __txtx("palette_editor_reverse", "Reverse palette") : __txtx("palette_editor_reverse_selected", "Reverse selected"); 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) mouse_draggable = false;
if(b == 2) { if(b == 2) {
@ -358,7 +358,7 @@ if palette == 0 exit;
var by = pl_y - ui(2); var by = pl_y - ui(2);
if(array_length(palette) > 1) { 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]); array_delete(palette, index_selecting[0], index_selecting[1]);
if(array_empty(palette)) if(array_empty(palette))
palette = [ c_black ]; palette = [ c_black ];
@ -371,7 +371,7 @@ if palette == 0 exit;
} }
bx -= ui(32); 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; palette[array_length(palette)] = c_black;
index_selecting = [ array_length(palette), 1 ]; index_selecting = [ array_length(palette), 1 ];
@ -379,7 +379,7 @@ if palette == 0 exit;
} }
bx = content_x + ui(18); 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", ""); var path = get_open_filename_pxc("HEX palette|*.hex", "");
key_release(); key_release();
@ -409,5 +409,5 @@ if palette == 0 exit;
bx -= ui(48); bx -= ui(48);
b_cancel.register(); b_cancel.register();
b_cancel.setFocusHover(sFOCUS, sHOVER); 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 #endregion

View file

@ -62,7 +62,7 @@ if(content.showHeader) {
var _bs = ui(20); var _bs = ui(20);
if(instanceof(content) != "Panel_Menu") 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 DIALOG_POSTDRAW
onDestroy(); onDestroy();
instance_destroy(); instance_destroy();
@ -77,7 +77,7 @@ if(content.showHeader) {
_bx -= _bs; _bx -= _bs;
_b.setFocusHover(sFOCUS, sHOVER); _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); _bs -= ui(4);
} }
} }
@ -91,7 +91,7 @@ var ss = content.showHeader? ui(20) : ui(28);
var sc = content.showHeader? 0.75 : 1; var sc = content.showHeader? 0.75 : 1;
if(window == noone && instanceof(content) != "Panel_Menu") { 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; if(b == 2) destroy_on_click_out = !destroy_on_click_out;
} }

View file

@ -12,7 +12,7 @@ if !ready exit;
var _by = dialog_y + ui(8); var _by = dialog_y + ui(8);
var _bs = ui(20); 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 DIALOG_POSTDRAW
onDestroy(); onDestroy();
instance_destroy(); instance_destroy();

View file

@ -4,7 +4,7 @@ event_inherited();
#region data #region data
dialog_w = min(WIN_W - ui(16), ui(1000)); dialog_w = min(WIN_W - ui(16), ui(1000));
dialog_h = min(WIN_H - ui(16), ui(700)); dialog_h = min(WIN_H - ui(16), ui(700));
page_width = ui(160); page_width = ui(128);
// title_height = 8; // title_height = 8;
destroy_on_click_out = true; destroy_on_click_out = true;
@ -35,7 +35,6 @@ event_inherited();
sp_pref.resize( panel_width, panel_height); sp_pref.resize( panel_width, panel_height);
sp_hotkey.resize(panel_width, hotkey_height); sp_hotkey.resize(panel_width, hotkey_height);
sp_colors.resize(panel_width, panel_height - ui(40));
} }
#endregion #endregion
@ -57,14 +56,14 @@ event_inherited();
var hh = 0; var hh = 0;
var yl = _y; var yl = _y;
var hg = line_get_height(f_p0, 16); var hg = line_get_height(f_p1, 8);
var hs = line_get_height(f_p1, 8); var hs = line_get_height(f_p2, 8);
for(var i = 0; i < array_length(page); i++) { 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); if(i == page_current) draw_set_text(f_p1b, fa_left, fa_center, COLORS._main_text_accent);
else draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text_inner); 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; sp_page.hover_content = true;
draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, 0, yl, ww, hg, CDEF.main_white, 1); 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++ ) { for( var j = 0, m = array_length(sections[i]); j < m; j++ ) {
var sect = sections[i][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)) { if(sHOVER && point_in_rectangle(_m[0], _m[1], 0, yl, ww, yl + hs - 1)) {
sp_page.hover_content = true; sp_page.hover_content = true;
@ -568,7 +567,12 @@ event_inherited();
#endregion #endregion
#region theme #region theme
////- Themes
themes = []; themes = [];
themeCurrent = noone;
var f = file_find_first(DIRECTORY + "Themes/*", fa_directory); var f = file_find_first(DIRECTORY + "Themes/*", fa_directory);
while(f != "") { while(f != "") {
var _file = f; var _file = f;
@ -587,8 +591,12 @@ event_inherited();
} }
var _meta = json_load_struct(_metaPath); 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); 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."; if(_meta.version < VERSION) _item.tooltip = "Theme made for earlier version.";
array_push(themes, _item); array_push(themes, _item);
@ -596,9 +604,11 @@ event_inherited();
file_find_close(); file_find_close();
sb_theme = new scrollBox(themes, function(index) { sb_theme = new scrollBox(themes, function(index) {
var thm = themes[index].data; var dat = themes[index].data;
var thm = dat.file;
if(PREFERENCES.theme == thm) return; if(PREFERENCES.theme == thm) return;
themeCurrent = dat;
PREFERENCES.theme = thm; PREFERENCES.theme = thm;
PREF_SAVE(); PREF_SAVE();
@ -606,16 +616,117 @@ event_inherited();
loadColor(thm); loadColor(thm);
loadFonts(); loadFonts();
}, false); }, false);
sb_theme.font = f_p2;
sb_theme.align = fa_left; 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); 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 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 yy = _y + ui(8);
var padx = ui(8); var padx = ui(0);
var pady = ui(6); var pady = ui(6);
var th = line_get_height(font); var th = line_get_height(font);
var ind = 0; var ind = 0;
@ -623,8 +734,8 @@ event_inherited();
var cp = ui(0) var cp = ui(0)
var cw = ui(100); var cw = ui(100);
var ch = th - cp * 2; var ch = th - cp * 2;
var cx = x1 - cw - padx * 2 - ui(8); var cx = x1 - cw - padx - ui(24 + 8);
var category = ""; var category = "", cat;
var group_labels = []; var group_labels = [];
var sectH = ui(24); var sectH = ui(24);
@ -633,6 +744,72 @@ event_inherited();
var _search_text = string_lower(search_text); 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++ ) { for( var i = 0, n = array_length(COLOR_KEYS); i < n; i++ ) {
var key = COLOR_KEYS[i]; var key = COLOR_KEYS[i];
var val = COLORS[$ key]; var val = COLORS[$ key];
@ -648,7 +825,7 @@ event_inherited();
var _sect = string_title(category); var _sect = string_title(category);
var _coll = struct_try_get(collapsed, cat, 0); 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 }); array_push(group_labels, { y: yy, text: _sect, key: cat });
if(yy >= 0 && section_current == "") section_current = psect; if(yy >= 0 && section_current == "") section_current = psect;
@ -667,29 +844,80 @@ event_inherited();
keyStr = string_replace(keyStr, cat + " ", ""); keyStr = string_replace(keyStr, cat + " ", "");
keyStr = string_title(keyStr); keyStr = string_title(keyStr);
draw_set_text(font, fa_left, fa_center, COLORS._main_text); var cy = yy + th / 2;
draw_text_add(ui(32), yy + th / 2, keyStr);
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); 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) { if(b == 2) {
color_selector_key = key; color_selector_key = key;
var clrSelect = dialogCall(o_dialog_color_selector) var clrSelect = dialogCall(o_dialog_color_selector)
.setDefault(val) .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); 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; yy += th + pady * 2;
hh += th + pady * 2; hh += th + pady * 2;
ind++; ind++;
} }
#region section label #region ------------ section label ------------
var len = array_length(group_labels); var len = array_length(group_labels);
if(len && group_labels[0].y < 0) { if(len && group_labels[0].y < 0) {
gpu_set_blendmode(bm_subtract); gpu_set_blendmode(bm_subtract);
@ -707,13 +935,13 @@ event_inherited();
var _coll = struct_try_get(collapsed, _key, 0); 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 _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; var _tc = CDEF.main_ltgrey;
BLEND_OVERRIDE 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); 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) { if(DOUBLE_CLICK) {
_cAll = _coll? -1 : 1; _cAll = _coll? -1 : 1;
@ -740,13 +968,154 @@ event_inherited();
return hh + ui(16); return hh + ui(16);
}); });
function overrideColor(key) { function overrideColor(key, val) {
var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/override.json"; var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/{PREFERENCES.theme_override}.json";
var json = file_exists_empty(path)? json_load_struct(path) : {}; 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); 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 #endregion
#region hotkey #region hotkey
@ -864,12 +1233,12 @@ event_inherited();
var cc = c_white; var cc = c_white;
if(hk_editing == key) { 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; cc = COLORS._main_text_accent;
} else { } else {
if(_hov && point_in_rectangle(_m[0], _m[1], bx, by, bx + bw, by + bh)) { 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); draw_sprite_stretched_ext(THEME.ui_panel, 1, bx, by, bw, bh, CDEF.main_ltgrey);
sp_hotkey.hover_content = true; sp_hotkey.hover_content = true;
cc = CDEF.main_white; cc = CDEF.main_white;
@ -891,7 +1260,7 @@ event_inherited();
modified = true; modified = true;
var bx = _ww - ui(32); var bx = _ww - ui(32);
var by = _yy + th / 2 - ui(12); 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) sp_hotkey.hover_content = true;
if(b == 2) { if(b == 2) {
@ -1024,7 +1393,7 @@ event_inherited();
if(isEqual(data, _defVal)) if(isEqual(data, _defVal))
draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark);
else { 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); _pref.onEdit(_defVal);
} }
} }

View file

@ -10,7 +10,7 @@ if !ready exit;
var bx = dialog_x + ui(24); var bx = dialog_x + ui(24);
var by = dialog_y + ui(18); 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) 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; destroy_on_click_out = !destroy_on_click_out;
@ -67,29 +67,30 @@ if !ready exit;
sp_pref.draw(px, py); sp_pref.draw(px, py);
} else if(page_current == 3) { } else if(page_current == 3) {
var _w = ui(200); var _sp_x = ui(296);
var _h = ui(32); var _sp_y = ui(28);
var _x = dialog_x + dialog_w - ui(8); var x1 = px + _sp_x - ui(8);
var bx = _x - ui(48); sp_theme.verify(_sp_x - ui(8), panel_height);
var _txt = __txtx("pref_reset_color", "Reset colors"); sp_theme.setFocusHover(sFOCUS, sHOVER);
var b = buttonInstant(THEME.button_hide, bx, py, ui(32), ui(32), mouse_ui, sHOVER, sFOCUS, _txt, THEME.refresh_icon); sp_theme.draw(px, py);
if(b == 2) {
var path = $"{DIRECTORY}Themes/{PREFERENCES.theme}/override.json"; var _res_w = panel_width - _sp_x;
if(file_exists_empty(path)) file_delete(path);
loadColor(PREFERENCES.theme); 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; sp.verify(_res_w, panel_height - _sp_y);
var x2 = _x - ui(32); sp.setFocusHover(sFOCUS, sHOVER);
sp.draw(px + _sp_x, py + _sp_y);
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));
} else if(page_current == 4) { } else if(page_current == 4) {
if(mouse_press(mb_left, sFOCUS)) if(mouse_press(mb_left, sFOCUS))

View file

@ -22,7 +22,7 @@ if !ready exit;
var bx = dialog_x + dialog_w - ui(32 + 16); var bx = dialog_x + dialog_w - ui(32 + 16);
var by = dialog_y + ui(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; adding = !adding;
if(adding) tb_add.activate(); if(adding) tb_add.activate();
} }

View file

@ -21,7 +21,7 @@
draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h); draw_sprite_stretched(THEME.textbox, 1, dialog_x, dialog_y, dialog_w, dialog_h);
if(search_string == "") 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; horizon = !horizon;
setSize(); setSize();
} }

View file

@ -52,20 +52,20 @@ if !ready exit;
var bx = x1 - ui(28); var bx = x1 - ui(28);
var by = y0 - ui(28 + 4); var by = y0 - ui(28 + 4);
var txt = __txtx("splash_clear_recent", "Clear recent files"); 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); ds_list_clear(RECENT_FILES);
RECENT_SAVE(); RECENT_SAVE();
} }
// bx -= ui(28 + 4); // bx -= ui(28 + 4);
// txt = recent_thumbnail? __txtx("splash_hide_thumbnail", "Hide thumbnail") : __txtx("splash_show_thumbnail", "Show thumbnail"); // 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; // recent_thumbnail = !recent_thumbnail;
// } // }
bx -= ui(28 + 4); bx -= ui(28 + 4);
txt = __txtx("splash_open_autosave", "Open autosave folder"); 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"); shellOpenExplorer(DIRECTORY + "autosave");
} }

View file

@ -211,7 +211,7 @@ function Panel_Linear_Setting() : PanelContent() constructor {
if(isEqual(_data, _defVal)) if(isEqual(_data, _defVal))
draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark); draw_sprite_ext(THEME.refresh_16, 0, _bx + _bs / 2, _by + _bs / 2, 1, 1, 0, COLORS._main_icon_dark);
else { 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); _prop.onEdit(_defVal);
} }
} }

View file

@ -167,7 +167,7 @@ function Tileset_Rule(_tileset) : Inspector_Custom_Renderer(noone, noone) constr
var by = _yy; var by = _yy;
var bs = ui(24); 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(); var _new_rl = new tiler_rule();
_new_rl.name = $"rule {array_length(ruleTiles)}" _new_rl.name = $"rule {array_length(ruleTiles)}"
_new_rl.open = true; _new_rl.open = true;
@ -224,7 +224,7 @@ function Tileset_Rule(_tileset) : Inspector_Custom_Renderer(noone, noone) constr
var bs = ui(24); var bs = ui(24);
var bx = _w - bs - ui(4); var bx = _w - bs - ui(4);
var by = _yy + _hg / 2 - bs / 2; 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; del = i;
} }

View file

@ -210,7 +210,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
var _bx = _x + _w - _bs; var _bx = _x + _w - _bs;
var _by = _y + _h / 2 - _bs / 2; 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(b == 1) {
if(key_mod_press(SHIFT) && mouse_wheel_up()) mode = setMode(_data, (mode - 1 + 3) % 3); 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); 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 _by = _y + _h + ui(4) + _h / 2 - _bs / 2;
var _btxt = __txtx("widget_area_fill_surface", "Fill surface"); 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; var cnvt = unit != noone && unit.mode == VALUE_UNIT.reference;
switch(mode) { switch(mode) {
@ -256,7 +256,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
var _bx = _x; var _bx = _x;
var _by = _y + _h / 2 - _bs / 2; 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; var val = (array_safe_get_fast(_data, 4) + 1) % 2;
onModify(val, 4); onModify(val, 4);
} }
@ -266,7 +266,7 @@ function areaBox(_onModify, _unit = noone) : widget() constructor {
var _btxt = __txt("Link values"); var _btxt = __txt("Link values");
var _bby = useShape? _by + _h + ui(4) : _y + h / 2 - _bs / 2; 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; link_value = !link_value;
} }

View file

@ -371,6 +371,13 @@ function array_insert_before(arr, before, values) {
array_insert(arr, _ind + i, values[i]); 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_overwrite
#macro __array_equals array_equals #macro __array_equals array_equals

View file

@ -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.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_blend = c_white;
b_picker.icon_index = 0; 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) { 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); _cw -= ui(32 + 4);
b_quick_pick.setFocusHover(active, hover); 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); _cw -= ui(8);

View file

@ -59,7 +59,7 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor {
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(8); _w -= _bs + ui(8);
} }

View file

@ -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); 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; x = _x;
y = _y; y = _y;
w = _w; w = _w;

View file

@ -54,7 +54,7 @@ function buttonPalette(_onApply, dialog = noone) : widget() constructor {
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w -_bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w -_bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(8); _w -= _bs + ui(8);
} }

View file

@ -1,35 +1,109 @@
#region colors #region colors
globalvar CDEF, COLORS, THEME_VALUE; globalvar THEME_VALUE;
globalvar CDEF, COLORS, COLORS_KEYS;
globalvar COLORS_DEF, COLORS_OVERRIDE;
CDEF = new ThemeColorDef(); CDEF = new ThemeColorDef();
COLORS = new ThemeColor(); COLORS = new ThemeColor();
THEME_VALUE = new ThemeValue(); 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 #endregion
function loadColor(theme = "default") { function loadColor(theme = "default") {
CDEF = new ThemeColorDef(); CDEF = new ThemeColorDef();
COLORS = new ThemeColor(); COLORS = new ThemeColor();
THEME_VALUE = new ThemeValue(); THEME_VALUE = new ThemeValue();
COLORS_KEYS = {};
COLORS_OVERRIDE = {};
COLORS_DEF = {
colors: new ThemeColorDef(),
define: new ThemeColor(),
};
_loadColor(theme); _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) { function _loadColor(theme = "default", replace = false) {
var t = get_timer(); var t = get_timer();
var dirr = DIRECTORY + "Themes/" + theme; var dirr = DIRECTORY + "Themes/" + theme;
var path = dirr + "/values.json"; var path = $"{dirr}/values.json";
var pathO = dirr + "/override.json"; var pathO = $"{dirr}/{PREFERENCES.theme_override}.json";
COLOR_KEYS = variable_struct_get_names(COLORS); COLOR_KEYS = variable_struct_get_names(COLORS);
array_sort(COLOR_KEYS, true); 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; } if(!file_exists_empty(path)) { noti_status($"Colors not defined at {path}, rollback to default color."); return; }
var clrs = json_load_struct(path); var clrs = json_load_struct(path);
if(!struct_has(clrs, "values")) { print("Load color error"); return; } if(!struct_has(clrs, "values")) { print("Load color error"); return; }
COLORS_KEYS = clrs;
////- Value (parameters) ////- Value (parameters)
var valkeys = variable_struct_get_names(clrs.values); var valkeys = variable_struct_get_names(clrs.values);
@ -38,37 +112,80 @@ function _loadColor(theme = "default", replace = false) {
////- Colors ////- Colors
var defkeys = variable_struct_get_names(clrs.define);
var clrkeys = variable_struct_get_names(clrs.colors); 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 arrkeys = variable_struct_get_names(clrs.array);
var override = file_exists_empty(pathO)? json_load_struct(pathO) : {}; var override = file_exists_empty(pathO)? json_load_struct(pathO) : {};
COLORS_OVERRIDE = override;
for( var i = 0, n = array_length(clrkeys); i < n; i++ ) { for( var i = 0, n = array_length(clrkeys); i < n; i++ ) {
var key = clrkeys[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); CDEF[$ key] = color_from_rgb(str);
} }
for( var i = 0, n = array_length(defkeys); i < n; i++ ) { for( var i = 0, n = array_length(defkeys); i < n; i++ ) {
var key = defkeys[i]; var key = defkeys[i];
var def = struct_has(override, key)? override[$ key] : clrs.define[$ key];
var c = c_white; var c = c_white;
var def = clrs.define[$ key];
if(is_array(def)) c = merge_color(CDEF[$ def[0]], CDEF[$ def[1]], def[2]); COLORS_DEF.define[$ key] = def;
else c = struct_has(CDEF, def)? CDEF[$ def] : color_from_rgb(def);
COLORS[$ key] = c; 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++ ) { for( var i = 0, n = array_length(arrkeys); i < n; i++ ) {
var key = arrkeys[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)); var c = array_create(array_length(def));
for( var j = 0; j < array_length(def); j++ ) 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; COLORS[$ key] = c;
} }

View file

@ -414,7 +414,7 @@ function colorSelector(onApply = noone) constructor {
cx += ui(48); cx += ui(48);
if(interactable) 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; dropper_active = true;
} }
} }

View file

@ -81,7 +81,7 @@ function cornerBox(_onModify, _unit = noone) : widget() constructor {
var _bx = _x; var _bx = _x;
var _by = _y + _h / 2 - _bs / 2; 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); _w -= _bs + ui(4);
_x += _bs + ui(4); _x += _bs + ui(4);

View file

@ -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_set_color draw_set_color
#macro draw_clear draw_clear_ext_override #macro draw_clear draw_clear_ext_override

View file

@ -6,6 +6,7 @@ function draw_text_line(_x, _y, _text, _sep, _w, forceCut = false) {
function draw_text_add(_x, _y, _text, scale = 1) { function draw_text_add(_x, _y, _text, scale = 1) {
INLINE INLINE
BLEND_ALPHA_MULP BLEND_ALPHA_MULP
// BLEND_OVERRIDE
if(scale == 1) draw_text(round(_x), round(_y), _text); if(scale == 1) draw_text(round(_x), round(_y), _text);
else draw_text_transformed(round(_x), round(_y), _text, scale, scale, 0); else draw_text_transformed(round(_x), round(_y), _text, scale, scale, 0);
BLEND_NORMAL BLEND_NORMAL

View file

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

View file

@ -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_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; globalvar f_code, f_sdf, f_sdf_medium;
@ -10,6 +10,7 @@ global.LINE_HEIGHTS = {};
FONT_CUST_CACHE = {}; FONT_CUST_CACHE = {};
FONT_ISLOADED = false; FONT_ISLOADED = false;
GLYPH_MAP = {}; GLYPH_MAP = {};
FONT_LIST = {};
f_h1 = _f_h1; f_h1 = _f_h1;
f_h2 = _f_h2; f_h2 = _f_h2;
@ -111,6 +112,11 @@ function _font_path(rel) {
return defPath; 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) { function _font_load_from_struct(str, name, def, over = true) {
if(!struct_has(str, name)) return def; 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 _sdf = struct_try_get(font, "sdf", false);
var _font = _font_add(path, round(font.size * UI_SCALE), _sdf); var _font = _font_add(path, round(font.size * UI_SCALE), _sdf);
FONT_LIST[$ name] = { data: str, font: _font }
return _font; return _font;
} }
function font_clear(font) { if(font_exists(font)) font_delete(font); } function font_clear(font) { if(font_exists(font)) font_delete(font); }
function loadFonts() { function loadFonts() {
if(FONT_ISLOADED) { if(FONT_ISLOADED) {
font_clear(f_h1); font_clear(f_h1);
font_clear(f_h2); font_clear(f_h2);
@ -162,24 +171,26 @@ function loadFonts() {
var path = _font_path("./fonts.json"); var path = _font_path("./fonts.json");
FONT_LIST = {};
if(FONT_DEF || !file_exists_empty(path)) { if(FONT_DEF || !file_exists_empty(path)) {
f_h1 = _f_h1; f_h1 = _font_load_default("h1", _f_h1);
f_h2 = _f_h2; f_h2 = _font_load_default("h2", _f_h2);
f_h3 = _f_h3; f_h3 = _font_load_default("h3", _f_h3);
f_h5 = _f_h5; f_h5 = _font_load_default("h5", _f_h5);
f_p0 = _f_p0; f_p0 = _font_load_default("p0", _f_p0);
f_p0b = _f_p0b; f_p0b = _font_load_default("p0b", _f_p0b);
f_p1 = _f_p1; f_p1 = _font_load_default("p1", _f_p1);
f_p1b = _f_p1b; f_p1b = _font_load_default("p1b", _f_p1b);
f_p2 = _f_p2; f_p2 = _font_load_default("p2", _f_p2);
f_p2b = _f_p2b; f_p2b = _font_load_default("p2b", _f_p2b);
f_p3 = _f_p3; f_p3 = _font_load_default("p3", _f_p3);
f_p4 = _f_p4; f_p4 = _font_load_default("p4", _f_p4);
f_code = _f_code; f_code = _font_load_default("code", _f_code);
f_sdf = _f_sdf; f_sdf = _font_load_default("sdf", _f_sdf);
f_sdf_medium = _f_sdf_medium; f_sdf_medium = _font_load_default("sdf_medium", _f_sdf_medium);
FONT_ISLOADED = false; FONT_ISLOADED = false;
__font_refresh(); __font_refresh();
@ -198,7 +209,7 @@ function loadFonts() {
f_p0b = _font_load_from_struct(fontDef, "p0b", _f_p0b); f_p0b = _font_load_from_struct(fontDef, "p0b", _f_p0b);
f_p1 = _font_load_from_struct(fontDef, "p1", _f_p1); 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_p2 = _font_load_from_struct(fontDef, "p2", _f_p2);
f_p3 = _font_load_from_struct(fontDef, "p3", _f_p3); f_p3 = _font_load_from_struct(fontDef, "p3", _f_p3);

View file

@ -44,7 +44,7 @@
LATEST_VERSION = 1_18_00_0; LATEST_VERSION = 1_18_00_0;
VERSION = 1_18_06_2; VERSION = 1_18_06_2;
SAVE_VERSION = 1_18_05_0; 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; BUILD_NUMBER = 1_18_06_2;
PREF_VERSION = 1_17_1; PREF_VERSION = 1_17_1;

View file

@ -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); 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); _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; del = j;
yy += _wd_h + _pd_h * 2; yy += _wd_h + _pd_h * 2;
hh += _wd_h + _pd_h * 2; hh += _wd_h + _pd_h * 2;

View file

@ -84,7 +84,7 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct
if((_w - _bs) / size > ui(64)) { if((_w - _bs) / size > ui(64)) {
if(extras && instanceof(extras) == "buttonClass") { if(extras && instanceof(extras) == "buttonClass") {
extras.setFocusHover(active, hover); 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); _w -= _bs + ui(8);
} }
@ -104,7 +104,7 @@ function matrixGrid(_type, _size, _onModify, _unit = noone) : widget() construct
var th = _h * size - ui(8); var th = _h * size - ui(8);
var bx = _x; var bx = _x;
var by = _y + th / 2 - _bs / 2; 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); _x += _bs + ui(4);
_w -= _bs + ui(4); _w -= _bs + ui(4);

View file

@ -172,7 +172,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
var _anim = jun.animator; var _anim = jun.animator;
var bx = xx + ww - ui(12); var bx = xx + ww - ui(12);
var by = lb_y; 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) cHov = true;
if(b == 2) { 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 _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) cHov = true;
if(b == 2) { if(b == 2) {
@ -217,7 +217,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
} }
bx -= ui(26); 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) cHov = true;
if(b == 2) { if(b == 2) {
@ -241,7 +241,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
bx -= ui(26 + 12); bx -= ui(26 + 12);
tooltip_loop_type.index = jun.on_end; 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) cHov = true;
if(b == 1) { if(b == 1) {
@ -260,7 +260,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
bx -= bs + ui(4); bx -= bs + ui(4);
if(jun.is_modified) { 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) cHov = true;
if(b == 2) jun.resetValue(); 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); bx -= bs + ui(4);
var ic_b = jun.expUse? c_white : COLORS._main_icon; 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) cHov = true;
if(b == 2) { if(b == 2) {
@ -281,7 +281,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
if(jun.expUse) { if(jun.expUse) {
bx -= bs + ui(4); bx -= bs + ui(4);
var cc = NODE_DROPPER_TARGET == jun? COLORS._main_value_positive : COLORS._main_icon; 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) cHov = true;
if(b == 2) NODE_DROPPER_TARGET = NODE_DROPPER_TARGET == jun? noone : jun; 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) { if(jun.expUse || jun.type == VALUE_TYPE.text) {
bx -= bs + ui(4); bx -= bs + ui(4);
var cc = jun.popup_dialog == noone? COLORS._main_icon : COLORS._main_value_positive; 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) cHov = true;
if(b == 2) { if(b == 2) {
@ -303,7 +303,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
if(jun.bypass_junc) { if(jun.bypass_junc) {
bx -= bs + ui(4); bx -= bs + ui(4);
var ic_b = jun.bypass_junc.visible? COLORS._main_icon_light : COLORS._main_icon; 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) cHov = true;
if(b == 2) { if(b == 2) {

View file

@ -102,7 +102,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var bs = ui(24); var bs = ui(24);
var bx = _x + ui(20); var bx = _x + ui(20);
var by = _y; 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(); createNewInput();
triggerRender(); triggerRender();
} }
@ -145,7 +145,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var bs = ui(24); var bs = ui(24);
var bx = _x1 - bs; var bx = _x1 - bs;
var by = _yy - bs / 2; 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; del_light = i;
} }
} }

View file

@ -15,13 +15,13 @@ function Node_Array(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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; attributes.size = max(attributes.size, (array_length(inputs) - input_fix_len) / data_length ) + 1;
onInputResize(); onInputResize();
} }
var act = attributes.size > 0; 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--; attributes.size--;
onInputResize(); onInputResize();
} }

View file

@ -40,7 +40,7 @@ function Node_Canvas_Group(_x, _y, _group) : Node_Collection(_x, _y, _group) con
var bx = _x; var bx = _x;
var by = _yy; var by = _yy;
var bs = ui(24); 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(); layerAdd();
_h += bs + ui(8); _h += bs + ui(8);

View file

@ -52,22 +52,22 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
var by = _y; var by = _y;
var bs = ui(24); 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(); refreshPalette();
bx += bs + ui(4); bx += bs + ui(4);
var jun = inputs[2]; var jun = inputs[2];
var index = jun.value_from == noone? jun.is_anim : 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); jun.setAnim(!jun.is_anim);
bx += bs + ui(4); bx += bs + ui(4);
var vis = jun.visible; 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; jun.visible = !vis;
bx += bs + ui(4); 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); menuCall("", sort_menu);
var _from = getInputData(1); 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); bx = _x2 - ui(32);
_x2 -= ui(32 + 4); _x2 -= ui(32 + 4);
by = _y0 + ss / 2 - ui(32) / 2; 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) var dialog = dialogCall(o_dialog_color_selector)
.setApply(setColor); .setApply(setColor);
@ -121,7 +121,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
bx = _x2 - ui(32); bx = _x2 - ui(32);
_x2 -= ui(32 + 4); _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); var pick = instance_create(mouse_mx, mouse_my, o_dialog_color_quick_pick);
array_insert(pick.palette, 0, to); array_insert(pick.palette, 0, to);
pick.onApply = setColor; pick.onApply = setColor;

View file

@ -21,14 +21,14 @@ function Node_DLL(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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++; attributes.size++;
refreshDynamicInput(); refreshDynamicInput();
triggerRender(); triggerRender();
} }
var amo = attributes.size; 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--; attributes.size--;
refreshDynamicInput(); refreshDynamicInput();
triggerRender(); triggerRender();

View file

@ -50,14 +50,14 @@ function Node_Equation(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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++; attributes.size++;
refreshDynamicInput(); refreshDynamicInput();
update(); update();
} }
var amo = attributes.size; 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--; attributes.size--;
refreshDynamicInput(); refreshDynamicInput();
update(); update();

View file

@ -58,7 +58,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
var _bx = x1 - 20 - i * 24; var _bx = x1 - 20 - i * 24;
var _by = y0; 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]; 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); draw_sprite_ui_uniform(THEME.circle, 0, _bx + 10, _by + 10, 1, COLORS.histogram[i], 0.5 + histShow[i] * 0.5);
} }

View file

@ -62,7 +62,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
var _bx = x1 - 20 - i * 24; var _bx = x1 - 20 - i * 24;
var _by = y0; 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]; 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); draw_sprite_ui_uniform(THEME.circle, 0, _bx + 10, _by + 10, 1, COLORS.histogram[i], 0.5 + histShow[i] * 0.5);
} }

View file

@ -75,7 +75,7 @@ function Node_Liquefy(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var bs = ui(24); var bs = ui(24);
var bx = _x + ui(20); var bx = _x + ui(20);
var by = _y; 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(); createNewInput();
triggerRender(); triggerRender();
} }
@ -118,7 +118,7 @@ function Node_Liquefy(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
var bs = ui(24); var bs = ui(24);
var bx = _x1 - bs; var bx = _x1 - bs;
var by = _yy - bs / 2; 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; del_light = i;
} }
} }

View file

@ -27,12 +27,12 @@ function Node_MIDI_In(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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(); createNewInput();
} }
var amo = array_length(inputs); 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]; var _out = outputs[array_length(outputs) - 1];
for( var i = 0, n = array_length(_out.value_to); i < n; i++ ) for( var i = 0, n = array_length(_out.value_to); i < n; i++ )
_out.value_to[i].removeFrom(); _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 bs = TEXTBOX_HEIGHT;
var bx = _x; var bx = _x;
var by = _wy; 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; index_watching = index_watching == i? noone : i;
var cc = index_watching == i? COLORS._main_value_negative : COLORS._main_icon; 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); draw_sprite_ext(THEME.circle_16, 0, bx + bs / 2, by + bs / 2, 1, 1, 0, cc, 1);

View file

@ -259,7 +259,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
var by = _fy; var by = _fy;
var bs = ui(24); 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()); array_push(_flares, new __FlarePart());
inputs[5].setValue(_flares); inputs[5].setValue(_flares);
triggerRender(); triggerRender();
@ -267,7 +267,7 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
bx += bs + ui(8); 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); array_delete(_flares, array_length(_flares) - 1, 1);
inputs[5].setValue(_flares); inputs[5].setValue(_flares);
triggerRender(); triggerRender();

View file

@ -49,7 +49,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var bs = ui(24); var bs = ui(24);
var bx = _x + ui(20); var bx = _x + ui(20);
var by = _y; 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(); createNewInput();
triggerRender(); triggerRender();
} }
@ -92,7 +92,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var bs = ui(24); var bs = ui(24);
var bx = _x1 - bs; var bx = _x1 - bs;
var by = _yy - bs / 2; 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; del_light = i;
} }
} }

View file

@ -174,7 +174,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
var bs = ui(24); var bs = ui(24);
var bx = _x + ui(20); var bx = _x + ui(20);
var by = _y; 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(); createNewInput();
triggerRender(); triggerRender();
} }
@ -219,7 +219,7 @@ function Node_Repeat(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
var bs = ui(24); var bs = ui(24);
var bx = _x1 - bs; var bx = _x1 - bs;
var by = _yy - bs / 2; 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; del_animator = i;
} }

View file

@ -8,11 +8,11 @@ function Node_Struct(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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(); addInput();
var amo = attributes.size; 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); deleteInput(array_length(inputs) - data_length);
return _h; return _h;

View file

@ -15,11 +15,11 @@ function Node_Switch(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
var bw = _w / 2 - ui(4); var bw = _w / 2 - ui(4);
var bh = ui(36); 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(); addInput();
var amo = attributes.size; 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); deleteInput(array_length(inputs) - data_length);
return _h; return _h;

View file

@ -30,7 +30,7 @@ function Node_Tile_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var by = _y; var by = _y;
var bs = ui(24); 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(); refreshPalette();
var _cmap = attributes.colorMap; var _cmap = attributes.colorMap;

View file

@ -107,7 +107,7 @@ function Node_Tile_Tileset(_x, _y, _group = noone) : Node(_x, _y, _group) constr
var by = _yy; var by = _yy;
var bs = ui(24); 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_indices = [[]];
brush.brush_width = 0; brush.brush_width = 0;
brush.brush_height = 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); var _lx = bx + bs + ui(8);
bx = _x + _w - bs; 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)) { if(is_surface(_tileSet)) {
var _tdim = surface_get_dimension(_tileSet); var _tdim = surface_get_dimension(_tileSet);
var _sw = _w - _pd * 2; 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 _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"; 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 _new_at = noone;
var _indx = array_create(brush.brush_width * brush.brush_height); 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 by = _yy + _hg / 2 - bs / 2;
var bc = _hov? COLORS._main_value_negative : COLORS._main_icon; 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; 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; 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; 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); 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); 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); 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; 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); var _lx = bx + bs + ui(8);
bx = _x + _w - bs; 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)) { if(is_surface(brush_palette_tile)) {
var _tdim = surface_get_dimension(brush_palette_tile); var _tdim = surface_get_dimension(brush_palette_tile);
var _sw = _w - _pd * 2; 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) if(_brush_tiles < 1)
draw_sprite_uniform(THEME.add_16, 0, bx + bs / 2, by + bs / 2, 1, COLORS._main_icon); 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 _new_at = noone;
var _indx = array_create(brush.brush_width * brush.brush_height); 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 bs = ui(24);
var bx = _w - bs - ui(4); var bx = _w - bs - ui(4);
var by = _yy + _hg / 2 - bs / 2; 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; del = i;
} }

View file

@ -529,7 +529,7 @@ function nodeValueUnit(__nodeValue) constructor {
static draw = function(_x, _y, _w, _h, _m) { static draw = function(_x, _y, _w, _h, _m) {
triggerButton.icon_index = mode; triggerButton.icon_index = mode;
triggerButton.tooltip.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) { static invApply = function(value, index = 0) {

View file

@ -63,7 +63,7 @@ function outputBox() : widget() constructor {
var _bx = _x + _w - ui(8) - _bs; var _bx = _x + _w - ui(8) - _bs;
var _by = _y + ui(8); 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; expand = !expand;
return _hh; return _hh;
@ -118,7 +118,7 @@ function outputStructBox() : widget() constructor {
var _bx = _x + _w - ui(8) - _bs; var _bx = _x + _w - ui(8) - _bs;
var _by = _y + ui(8); 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; expand = !expand;
return _hh; return _hh;

View file

@ -90,7 +90,7 @@ function paddingBox(_onModify, _unit = noone) : widget() constructor {
var _bx = _x; var _bx = _x;
var _by = _y + _h / 2 - _bs / 2; 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); _w -= _bs + ui(4);
_x += _bs + ui(4); _x += _bs + ui(4);

View file

@ -116,12 +116,12 @@ function Panel_Addon() : PanelContent() constructor {
var _bx = bx - ui(4); var _bx = bx - ui(4);
var _by = by + 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) hover = false;
if(b == 2) shellOpenExplorer(DIRECTORY + "Addons/" + _addon.name); if(b == 2) shellOpenExplorer(DIRECTORY + "Addons/" + _addon.name);
_bx -= ui(36) _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; var _addObj = noone;
with(_addon_custom) if(name == _addon.name) _addObj = self; with(_addon_custom) if(name == _addon.name) _addObj = self;

View file

@ -2519,7 +2519,7 @@ function Panel_Animation() : PanelContent() constructor {
var cc = IS_RENDERING? COLORS._main_icon_dark : but[2](); var cc = IS_RENDERING? COLORS._main_icon_dark : but[2]();
var fnc = but[3]; 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(); fnc();
bx += ui(36); bx += ui(36);
@ -2569,11 +2569,11 @@ function Panel_Animation() : PanelContent() constructor {
by += ui(36); by += ui(36);
bx = w - ui(44); 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 }); 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; 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 }); dialogPanelCall(new Panel_Animation_Scaler(), x + bx + ui(32), y + by - ui(8), { anchor: ANCHOR.right | ANCHOR.bottom });
var max_y = by - ui(28); var max_y = by - ui(28);
@ -2581,14 +2581,14 @@ function Panel_Animation() : PanelContent() constructor {
by = ui(8); by = ui(8);
var txt = __txt("New folder"); 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(); var _dir = new timelineItemGroup();
PROJECT.timelines.addItem(_dir); PROJECT.timelines.addItem(_dir);
} }
by += ui(32); if(by > max_y) return; by += ui(32); if(by > max_y) return;
node_name_tooltip.index = node_name_type; 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(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_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; 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; 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; 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; show_nodes = !show_nodes;
by += ui(32); if(by > max_y) return; by += ui(32); if(by > max_y) return;
txt = __txtx("panel_animation_keyframe_override", "Override Keyframe"); 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; global.FLAG.keyframe_override = !global.FLAG.keyframe_override;
by += ui(32); if(by > max_y) return; by += ui(32); if(by > max_y) return;
txt = __txt("Onion skin"); 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; PROJECT.onion_skin.enabled = !PROJECT.onion_skin.enabled;
} }

View file

@ -828,7 +828,7 @@ function Panel_Collection() : PanelContent() constructor {
var by = ui(9); var by = ui(9);
var bs = ui(32); 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(); search_toggle();
bx -= ui(36); bx -= ui(36);
@ -847,7 +847,7 @@ function Panel_Collection() : PanelContent() constructor {
if(bx < rootx) return; if(bx < rootx) return;
if(context != root) { if(context != root) {
var txt = __txtx("panel_collection_add_node", "Add selecting node as collection"); 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) { if(PANEL_INSPECTOR.getInspecting() != noone) {
data_path = context.path; data_path = context.path;
var dia = dialogCall(o_dialog_file_name_collection, mouse_mx + ui(8), mouse_my + ui(8)); 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; if(bx < rootx) return;
var txt = __txtx("panel_collection_add_folder", "Add folder"); 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) { fileNameCall(context.path, function (txt) {
directory_create(txt); directory_create(txt);
refreshContext(); refreshContext();
@ -878,14 +878,14 @@ function Panel_Collection() : PanelContent() constructor {
if(pageStr[page] != "Nodes") { if(pageStr[page] != "Nodes") {
if(bx < rootx) return; if(bx < rootx) return;
var txt = __txtx("panel_collection_open_file", "Open in file explorer"); 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); shellOpenExplorer(context.path);
draw_sprite_ui_uniform(THEME.path_open, 1, bx + bs / 2, by + bs / 2, 1, c_white); draw_sprite_ui_uniform(THEME.path_open, 1, bx + bs / 2, by + bs / 2, 1, c_white);
bx -= ui(36); bx -= ui(36);
if(bx < rootx) return; if(bx < rootx) return;
var txt = __txt("Refresh"); 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(); refreshContext();
bx -= ui(36); bx -= ui(36);
@ -893,7 +893,7 @@ function Panel_Collection() : PanelContent() constructor {
if(bx < rootx) return; if(bx < rootx) return;
var txt = __txt("Settings"); 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 }); dialogPanelCall(new Panel_Collections_Setting(), x + bx, y + by - 8, { anchor: ANCHOR.bottom | ANCHOR.left });
bx -= ui(36); bx -= ui(36);
} }

View file

@ -427,11 +427,11 @@ function Panel_File_Explorer() : PanelContent() constructor {
var _ppw = _pw; var _ppw = _pw;
if(point_in_rectangle(_m[0], _m[1], _px, _py, _px + _pw, _py + _ph)) { 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); setRoot(_dir.path);
_ppw -= _ph + ui(2); _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); clipboard_set_text(_dir.path);
_ppw -= _ph + ui(2); _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); draw_sprite_stretched(THEME.ui_panel_bg, 1, cnt_x, cnt_y, cnt_w, cnt_h);
var bs = top_bar - pad - ui(8); 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)); if(root != "") setRoot(filename_dir(root));
var tb_x = cnt_x + ui(32); 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_w = w - pad - tb_x - bs - ui(4);
var tb_h = top_bar - pad - ui(8); 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(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_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; } if(key_mod_press(SHIFT) && mouse_wheel_down()) { view_mode = !view_mode; PREFERENCES.file_explorer_view = view_mode; }

View file

@ -52,7 +52,7 @@ function Panel_GM_Explore(gmBinder) : PanelContent() constructor {
var _bx = px + pw - _bs; var _bx = px + pw - _bs;
var _by = py; 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(); gmBinder.refreshResources();
sc_content.setFocusHover(pFOCUS, pHOVER); sc_content.setFocusHover(pFOCUS, pHOVER);

View file

@ -74,7 +74,7 @@ function Panel_Gradient() : PanelContent() constructor {
// var bx = w - ui(32 + 16); // var bx = w - ui(32 + 16);
// var by = padding / 2 - ui(16 + !in_dialog * 2); // 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(); // __initGradient();
} }
} }

View file

@ -2243,7 +2243,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
var bs = ui(28); var bs = ui(28);
if(tbx - (bs + ui(4)) < cont_x) break; 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 } ); if(b == 2) tb[3]( { x: x + tbx - bs, y: y + tby - bs / 2 } );
tbx -= bs + ui(4); tbx -= bs + ui(4);
} }
@ -2253,7 +2253,7 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
tbx -= ui(2); tbx -= ui(2);
draw_set_color(COLORS.panel_toolbar_separator); 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; if(tbx < cont_x) break;
tbx -= ui(6); tbx -= ui(6);

View file

@ -161,7 +161,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor {
var bx = _sx1 - ui(24) - ui(4); var bx = _sx1 - ui(24) - ui(4);
var by = _sy + ui(1) + 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(); refresh();
draw_sprite_ui(THEME.refresh_16, 0, bx + ui(12), by + ui(12),,,, COLORS._main_icon, 1); draw_sprite_ui(THEME.refresh_16, 0, bx + ui(12), by + ui(12),,,, COLORS._main_icon, 1);

View file

@ -1227,10 +1227,10 @@ function Panel_Inspector() : PanelContent() constructor {
draw_set_font(f_p1); draw_set_font(f_p1);
var lx = w / 2 - string_width(inspecting.name) / 2 - ui(10); var lx = w / 2 - string_width(inspecting.name) / 2 - ui(10);
var ly = ui(56 - 8); 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; 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)); dialogPanelCall(new Panel_Presets(inspecting), x + bx, y + by + ui(36));
} else { } else {
draw_sprite_ui_uniform(THEME.preset, 1, bx + ui(32) / 2, by + ui(32) / 2, 1, COLORS._main_icon_dark); 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; var tt = inspecting.insp1UpdateTooltip;
if(inspectGroup) tt += " [All]"; 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) { if(inspectGroup == 1) {
for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector1Update(); for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector1Update();
} else } else
@ -1265,7 +1265,7 @@ function Panel_Inspector() : PanelContent() constructor {
var tt = inspecting.insp2UpdateTooltip; var tt = inspecting.insp2UpdateTooltip;
if(inspectGroup) tt += " [All]"; 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) { if(inspectGroup) {
for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector2Update(); for( var i = 0, n = array_length(inspectings); i < n; i++ ) inspectings[i].inspector2Update();
} else } else
@ -1281,7 +1281,7 @@ function Panel_Inspector() : PanelContent() constructor {
if(inspecting && !inspecting.active) inspecting = noone; if(inspecting && !inspecting.active) inspecting = noone;
view_mode_tooltip.index = viewMode; 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(b == 1) {
if(key_mod_press(SHIFT) && mouse_wheel_up()) { viewMode = !viewMode; PREFERENCES.inspector_view_default = viewMode; } 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; } 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 bx = w - ui(44);
var by = ui(12); 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()); json_save_struct(DIRECTORY + "meta.json", PROJECT.meta.serialize());
by += ui(36); 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); 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 { } else {
if(PROJECT.meta.steam == FILE_STEAM_TYPE.local) { //project made locally 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(); var s = PANEL_PREVIEW.getNodePreviewSurface();
if(is_surface(s)) { if(is_surface(s)) {
PROJECT.meta.author_steam_id = STEAM_USER_ID; 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 && PROJECT.meta.author_steam_id == STEAM_USER_ID) {
if(PROJECT.meta.steam == FILE_STEAM_TYPE.steamUpload) { 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); 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, 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) { } 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); SAVE_AT(PROJECT, PROJECT.path);
steam_ugc_update_project(); steam_ugc_update_project();
workshop_uploading = true; workshop_uploading = true;

View file

@ -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); node_halign(PANEL_GRAPH.nodes_selecting, fa_left);
xx += 34 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); node_halign(PANEL_GRAPH.nodes_selecting, fa_center);
xx += 34 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); node_halign(PANEL_GRAPH.nodes_selecting, fa_right);
xx += 34 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); node_valign(PANEL_GRAPH.nodes_selecting, fa_top);
xx += 34 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); node_valign(PANEL_GRAPH.nodes_selecting, fa_middle);
xx += 34 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); node_valign(PANEL_GRAPH.nodes_selecting, fa_bottom);
xx += 34 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); node_hdistribute(PANEL_GRAPH.nodes_selecting);
xx += 34 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); node_vdistribute(PANEL_GRAPH.nodes_selecting);
xx += 34 xx += 34
} }

View file

@ -71,7 +71,7 @@ function Panel_Nodes() : PanelContent() constructor {
var bx = _x1 - ui(4) - bw; var bx = _x1 - ui(4) - bw;
var by = _y + (hg - bh) / 2; 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); graphFocusNode(node);
bx -= ui(32); bx -= ui(32);

View file

@ -185,7 +185,7 @@ function Panel_Palette_Mixer() : PanelContent() constructor {
var _by = pal_y; var _by = pal_y;
var _bs = ui(24); 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) { if(_b == 2) {
menuCall("", [ menuCall("", [
menuItem("Save palette as...", function() { menuItem("Save palette as...", function() {

View file

@ -1906,15 +1906,15 @@ function Panel_Preview() : PanelContent() constructor {
if(point_in_rectangle(_mx, _my, _sx0, _sy0 + 1, _sx1, _sy1 - 1)) { if(point_in_rectangle(_mx, _my, _sx0, _sy0 + 1, _sx1, _sy1 - 1)) {
TOOLTIP = tool.getDisplayName(j); 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)) if(mouse_press(mb_left, pFOCUS))
tool.toggle(j); tool.toggle(j);
} }
if(tool_current == tool && tool.selecting == 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_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, 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, 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); draw_sprite_colored(stool[j], 0, _sxx, _syy);
@ -1925,7 +1925,7 @@ function Panel_Preview() : PanelContent() constructor {
} else { // single tools } else { // single tools
if(tool_hovering == tool) { 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(); TOOLTIP = tool.getDisplayName();
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))
@ -1940,8 +1940,8 @@ function Panel_Preview() : PanelContent() constructor {
} }
if(tool_current == tool) { 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_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, 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, 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); 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)) { if(point_in_rectangle(_mx, _my, _sx0, _sy0 + 1, _sx1, _sy1 - 1)) {
TOOLTIP = tool.getDisplayName(_sind); 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)) if(mouse_press(mb_left, pFOCUS))
tool.toggle(_sind); tool.toggle(_sind);
} }
if(tool_current == tool && tool.selecting == _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_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, 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, 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); draw_sprite_colored(stool[_sind], 0, _sxx, _syy);
@ -2040,7 +2040,7 @@ function Panel_Preview() : PanelContent() constructor {
} else { // single tools } else { // single tools
if(tool_hovering == tool) { 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(); TOOLTIP = tool.getDisplayName();
if(mouse_press(mb_left, pFOCUS)) if(mouse_press(mb_left, pFOCUS))
@ -2054,8 +2054,8 @@ function Panel_Preview() : PanelContent() constructor {
} }
if(tool_current == tool) { 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_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, 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, 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); 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; tbTooltip.index = tbInd;
var tooltip = instance_exists(o_dialog_menubox)? "" : tbTooltip; 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) { switch(b) {
case 1 : case 1 :
if(onWUp != 0 && key_mod_press(SHIFT) && mouse_wheel_up()) onWUp(); 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 tbTooltip = tb[1];
var tbIndex = tb[3](); 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) } ); if(b == 2) tb[2]( { x: x + tbx - ui(14), y: y + tby - ui(14) } );
tbx -= ui(32); tbx -= ui(32);
@ -2358,7 +2358,7 @@ function Panel_Preview() : PanelContent() constructor {
} else { } else {
dragCanvas(); 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_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); draw_set_alpha(1);
} }

View file

@ -596,7 +596,7 @@ function Panel_Profile_Render() : PanelContent() constructor {
var _bx = _pd; var _bx = _pd;
var _by = _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_STAT = 1;
PROFILER_DATA = []; PROFILER_DATA = [];
setReport(noone); setReport(noone);
@ -611,7 +611,7 @@ function Panel_Profile_Render() : PanelContent() constructor {
} }
_bx += _bs + ui(2); _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_STAT = 1;
PROFILER_DATA = []; PROFILER_DATA = [];
setReport(noone); setReport(noone);
@ -637,19 +637,19 @@ function Panel_Profile_Render() : PanelContent() constructor {
var _bx = _pd + list_w - _bs; var _bx = _pd + list_w - _bs;
var _by = _pd; 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; show_log_level = (show_log_level + 1) % 5;
_bx -= _bs + ui(4); _bx -= _bs + ui(4);
if(report_selecting == noone) 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); 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; filter_node = filter_node == report_selecting.node? noone : report_selecting.node;
searchData(); searchData();
} }
_bx -= _bs + ui(4); _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; set_selecting_node = !set_selecting_node;
_bx -= ui(4); _bx -= ui(4);

View file

@ -27,27 +27,27 @@ function Panel_Text_Editor(_textArea, _inputFunc, _context) : PanelContent() con
var bs = ui(32); var bs = ui(32);
var txt = shift_new_line? "New line with Shift + Enter" : "New line with Enter"; 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; shift_new_line = !shift_new_line;
bx += bs + ui(4); bx += bs + ui(4);
var txt = _textArea.show_line_number? "Hide line number" : "Show line number"; 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; _textArea.show_line_number = !_textArea.show_line_number;
bx += bs + ui(4); bx += bs + ui(4);
var txt = _textArea.use_autocomplete? "Disable Autocomplete" : "Enable Autocomplete"; 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; _textArea.use_autocomplete = !_textArea.use_autocomplete;
bx += bs + ui(4); bx += bs + ui(4);
var txt = "Syntax Highlight"; 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; _textArea.syntax_highlight = !_textArea.syntax_highlight;
bx += bs + ui(4); bx += bs + ui(4);
var bx = w - ui(8) - bs; 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(); _textArea.apply();
bx -= bs + ui(4); bx -= bs + ui(4);

View file

@ -84,11 +84,11 @@ function Panel_Tunnels() : PanelContent() constructor {
var bx = ww - ui(4) - bw; var bx = ww - ui(4) - bw;
var by = _y + (hg - bh) / 2; 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); graphFocusNode(node);
bx -= ui(32); 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); var _node = nodeBuild("Node_Tunnel_Out", build_x, build_y - 8);
_node.inputs[0].setValue(key); _node.inputs[0].setValue(key);

View file

@ -132,7 +132,7 @@ function pathAnchorBox(_onModify) : widget() constructor {
var bx = _x + _w / 2 - _bw / 2; var bx = _x + _w / 2 - _bw / 2;
var by = _ty + _th / 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); onModify(!_linked, _li);
resetFocus(); resetFocus();

View file

@ -33,7 +33,7 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor {
var _bs = min(_h, ui(32)); var _bs = min(_h, ui(32));
if(_w - _bs > ui(100)) { if(_w - _bs > ui(100)) {
openPath.setFocusHover(active, hover); 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); _w -= _bs + ui(4);
} }

View file

@ -15,6 +15,7 @@
PREFERENCES.window_fix_height = 800; PREFERENCES.window_fix_height = 800;
PREFERENCES.theme = "default"; PREFERENCES.theme = "default";
PREFERENCES.theme_override = "override";
PREFERENCES.local = "en"; PREFERENCES.local = "en";
PREFERENCES.font_overwrite = ""; PREFERENCES.font_overwrite = "";

View file

@ -102,7 +102,7 @@ function quarternionBox(_onModify) : widget() constructor {
var tg = false; var tg = false;
tooltip.index = _disp; 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(b == 1) {
if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true; if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true;
if(key_mod_press(SHIFT) && mouse_wheel_down()) tg = true; if(key_mod_press(SHIFT) && mouse_wheel_down()) tg = true;

View file

@ -73,13 +73,13 @@ function rangeBox(_type, _onModify) : widget() constructor {
if((_w - _bs) / 2 > ui(64)) { if((_w - _bs) / 2 > ui(64)) {
if(side_button) { if(side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(4); _w -= _bs + ui(4);
} }
var bx = _x; var bx = _x;
var by = _y + _h / 2 - _bs / 2; 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; var tg = false;
if(b == 1) { if(b == 1) {

View file

@ -45,7 +45,7 @@ function rotator(_onModify, _step = -1) : widget() constructor {
if(_drawRot && side_button) { if(_drawRot && side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(4); _w -= _bs + ui(4);
} }

View file

@ -87,7 +87,7 @@ function scrollBox(_data, _onModify, update_hover = true) : widget() constructor
if(extra_button != noone) { if(extra_button != noone) {
extra_button.setFocusHover(active, hover); 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); w -= ui(40);
} }

View file

@ -43,6 +43,7 @@ function color_get_hex(color, alpha = true) {
} }
function color_from_rgb(str) { function color_from_rgb(str) {
if(!is_string(str)) return str;
if(string_length(str) < 6) return -1; if(string_length(str) < 6) return -1;
var _r = string_hexadecimal(string_copy(str, 1, 2)); var _r = string_hexadecimal(string_copy(str, 1, 2));

View file

@ -791,7 +791,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") { if(_w - _bs > ui(100) && side_button && instanceof(side_button) == "buttonClass") {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(8); _w -= _bs + ui(8);
} }

View file

@ -127,6 +127,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
return self; return self;
} }
static setColor = function(color) { self.color = color; return self; }
static setAlign = function(align) { self.align = align; return self; } static setAlign = function(align) { self.align = align; return self; }
static setHide = function(hide) { self.hide = hide; return self; } static setHide = function(hide) { self.hide = hide; return self; }
static setFont = function(font) { self.font = font; 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) { if(_w - _bs > ui(100) && front_button) {
front_button.setFocusHover(active, hover); 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); _x += _bs + ui(4);
_w -= _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) { if(_w - _bs > ui(100) && side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(4); _w -= _bs + ui(4);
} }

View file

@ -369,7 +369,7 @@ function Theme() constructor {
button_hide_left = s_button_hide_left; button_hide_left = s_button_hide_left;
button_hide_middle = s_button_hide_middle; button_hide_middle = s_button_hide_middle;
button_hide_right = s_button_hide_right; button_hide_right = s_button_hide_right;
button_hide = s_button_hide_fill; button_hide = s_button_hide;
button_left = s_button_left; button_left = s_button_left;
button_lime = s_button_lime; button_lime = s_button_lime;
button_middle = s_button_middle; button_middle = s_button_middle;
@ -388,7 +388,7 @@ function ThemeColorDef() constructor {
main_mdblack = #1e1e2c; main_mdblack = #1e1e2c;
main_black = #272736; main_black = #272736;
main_dkgrey = #3b3b4e; main_dkgrey = #3b3b4e;
main_dark = #4da6ff; main_dark = #505066;
main_grey = #6d6d81; main_grey = #6d6d81;
main_ltgrey = #7e7e8f; main_ltgrey = #7e7e8f;
main_mdwhite = #9f9fb5; main_mdwhite = #9f9fb5;

View file

@ -117,7 +117,7 @@ function vectorBox(_size, _onModify, _unit = noone) : widget() constructor {
if(is(side_button, buttonAnchor)) if(is(side_button, buttonAnchor))
side_button.index = round(array_safe_get(_data, 0) * 2 + array_safe_get(_data, 1) * 6); side_button.index = round(array_safe_get(_data, 0) * 2 + array_safe_get(_data, 1) * 6);
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(4); _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 _icon_blend = linked? COLORS._main_accent : (link_inactive_color == noone? COLORS._main_icon : link_inactive_color);
var bx = _x; var bx = _x;
var by = _y + _h / 2 - _bs / 2; 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; var tg = false;
if(b == 1) { if(b == 1) {

View file

@ -86,7 +86,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
if((_w - _bs) / 2 > ui(64)) { if((_w - _bs) / 2 > ui(64)) {
if(side_button) { if(side_button) {
side_button.setFocusHover(active, hover); side_button.setFocusHover(active, hover);
side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide); side_button.draw(_x + _w - _bs, _y + _h / 2 - _bs / 2, _bs, _bs, _m, THEME.button_hide_fill);
_w -= _bs + ui(4); _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 by = _y + _h / 2 - _bs / 2;
var bc = linked? COLORS._main_accent : COLORS._main_icon; 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; linked = !linked;
_display_data.linked = linked; _display_data.linked = linked;
@ -107,7 +107,7 @@ function vectorRangeBox(_size, _type, _onModify, _unit = noone) : widget() const
by += _h + ui(4); by += _h + ui(4);
tooltip_ranged.index = ranged; 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; var tg = false;
if(b == 1) { if(b == 1) {
if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true; if(key_mod_press(SHIFT) && mouse_wheel_up()) tg = true;

View file

@ -150,6 +150,9 @@ function widgetParam(x, y, w, h, data, display_data = {}, m = mouse_ui, rx = 0,
interact = undefined; interact = undefined;
scrollpane = 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 setColor = function(c) { color = c; return self; }
static setFont = function(f) { font = f; return self; } static setFont = function(f) { font = f; return self; }
static setScrollpane = function(s) { scrollpane = s; return self; } static setScrollpane = function(s) { scrollpane = s; return self; }