2022-12-10 05:06:01 +01:00
|
|
|
/// @description init
|
|
|
|
if !ready exit;
|
|
|
|
|
|
|
|
#region base UI
|
2023-11-13 15:42:14 +01:00
|
|
|
DIALOG_DRAW_BG
|
2022-12-10 05:06:01 +01:00
|
|
|
if(sFOCUS)
|
2023-11-13 15:42:14 +01:00
|
|
|
DIALOG_DRAW_FOCUS
|
2022-12-10 05:06:01 +01:00
|
|
|
|
2023-06-10 13:59:45 +02:00
|
|
|
draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text);
|
2023-06-05 18:27:53 +02:00
|
|
|
draw_text(dialog_x + ui(24), dialog_y + ui(20), __txt("Presets"));
|
2022-12-10 05:06:01 +01:00
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region preset
|
|
|
|
var px = dialog_x + ui(padding);
|
2023-02-28 09:43:01 +01:00
|
|
|
var py = dialog_y + ui(title_height);
|
2022-12-10 05:06:01 +01:00
|
|
|
var pw = dialog_w - ui(padding + padding);
|
2023-02-28 09:43:01 +01:00
|
|
|
var ph = dialog_h - ui(title_height + padding)
|
2022-12-10 05:06:01 +01:00
|
|
|
|
2023-11-13 15:42:14 +01:00
|
|
|
draw_sprite_stretched(THEME.ui_panel_bg, 1, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16));
|
2023-06-21 20:36:53 +02:00
|
|
|
sc_presets.setFocusHover(sFOCUS, sHOVER);
|
2022-12-10 05:06:01 +01:00
|
|
|
sc_presets.draw(px, py);
|
|
|
|
|
|
|
|
var bx = dialog_x + dialog_w - ui(32 + 16);
|
|
|
|
var by = dialog_y + ui(16);
|
|
|
|
|
2023-06-05 18:27:53 +02:00
|
|
|
if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), mouse_ui, sFOCUS, sHOVER, __txtx("preset_new", "New preset"), THEME.add, 1) == 2) {
|
2024-07-27 05:46:16 +02:00
|
|
|
adding = !adding;
|
|
|
|
if(adding) tb_add.activate();
|
2022-12-10 05:06:01 +01:00
|
|
|
}
|
|
|
|
#endregion
|