Pixel-Composer/objects/o_dialog_graph_view/Draw_64.gml

39 lines
1.1 KiB
Text
Raw Normal View History

2023-01-25 06:49:00 +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("graph_visibility_title", "Visibility settings"));
2023-01-25 06:49:00 +01:00
#endregion
#region draw
var yy = dialog_y + ui(64);
2023-08-16 20:16:31 +02:00
var ww = ui(128);
var wh = TEXTBOX_HEIGHT;
2023-01-25 06:49:00 +01:00
2023-08-16 20:16:31 +02:00
for( var i = 0, n = array_length(properties); i < n; i++ ) {
var _prop = properties[i];
var _widg = _prop[0];
var _text = _prop[1];
var _data = _prop[2]();
_widg.setFocusHover(sFOCUS, sHOVER);
_widg.register();
draw_set_text(f_p1, fa_left, fa_center, COLORS._main_text);
draw_text(dialog_x + ui(32), yy, _text);
var params = new widgetParam(dialog_x + dialog_w - ui(16) - ww, yy - wh / 2, ww, wh, _data);
if(is_instanceof(_widg, checkBox))
params.halign = fa_center;
_widg.drawParam(params);
yy += ui(40);
}
2023-01-25 06:49:00 +01:00
#endregion