2022-01-13 05:24:03 +01:00
#region save
2024-04-11 05:51:13 +02:00
globalvar LOADING, CLONING, CLONING_GROUP;
globalvar CONNECTION_CONFLICT, LOADING_VERSION;
2023-10-04 09:49:31 +02:00
globalvar MESSAGE;
2023-07-06 19:49:16 +02:00
2024-04-11 05:51:13 +02:00
globalvar APPENDING, APPEND_MAP, APPEND_LIST;
APPEND_MAP = ds_map_create();
2024-06-08 13:31:27 +02:00
APPEND_LIST = [];
2024-04-11 05:51:13 +02:00
LOADING = false;
2024-03-27 11:51:14 +01:00
LOADING_VERSION = 0;
2024-04-11 05:51:13 +02:00
CLONING_GROUP = noone;
CLONING = false;
APPENDING = false;
MESSAGE = noone;
2023-07-06 19:49:16 +02:00
2022-01-13 05:24:03 +01:00
CONNECTION_CONFLICT = ds_queue_create();
randomize();
#endregion
2024-02-09 14:43:03 +01:00
#region ======================================================================= MAIN =======================================================================
2024-09-13 09:43:09 +02:00
globalvar OS, DEBUG, THEME, COLOR_KEYS, RUN_IDE;
2024-02-04 07:33:42 +01:00
globalvar CMD, CMDIN;
2024-03-29 05:20:49 +01:00
globalvar FPS_REAL;
2024-02-04 07:33:42 +01:00
2024-09-10 05:46:00 +02:00
#macro MAC (OS == os_macosx)
2024-08-09 13:30:09 +02:00
OS = os_type;
CMD = [];
CMDIN = [];
2024-03-29 05:20:49 +01:00
FPS_REAL = 0;
2024-09-13 09:43:09 +02:00
RUN_IDE = GM_build_type == "run";
2023-03-07 14:29:47 +01:00
2022-01-13 05:24:03 +01:00
DEBUG = false;
2023-07-05 15:09:52 +02:00
THEME = new Theme();
2022-11-18 03:20:31 +01:00
COLOR_KEYS = [];
2022-01-13 05:24:03 +01:00
2023-11-20 13:21:50 +01:00
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
2024-07-29 04:40:08 +02:00
globalvar HOTKEYS, HOTKEY_CONTEXT;
2023-08-10 11:51:16 +02:00
2024-10-05 02:49:33 +02:00
LATEST_VERSION = 1_18_00_0;
2024-11-04 06:08:06 +01:00
VERSION = 1_18_03_1;
2024-10-17 04:46:19 +02:00
SAVE_VERSION = 1_18_02_0;
2024-11-07 07:59:04 +01:00
VERSION_STRING = MAC? "1.18.003m" : "1.18.3.2";
2024-11-04 06:08:06 +01:00
BUILD_NUMBER = 1_18_03_1;
2022-01-13 05:24:03 +01:00
HOTKEYS = ds_map_create();
HOTKEY_CONTEXT = ds_list_create();
HOTKEY_CONTEXT[| 0] = "";
2024-03-24 04:58:08 +01:00
globalvar TOOLTIP, DRAGGING, DIALOG_DEPTH_HOVER;
2024-07-31 05:45:59 +02:00
global.KEYS = { download_links: "" };
2024-05-15 12:42:54 +02:00
globalvar CURRENT_COLOR;
2024-09-10 06:36:30 +02:00
CURRENT_COLOR = cola(c_white);
2024-09-10 04:50:48 +02:00
2024-09-13 08:25:00 +02:00
// gml_release_mode(true);
2022-01-13 05:24:03 +01:00
#endregion
2024-08-07 04:16:09 +02:00
#region input
2024-08-09 13:30:09 +02:00
globalvar FOCUS, FOCUS_STR, FOCUS_CONTENT, HOVER, HOVERING_ELEMENT, _HOVERING_ELEMENT;
2023-07-17 19:58:33 +02:00
globalvar DOUBLE_CLICK, DOUBLE_CLICK_POS;
2023-07-06 19:49:16 +02:00
globalvar DIALOG_CLICK;
2024-09-12 05:27:42 +02:00
globalvar WINDOW_ACTIVE, TOOLTIP_WINDOW;
2022-01-13 05:24:03 +01:00
2023-07-17 19:58:33 +02:00
DOUBLE_CLICK_POS = [ 0, 0 ];
2024-08-22 03:28:59 +02:00
DOUBLE_CLICK = false;
2023-12-06 05:09:39 +01:00
2024-08-09 13:30:09 +02:00
FOCUS = noone;
FOCUS_CONTENT = noone;
FOCUS_STR = "";
2023-12-06 05:09:39 +01:00
HOVER = noone;
2023-05-03 21:42:17 +02:00
HOVERING_ELEMENT = noone;
_HOVERING_ELEMENT = noone;
2023-12-06 05:09:39 +01:00
2022-11-18 03:20:31 +01:00
DIALOG_CLICK = true;
2022-01-13 05:24:03 +01:00
2024-03-14 14:35:19 +01:00
globalvar ADD_NODE_PAGE, ADD_NODE_SCROLL;
ADD_NODE_PAGE = 0;
ADD_NODE_SCROLL = 0;
2024-09-11 09:54:40 +02:00
WINDOW_ACTIVE = noone;
2024-09-12 05:27:42 +02:00
TOOLTIP_WINDOW = noone;
2022-01-13 05:24:03 +01:00
#endregion
#region macro
2023-11-01 08:10:25 +01:00
#macro TEMPDIR filepath_resolve(PREFERENCES.temp_path)
#macro NOT_LOAD !LOADING && !APPENDING
2024-09-11 11:56:41 +02:00
#macro WIN_X window_get_x()
#macro WIN_Y window_get_y()
2022-11-01 03:06:03 +01:00
#macro WIN_W window_get_width()
#macro WIN_H window_get_height()
#macro WIN_SW window_get_width()
#macro WIN_SH window_get_height()
2023-10-31 05:30:42 +01:00
#macro UI_SCALE PREFERENCES.display_scaling
2022-01-13 05:24:03 +01:00
2024-09-12 05:08:48 +02:00
#macro mouse_ui [mouse_mx, mouse_my]
2024-09-11 11:56:41 +02:00
#macro mouse_mx (PEN_USE? PEN_X : winwin_mouse_get_x_safe(WINDOW_ACTIVE))
#macro mouse_my (PEN_USE? PEN_Y : winwin_mouse_get_y_safe(WINDOW_ACTIVE))
2024-08-12 04:28:38 +02:00
#macro mouse_mxs (FILE_IS_DROPPING? FILE_DROPPING_X : mouse_mx)
#macro mouse_mys (FILE_IS_DROPPING? FILE_DROPPING_Y : mouse_my)
2024-09-11 09:54:40 +02:00
#macro mouse_raw_x display_mouse_get_x()
#macro mouse_raw_y display_mouse_get_y()
2022-11-03 11:44:49 +01:00
2024-04-08 07:13:46 +02:00
#macro sFOCUS (FOCUS == self.id)
2024-09-11 11:56:41 +02:00
#macro sHOVER (!CURSOR_IS_LOCK && (HOVER == self.id || (WINDOW_ACTIVE != noone && winwin_mouse_is_over_safe(WINDOW_ACTIVE))))
2022-01-13 05:24:03 +01:00
2023-01-01 02:06:02 +01:00
#macro DELTA_TIME delta_time / 1_000_000
2023-11-08 08:38:04 +01:00
#macro INLINE gml_pragma("forceinline");
2024-10-03 12:20:00 +02:00
#macro is is_instanceof
2023-11-08 08:38:04 +01:00
2023-02-14 02:51:14 +01:00
#macro CONF_TESTING false
2023-06-17 18:59:20 +02:00
globalvar TESTING, TEST_ERROR;
2023-02-14 02:51:14 +01:00
TESTING = CONF_TESTING;
2023-06-17 18:59:20 +02:00
TEST_ERROR = false;
2023-02-14 02:51:14 +01:00
2023-04-03 13:55:12 +02:00
#macro DEMO false
#macro ItchDemo:DEMO true
#macro SteamDemo:DEMO true
2022-12-12 09:08:03 +01:00
2022-01-13 05:24:03 +01:00
#region color
#macro c_ui_blue_dkblack $251919
#macro c_ui_blue_mdblack $2c1e1e
#macro c_ui_blue_black $362727
#macro c_ui_blue_dkgrey $4e3b3b
#macro c_ui_blue_grey $816d6d
#macro c_ui_blue_ltgrey $8f7e7e
#macro c_ui_blue_white $e8d6d6
#macro c_ui_cyan $e9ff88
2022-11-01 03:06:03 +01:00
2022-01-13 05:24:03 +01:00
#macro c_ui_yellow $78e4ff
#macro c_ui_orange $6691ff
#macro c_ui_orange_light $92c2ff
#macro c_ui_red $4b00eb
#macro c_ui_pink $b700eb
#macro c_ui_purple $d40092
#macro c_ui_lime_dark $38995e
#macro c_ui_lime $5dde8f
#macro c_ui_lime_light $b2ffd0
2022-11-18 03:20:31 +01:00
#macro c_ui_white $ffffff
2022-01-13 05:24:03 +01:00
#endregion
2022-12-12 09:08:03 +01:00
#macro printlog if(log) show_debug_message
2022-12-13 09:20:36 +01:00
2023-07-06 19:49:16 +02:00
#macro RETURN_ON_REST if(!PROJECT.animator.is_playing || !PROJECT.animator.frame_progress) return;
2023-02-14 02:51:14 +01:00
2023-06-10 13:59:45 +02:00
#macro PANEL_PAD THEME_VALUE.panel_padding
2023-02-14 02:51:14 +01:00
function print(str) {
2024-02-04 07:33:42 +01:00
INLINE
2023-02-28 09:43:01 +01:00
noti_status(string(str));
2023-02-14 02:51:14 +01:00
}
2022-12-13 09:20:36 +01:00
function printIf(cond, log) {
2024-02-04 07:33:42 +01:00
INLINE
if(cond) print(log);
2022-12-13 09:20:36 +01:00
}
2024-06-22 04:19:30 +02:00
2022-01-13 05:24:03 +01:00
#endregion
#region presets
function INIT_FOLDERS() {
2023-12-05 13:49:18 +01:00
directory_verify(DIRECTORY + "Palettes");
directory_verify(DIRECTORY + "Gradients");
2022-01-13 05:24:03 +01:00
}
#endregion
#region default
2023-03-28 06:58:28 +02:00
globalvar DEF_SURFACE, USE_DEF;
DEF_SURFACE = noone;
USE_DEF = -10;
2022-01-13 05:24:03 +01:00
function DEF_SURFACE_RESET() {
2023-03-28 06:58:28 +02:00
if(is_surface(DEF_SURFACE)) return;
DEF_SURFACE = surface_create_valid(32, 32);
2022-01-13 05:24:03 +01:00
surface_set_target(DEF_SURFACE);
2023-03-28 06:58:28 +02:00
draw_clear(c_white);
2022-01-13 05:24:03 +01:00
surface_reset_target();
}
DEF_SURFACE_RESET();
2023-03-08 14:59:54 +01:00
#endregion
2023-05-08 19:14:30 +02:00
#region debug
2024-05-07 06:53:51 +02:00
global.FLAG = {
2024-06-21 03:52:35 +02:00
render : 0,
2024-05-07 06:53:51 +02:00
renderTime : false,
keyframe_override : true,
wav_import : true,
ase_import : false,
};
2022-01-13 05:24:03 +01:00
#endregion