// Draw GUI
var _w = display_get_gui_width();
var _h = display_get_gui_height();

// 变暗
draw_set_color(c_black);
draw_set_alpha(fan_darken);
draw_rectangle(0, 0, _w, _h, false);
draw_set_alpha(1.0);

// 单层surface
var _surf = surface_create(_w, _h);
surface_set_target(_surf);
draw_clear_alpha(c_black, 0);

// 文字
if fan_darken_target > 0
{
draw_set_color(c_white);
draw_set_alpha(1.0);
draw_set_font(fTest);
draw_set_halign(fa_right);
draw_text(_w - 48, 64,  "PAUSED");
draw_text(_w - 48, 128, "Z - SAVE&EXIT");
draw_text(_w - 48, 192, "X - CONTINUE");
}

surface_reset_target();
draw_surface(_surf, 0, 0);
surface_free(_surf);