2022-11-14 03:16:15 +01:00
|
|
|
function Panel_Menu() : PanelContent() constructor {
|
2022-01-13 05:24:03 +01:00
|
|
|
draggable = false;
|
|
|
|
|
2022-11-03 11:44:49 +01:00
|
|
|
noti_flash = 0;
|
2022-12-10 05:06:01 +01:00
|
|
|
noti_flash_color = COLORS._main_accent;
|
|
|
|
noti_icon = noone;
|
|
|
|
noti_icon_show = 0;
|
|
|
|
noti_icon_time = 0;
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
menu_file = [
|
|
|
|
[ get_text("panel_menu_new", "New"), function() {
|
|
|
|
NEW();
|
|
|
|
}, ["", "New file"] ],
|
|
|
|
[ get_text("panel_menu_open", "Open") + "...", function() { LOAD(); }, ["", "Open"] ],
|
|
|
|
[ get_text("panel_menu_save", "Save"), function() { SAVE(); }, ["", "Save"] ],
|
|
|
|
[ get_text("panel_menu_save_as", "Save as..."), function() { SAVE_AS(); }, ["", "Save as"] ],
|
|
|
|
[ get_text("panel_menu_recent_files", "Recent files"), function(_x, _y, _depth) {
|
|
|
|
var dia = instance_create_depth(_x - ui(4), _y, _depth - 1, o_dialog_menubox);
|
|
|
|
var arr = [];
|
|
|
|
for(var i = 0; i < min(10, ds_list_size(RECENT_FILES)); i++) {
|
|
|
|
var _rec = RECENT_FILES[| i];
|
|
|
|
array_push(arr, [ _rec, function(_x, _y, _depth, _path) { LOAD_PATH(_path); } ]);
|
|
|
|
}
|
|
|
|
dia.setMenu(arr);
|
|
|
|
return dia;
|
|
|
|
}, ">" ],
|
|
|
|
-1,
|
|
|
|
[ get_text("preferences", "Preferences") + "...", function() { dialogCall(o_dialog_preference); } ],
|
|
|
|
[ get_text("panel_menu_splash_screen", "Splash screen"), function() { dialogCall(o_dialog_splash); } ],
|
|
|
|
-1,
|
|
|
|
[ get_text("panel_menu_addons", "Addons"), function(_x, _y, _depth) {
|
|
|
|
var dia = instance_create_depth(_x - ui(4), _y, _depth - 1, o_dialog_menubox);
|
|
|
|
dia.setMenu([
|
|
|
|
[ get_text("panel_menu_addons_key", "Key displayer"), function() {
|
|
|
|
if(instance_exists(addon_key_displayer)) {
|
|
|
|
instance_destroy(addon_key_displayer);
|
|
|
|
return;
|
|
|
|
}
|
2023-02-14 05:32:32 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
instance_create_depth(0, 0, 0, addon_key_displayer);
|
|
|
|
}]
|
|
|
|
]);
|
|
|
|
return dia;
|
|
|
|
}, ">" ],
|
|
|
|
];
|
|
|
|
|
|
|
|
if(DEMO) {
|
|
|
|
array_delete(menu_file, 1, 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
menus = [
|
|
|
|
[ get_text("panel_menu_file", "File"), menu_file],
|
|
|
|
[ get_text("panel_menu_edit", "Edit"), [
|
|
|
|
[ get_text("undo", "Undo"), function() { UNDO(); }, ["", "Undo"] ],
|
|
|
|
[ get_text("redo", "Redo"), function() { REDO(); }, ["", "Redo"] ],
|
|
|
|
[ get_text("history_title", "Action history"), function() { dialogCall(o_dialog_history, mouse_mx, mouse_my); } ],
|
2022-01-13 05:24:03 +01:00
|
|
|
]],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_preview", "Preview"), [
|
|
|
|
[ get_text("panel_menu_center_preview", "Center preview"), function() { PANEL_PREVIEW.do_fullView = true; }, ["Preview", "Focus content"] ],
|
|
|
|
[ get_text("panel_menu_save_current_preview_as", "Save current preview as..."), function() { PANEL_PREVIEW.saveCurrentFrame(); }, ["Preview", "Save current frame"] ],
|
|
|
|
[ get_text("panel_menu_preview_background", "Preview background"), [
|
2022-01-13 05:24:03 +01:00
|
|
|
[ s_menu_transparent, function() { PANEL_PREVIEW.canvas_bg = -1; } ],
|
|
|
|
[ s_menu_white, function() { PANEL_PREVIEW.canvas_bg = c_white; } ],
|
|
|
|
[ s_menu_black, function() { PANEL_PREVIEW.canvas_bg = c_black; } ],
|
|
|
|
]],
|
|
|
|
-1,
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_show_grid", "Show Grid"), function() { PANEL_PREVIEW.grid_show = !PANEL_PREVIEW.grid_show; }, ["Preview", "Toggle grid"] ],
|
|
|
|
[ get_text("panel_menu_grid_setting", "Grid setting..."), function() {
|
2022-11-01 03:06:03 +01:00
|
|
|
var dia = dialogCall(o_dialog_preview_grid);
|
2022-01-13 05:24:03 +01:00
|
|
|
dia.anchor = ANCHOR.none;
|
|
|
|
} ],
|
|
|
|
]],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_animation", "Animation"), [
|
|
|
|
[ get_text("panel_menu_animation_setting", "Animation setting..."), function() {
|
2022-11-01 03:06:03 +01:00
|
|
|
var dia = dialogCall(o_dialog_animation);
|
2022-01-13 05:24:03 +01:00
|
|
|
dia.anchor = ANCHOR.none;
|
|
|
|
} ],
|
|
|
|
-1,
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_animation_scaler", "Animation scaler..."), function() {
|
2022-11-01 03:06:03 +01:00
|
|
|
dialogCall(o_dialog_anim_time_scaler);
|
2022-01-13 05:24:03 +01:00
|
|
|
} ],
|
|
|
|
]],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_rendering", "Rendering"), [
|
|
|
|
[ get_text("panel_menu_render_all_nodes", "Render all nodes"), function() {
|
2022-01-13 05:24:03 +01:00
|
|
|
for(var i = 0; i < ds_list_size(NODES); i++)
|
2022-12-12 09:08:03 +01:00
|
|
|
NODES[| i].triggerRender();
|
2022-01-25 04:05:30 +01:00
|
|
|
UPDATE |= RENDER_TYPE.full;
|
2023-02-14 02:51:14 +01:00
|
|
|
}, ["", "Render all"] ],
|
|
|
|
[ get_text("panel_menu_execute_exports", "Execute all export nodes"), function() {
|
|
|
|
var key = ds_map_find_first(NODE_MAP);
|
|
|
|
repeat(ds_map_size(NODE_MAP)) {
|
|
|
|
var node = NODE_MAP[? key];
|
|
|
|
key = ds_map_find_next(NODE_MAP, key);
|
|
|
|
|
|
|
|
if(!node.active) continue;
|
|
|
|
if(instanceof(node) != "Node_Export") continue;
|
|
|
|
|
|
|
|
node.initExport();
|
|
|
|
}
|
|
|
|
}, ],
|
2022-01-13 05:24:03 +01:00
|
|
|
]],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_panels", "Panels"), [
|
|
|
|
[ get_text("panel_menu_workspace", "Workspace"), [
|
2022-11-18 03:20:31 +01:00
|
|
|
[ THEME.workspace_horizontal, function() { clearPanel(); PREF_MAP[? "panel_layout"] = 0; setPanel(); PREF_SAVE(); } ],
|
|
|
|
[ THEME.workspace_vertical, function() { clearPanel(); PREF_MAP[? "panel_layout"] = 1; setPanel(); PREF_SAVE(); } ]
|
2022-01-13 05:24:03 +01:00
|
|
|
]],
|
|
|
|
-1,
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_collections", "Collections"), function() {
|
2022-01-13 05:24:03 +01:00
|
|
|
clearPanel();
|
|
|
|
PREF_MAP[? "panel_collection"] = !PREF_MAP[? "panel_collection"];
|
|
|
|
setPanel();
|
|
|
|
PREF_SAVE();
|
2022-09-21 06:09:40 +02:00
|
|
|
} ],
|
2022-01-13 05:24:03 +01:00
|
|
|
]],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_help", "Help"), [
|
|
|
|
[ get_text("panel_menu_help_video", "Tutorial videos"), function() {
|
|
|
|
url_open("https://www.youtube.com/@makhamdev");
|
|
|
|
} ],
|
|
|
|
[ get_text("panel_menu_help_wiki", "Community Wiki"), function() {
|
|
|
|
url_open("https://pixel-composer.fandom.com/wiki/Pixel_Composer_Wiki");
|
|
|
|
} ],
|
|
|
|
-1,
|
|
|
|
[ get_text("panel_menu_itch", "itch.io page"), function() {
|
|
|
|
url_open("https://makham.itch.io/pixel-composer");
|
|
|
|
} ],
|
|
|
|
[ get_text("panel_menu_steam", "Steam page"), function() {
|
|
|
|
url_open("https://store.steampowered.com/app/2299510/Pixel_Composer");
|
|
|
|
} ],
|
2023-02-16 02:51:51 +01:00
|
|
|
-1,
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_directory", "Open local directory"), function() {
|
|
|
|
shellOpenExplorer(DIRECTORY);
|
|
|
|
} ],
|
2023-02-16 02:51:51 +01:00
|
|
|
[ get_text("panel_menu_reset_default", "Reset default collection, assets"), function() {
|
|
|
|
zip_unzip("data/Collections.zip", DIRECTORY + "Collections");
|
|
|
|
zip_unzip("data/Assets.zip", DIRECTORY + "Assets");
|
|
|
|
} ],
|
2023-02-14 02:51:14 +01:00
|
|
|
]],
|
2022-01-13 05:24:03 +01:00
|
|
|
]
|
|
|
|
|
2023-01-01 02:06:02 +01:00
|
|
|
if(TESTING) {
|
2023-02-14 02:51:14 +01:00
|
|
|
array_push(menus, [ get_text("panel_menu_test", "Test"), [
|
|
|
|
[ get_text("panel_menu_test_load_all", "Load all current collections"), function() {
|
2023-01-01 02:06:02 +01:00
|
|
|
__test_load_current_collections();
|
|
|
|
}],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_test_update_all", "Update all current collections"), function() {
|
2023-01-01 02:06:02 +01:00
|
|
|
__test_update_current_collections();
|
|
|
|
}],
|
2023-02-14 02:51:14 +01:00
|
|
|
[ get_text("panel_menu_test_add_meta", "Add metadata to current collections"), function() {
|
|
|
|
__test_metadata_current_collections();
|
|
|
|
}],
|
|
|
|
[ get_text("panel_menu_test_update_sam", "Update sample projects"), function() {
|
2023-01-17 08:11:55 +01:00
|
|
|
__test_update_sample_projects();
|
|
|
|
}],
|
2023-02-14 02:51:14 +01:00
|
|
|
-1,
|
|
|
|
[ get_text("panel_menu_test_load_nodes", "Load all nodes"), function() {
|
|
|
|
__test_load_all_nodes();
|
|
|
|
}],
|
|
|
|
[ get_text("panel_menu_test_gen_guide", "Generate node guide"), function() {
|
|
|
|
__generate_node_guide();
|
|
|
|
}],
|
|
|
|
-1,
|
|
|
|
[ get_text("panel_menu_test_crash", "Force crash"), function() {
|
|
|
|
print(1 + "a");
|
|
|
|
}],
|
2023-01-01 02:06:02 +01:00
|
|
|
]]);
|
|
|
|
}
|
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
function setNotiIcon(icon) {
|
|
|
|
noti_icon = icon;
|
|
|
|
noti_icon_time = 90;
|
|
|
|
}
|
|
|
|
|
2022-11-22 14:25:39 +01:00
|
|
|
function displayNewVersion() {
|
|
|
|
var xx = w - ui(88);
|
|
|
|
draw_set_text(f_p0b, fa_right, fa_center, COLORS._main_value_positive);
|
2023-02-14 02:51:14 +01:00
|
|
|
var txt = " " + get_text("panel_menu_newer", "panel_menu_newer") + " ";
|
2022-11-22 14:25:39 +01:00
|
|
|
var ww = string_width(txt);
|
|
|
|
|
|
|
|
if(pHOVER && point_in_rectangle(mx, my, xx - ww, 0, xx, h)) {
|
|
|
|
draw_sprite_stretched(THEME.menu_button, 0, xx - ww - ui(6), ui(6), ww + ui(12), h - ui(12));
|
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(mouse_press(mb_left, pFOCUS)) {
|
2022-11-22 14:25:39 +01:00
|
|
|
url_open("https://makham.itch.io/pixel-composer");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
draw_text(xx, h / 2, txt);
|
|
|
|
}
|
|
|
|
|
|
|
|
function undoUpdate() {
|
|
|
|
var txt;
|
|
|
|
|
|
|
|
if(ds_stack_empty(UNDO_STACK)) {
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = "-" + get_text("undo", "Undo");
|
2022-11-22 14:25:39 +01:00
|
|
|
} else {
|
|
|
|
var act = ds_stack_top(UNDO_STACK);
|
|
|
|
if(array_length(act) > 1)
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = get_text("undo", "Undo") + " " + string(array_length(act)) + " " + get_text("actions", "Actions");
|
2022-11-22 14:25:39 +01:00
|
|
|
else
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = get_text("undo", "Undo") + " " + act[0].toString();
|
2022-11-22 14:25:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
menus[1][1][0][0] = txt;
|
|
|
|
|
|
|
|
if(ds_stack_empty(REDO_STACK)) {
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = "-" + get_text("redo", "Redo");
|
2022-11-22 14:25:39 +01:00
|
|
|
} else {
|
|
|
|
var act = ds_stack_top(REDO_STACK);
|
|
|
|
if(array_length(act) > 1)
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = get_text("redo", "Redo") + " " + string(array_length(act)) + " " + get_text("actions", "Actions");
|
2022-11-22 14:25:39 +01:00
|
|
|
else
|
2023-02-14 02:51:14 +01:00
|
|
|
txt = get_text("redo", "Redo") + " " + act[0].toString();
|
2022-11-22 14:25:39 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
menus[1][1][1][0] = txt;
|
|
|
|
}
|
|
|
|
|
2022-11-14 03:16:15 +01:00
|
|
|
function drawContent(panel) {
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_clear_alpha(COLORS.panel_bg_clear, 0);
|
|
|
|
draw_sprite_ui_uniform(THEME.icon_24, 0, h / 2, h / 2, 1, c_white);
|
2022-11-03 11:44:49 +01:00
|
|
|
var xx = h;
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(pHOVER && point_in_rectangle(mx, my, 0, 0, ui(40), ui(32))) {
|
|
|
|
if(mouse_press(mb_left, pFOCUS)) {
|
2022-11-01 03:06:03 +01:00
|
|
|
dialogCall(o_dialog_about);
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for(var i = 0; i < array_length(menus); i++) {
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
|
2022-11-03 11:44:49 +01:00
|
|
|
var ww = string_width(menus[i][0]) + ui(16);
|
2022-01-13 05:24:03 +01:00
|
|
|
var xc = xx + ww / 2;
|
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(pHOVER && point_in_rectangle(mx, my, xc - ww / 2, 0, xc + ww / 2, h)) {
|
|
|
|
draw_sprite_stretched(THEME.menu_button, 0, xc - ww / 2, ui(6), ww, h - ui(12));
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if((mouse_press(mb_left, pFOCUS)) || instance_exists(o_dialog_menubox)) {
|
|
|
|
var dia = dialogCall(o_dialog_menubox, x + xx, y + h);
|
|
|
|
dia.setMenu(menus[i][1]);
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text);
|
2023-02-14 02:51:14 +01:00
|
|
|
draw_text_over(xx + ww / 2, y + h / 2, menus[i][0]);
|
2022-01-13 05:24:03 +01:00
|
|
|
|
|
|
|
xx += ww + 8;
|
|
|
|
}
|
|
|
|
|
2022-11-03 11:44:49 +01:00
|
|
|
#region notification
|
|
|
|
var warning_amo = ds_list_size(WARNING);
|
|
|
|
var error_amo = ds_list_size(ERRORS);
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2022-11-03 11:44:49 +01:00
|
|
|
var nx0 = xx + ui(24);
|
2022-01-13 05:24:03 +01:00
|
|
|
var ny0 = y + h / 2;
|
|
|
|
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_set_text(f_p0, fa_left, fa_center);
|
2022-11-03 11:44:49 +01:00
|
|
|
var wr_w = ui(20) + ui(8) + string_width(string(warning_amo));
|
|
|
|
var er_w = ui(20) + ui(8) + string_width(string(error_amo));
|
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(noti_icon_time > 0) {
|
|
|
|
noti_icon_show = lerp_float(noti_icon_show, 1, 4);
|
|
|
|
noti_icon_time--;
|
|
|
|
} else
|
|
|
|
noti_icon_show = lerp_float(noti_icon_show, 0, 4);
|
|
|
|
|
|
|
|
var nw = ui(16) + wr_w + ui(16) + er_w + noti_icon_show * ui(32);
|
2022-11-03 11:44:49 +01:00
|
|
|
var nh = ui(32);
|
|
|
|
|
|
|
|
noti_flash = lerp_linear(noti_flash, 0, 0.02);
|
|
|
|
var ev = animation_curve_eval(ac_flash, noti_flash);
|
2022-12-10 05:06:01 +01:00
|
|
|
var cc = merge_color(c_white, noti_flash_color, ev);
|
2022-11-03 11:44:49 +01:00
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(pHOVER && point_in_rectangle(mx, my, nx0, ny0 - nh / 2, nx0 + nw, ny0 + nh / 2)) {
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched_ext(THEME.menu_button, 0, nx0, ny0 - nh / 2, nw, nh, cc, 1);
|
2022-12-10 05:06:01 +01:00
|
|
|
if(mouse_press(mb_left, pFOCUS)) {
|
2022-11-03 11:44:49 +01:00
|
|
|
var dia = dialogCall(o_dialog_notifications, nx0, ny0 + nh / 2 + ui(4));
|
|
|
|
dia.anchor = ANCHOR.left | ANCHOR.top;
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
2022-11-03 11:44:49 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
TOOLTIP = string(warning_amo) + " " + get_text("warning", "Warnings") + " " + string(error_amo) + " " + get_text("errors", "Errors");
|
2022-11-03 11:44:49 +01:00
|
|
|
} else
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, nx0, ny0 - nh / 2, nw, nh, cc, 1);
|
2022-11-03 11:44:49 +01:00
|
|
|
|
|
|
|
gpu_set_blendmode(bm_add);
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_stretched_ext(THEME.menu_button_mask, 0, nx0, ny0 - nh / 2, nw, nh, cc, ev / 2);
|
2022-11-03 11:44:49 +01:00
|
|
|
gpu_set_blendmode(bm_normal);
|
|
|
|
|
2022-12-10 05:06:01 +01:00
|
|
|
if(noti_icon_show > 0)
|
|
|
|
draw_sprite_ui(noti_icon, 0, nx0 + nw - ui(16), ny0,,,,, noti_icon_show);
|
|
|
|
|
2022-11-03 11:44:49 +01:00
|
|
|
var wr_x = nx0 + ui(8);
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_ui_uniform(THEME.noti_icon_warning, warning_amo? 1 : 0, wr_x + ui(10), ny0);
|
2022-11-03 11:44:49 +01:00
|
|
|
draw_text(wr_x + ui(28), ny0, warning_amo);
|
|
|
|
|
|
|
|
var er_x = nx0 + ui(8) + wr_w + ui(16);
|
2022-11-18 03:20:31 +01:00
|
|
|
draw_sprite_ui_uniform(THEME.noti_icon_error, error_amo? 1 : 0, er_x + ui(10), ny0);
|
2022-11-03 11:44:49 +01:00
|
|
|
draw_text(er_x + ui(28), ny0, error_amo);
|
2023-01-09 03:14:20 +01:00
|
|
|
|
|
|
|
nx0 += nw + ui(8);
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region window
|
|
|
|
var wh = ui(32);
|
|
|
|
var cc = c_white;
|
|
|
|
|
|
|
|
with(addon) {
|
|
|
|
draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text);
|
|
|
|
var ww = string_width(name) + ui(16);
|
|
|
|
|
|
|
|
if(other.pHOVER && point_in_rectangle(other.mx, other.my, nx0, ny0 - wh / 2, nx0 + ww, ny0 + wh / 2)) {
|
|
|
|
draw_sprite_stretched_ext(THEME.menu_button, 1, nx0, ny0 - wh / 2, ww, wh, cc, 1);
|
|
|
|
if(mouse_press(mb_left, other.pFOCUS))
|
|
|
|
instance_destroy();
|
|
|
|
} else
|
|
|
|
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, nx0, ny0 - wh / 2, ww, wh, cc, 1);
|
|
|
|
draw_text(nx0 + ww / 2, ny0, name);
|
|
|
|
|
|
|
|
nx0 += ww + ui(4);
|
|
|
|
}
|
2022-11-03 11:44:49 +01:00
|
|
|
#endregion
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
#region version
|
|
|
|
draw_set_text(f_p0, fa_right, fa_center, COLORS._main_text_sub);
|
|
|
|
var txt = "v. " + string(VERSION_STRING);
|
|
|
|
if(DEMO) txt += " DEMO";
|
|
|
|
var ww = string_width(txt);
|
|
|
|
if(pHOVER && point_in_rectangle(mx, my, w - ui(16) - ww, 0, w - ui(16), h)) {
|
|
|
|
draw_sprite_stretched(THEME.menu_button, 0, w - ww - ui(22), ui(6), ww + ui(12), h - ui(12));
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
if(mouse_press(mb_left, pFOCUS)) {
|
|
|
|
dialogCall(o_dialog_release_note);
|
|
|
|
}
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
2023-02-14 02:51:14 +01:00
|
|
|
draw_text(w - ui(16), h / 2, txt);
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2023-02-14 02:51:14 +01:00
|
|
|
if(o_main.version_latest > VERSION)
|
|
|
|
displayNewVersion();
|
|
|
|
#endregion
|
2022-01-13 05:24:03 +01:00
|
|
|
|
2022-11-22 14:25:39 +01:00
|
|
|
undoUpdate();
|
2022-01-13 05:24:03 +01:00
|
|
|
}
|
|
|
|
}
|