Pixel-Composer/objects/o_main/Draw_75.gml

62 lines
2.1 KiB
Plaintext
Raw Normal View History

2022-01-13 05:24:03 +01:00
/// @description tooltip filedrop
#region tooltip
2023-01-25 06:49:00 +01:00
if(is_array(TOOLTIP) || TOOLTIP != "") {
2023-02-14 02:51:14 +01:00
if(is_struct(TOOLTIP) && struct_has(TOOLTIP, "drawTooltip")) {
TOOLTIP.drawTooltip();
} else if(is_array(TOOLTIP)) {
2023-01-25 06:49:00 +01:00
var content = TOOLTIP[0];
var type = TOOLTIP[1];
switch(type) {
case VALUE_TYPE.float :
case VALUE_TYPE.integer :
case VALUE_TYPE.text :
case VALUE_TYPE.path :
2023-02-17 04:48:54 +01:00
draw_tooltip_text(string_real(content));
2023-01-25 06:49:00 +01:00
break;
case VALUE_TYPE.boolean :
2023-02-14 02:51:14 +01:00
draw_tooltip_text(content? get_text("true", "True") : get_text("false", "False"));
2023-01-25 06:49:00 +01:00
break;
case VALUE_TYPE.curve :
2023-02-14 02:51:14 +01:00
draw_tooltip_text("[" + get_text("tooltip_curve_object", "Curve Object") + "]");
2023-01-25 06:49:00 +01:00
break;
case VALUE_TYPE.color :
draw_tooltip_color(content);
break;
case VALUE_TYPE.d3object :
2023-02-14 02:51:14 +01:00
draw_tooltip_text("[" + get_text("tooltip_3d_object", "3D Object") + "]");
2023-01-25 06:49:00 +01:00
break;
case VALUE_TYPE.object :
2023-02-14 02:51:14 +01:00
draw_tooltip_text("[" + get_text("tooltip_object", "Object") + "]");
2023-01-25 06:49:00 +01:00
break;
case VALUE_TYPE.surface :
draw_tooltip_surface(content);
break;
2023-02-14 02:51:14 +01:00
case VALUE_TYPE.rigid :
draw_tooltip_text("[" + get_text("tooltip_rigid_object", "Rigidbody Object") + "id: " + string(content) + "]");
break;
case VALUE_TYPE.particle :
draw_tooltip_text("[" + get_text("tooltip_particle_object", "Particle Object") + "]");
break;
case VALUE_TYPE.pathnode :
draw_tooltip_text("[" + get_text("tooltip_path_object", "Path Object") + "]");
break;
case VALUE_TYPE.fdomain :
draw_tooltip_text("[" + get_text("tooltip_fluid_object", "Fluid Domain Object") + "id: " + string(content) + "]");
break;
2023-01-25 06:49:00 +01:00
}
} else
draw_tooltip_text(TOOLTIP);
2022-01-13 05:24:03 +01:00
}
TOOLTIP = "";
2023-02-14 02:51:14 +01:00
#endregion
#region safe mode
if(SAFE_MODE) {
draw_sprite_stretched_ext(THEME.ui_panel_active, 0, 0, 0, WIN_W, WIN_H, COLORS._main_value_negative, 1);
draw_set_text(f_h1, fa_right, fa_bottom, COLORS._main_value_negative);
draw_set_alpha(0.1);
draw_text(WIN_W - ui(16), WIN_H - ui(8), get_text("safe_mode", "SAFE MODE"));
draw_set_alpha(1);
}
2022-01-13 05:24:03 +01:00
#endregion