Guest User

Untitled

a guest
Jan 15th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var i, ii, xx, yy, h, w, padding, str, n, rep;
  2. n = 9;
  3. h = 32;
  4. w = 300;
  5. padding = 12;
  6. xx = (room_width / 2) - (room_width / 4);
  7. yy = room_height / 2;
  8. rep = min(n, ds_list_size(global.FilesList) + (1 * is_even(ds_list_size(global.FilesList))));
  9. ii = -1 - ((rep - 1) / 2);
  10. draw_set_halign(1);
  11. draw_set_valign(1);
  12. repeat (rep) {
  13.     ii += 1;
  14.     yy = (room_height / 2) + ((h + padding) * ii)
  15.     i = ((Sel + ii) + (ds_list_size(global.FilesList) * 2)) mod ds_list_size(global.FilesList);
  16.     draw_set_color(c_white);
  17.     if (i == Sel) draw_set_color(c_yellow);
  18.     draw_set_alpha(1 - (abs(ii) / 4));
  19.     str = ds_list_find_value(global.FilesList, i);
  20.     if (string_length(str) > 30) { str = string_delete(str, 28, string_length(str)); str += "..."; }
  21.     draw_text(xx, yy, str);
  22.     draw_rectangle(xx - (w / 2), yy - (h / 2), xx + (w / 2), yy + (h / 2), 1);
  23. }
  24. draw_set_color(c_red);
  25. draw_line(0, room_height / 2, room_width, room_height / 2);
Add Comment
Please, Sign In to add comment