1 | var x_offset = 0 |
2 | var y_offset = 0 |
3 | var draw_alpha = 1 * image_alpha |
4 | if button_pressed |
5 | { |
6 | x_offset = 2 |
7 | y_offset = 2 |
8 | draw_alpha = 0.8 * image_alpha |
9 | } |
10 | if (active == true) |
11 | { |
12 | draw_set_color(c_white) |
13 | draw_set_alpha(image_alpha * draw_alpha) |
14 | draw_rectangle((x + x_offset - 2), (y + y_offset - 2), (x + sprite_width + 2), (y + sprite_height + 2), false) |
15 | draw_set_alpha(draw_alpha * image_alpha) |
16 | } |
17 | draw_sprite_ext(sprite_index, image_index, (x + x_offset), (y + y_offset), image_xscale, image_yscale, image_angle, c_white, draw_alpha) |
18 | draw_set_alpha(1) |