Pixel-Composer/objects/o_dialog_graph_connection/Draw_64.gml

43 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-03-05 07:16:44 +01:00
/// @description init
if !ready exit;
#region base UI
draw_sprite_stretched(THEME.dialog_bg, 0, dialog_x, dialog_y, dialog_w, dialog_h);
if(sFOCUS)
draw_sprite_stretched_ext(THEME.dialog_active, 0, dialog_x, dialog_y, dialog_w, dialog_h, COLORS._main_accent, 1);
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(16), __txtx("dialog_connection_title", "Connection settings"));
2023-03-05 07:16:44 +01:00
#endregion
#region draw
var yy = dialog_y + ui(64);
var ww = ui(128);
2023-06-21 20:36:53 +02:00
bs_type.setFocusHover(sFOCUS, sHOVER);
2023-03-05 07:16:44 +01:00
bs_type.register();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
2023-06-05 18:27:53 +02:00
draw_text(dialog_x + ui(32), yy, __txt("Type"));
2023-03-05 07:16:44 +01:00
bs_type.draw(dialog_x + dialog_w - ui(24) - ww, yy - TEXTBOX_HEIGHT / 2, ww, TEXTBOX_HEIGHT, PREF_MAP[? "curve_connection_line"], mouse_ui);
yy += ui(40);
2023-06-21 20:36:53 +02:00
tb_width.setFocusHover(sFOCUS, sHOVER);
2023-03-05 07:16:44 +01:00
tb_width.register();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
2023-06-05 18:27:53 +02:00
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_thickness", "Line thickness"));
2023-03-05 07:16:44 +01:00
tb_width.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PREF_MAP[? "connection_line_width"], mouse_ui,, fa_right, fa_center);
yy += ui(40);
2023-06-21 20:36:53 +02:00
tb_corner.setFocusHover(sFOCUS, sHOVER);
2023-03-05 07:16:44 +01:00
tb_corner.register();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
2023-06-05 18:27:53 +02:00
draw_text(dialog_x + ui(32), yy, __txtx("dialog_connection_radius", "Corner radius"));
2023-03-05 07:16:44 +01:00
tb_corner.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PREF_MAP[? "connection_line_corner"], mouse_ui,, fa_right, fa_center);
2023-07-30 19:56:53 +02:00
yy += ui(40);
tb_aa.setFocusHover(sFOCUS, sHOVER);
tb_aa.register();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
draw_text(dialog_x + ui(32), yy, __txtx("pref_connection_aa", "Connection anti aliasing"));
tb_aa.draw(dialog_x + dialog_w - ui(24), yy, ww, TEXTBOX_HEIGHT, PREF_MAP[? "connection_line_aa"], mouse_ui,, fa_right, fa_center);
2023-03-05 07:16:44 +01:00
#endregion