Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var i, ii, xx, yy, h, w, padding, str, n, rep;
- n = 9;
- h = 32;
- w = 300;
- padding = 12;
- xx = (room_width / 2) - (room_width / 4);
- yy = room_height / 2;
- rep = min(n, ds_list_size(global.FilesList) + (1 * is_even(ds_list_size(global.FilesList))));
- ii = -1 - ((rep - 1) / 2);
- draw_set_halign(1);
- draw_set_valign(1);
- repeat (rep) {
- ii += 1;
- yy = (room_height / 2) + ((h + padding) * ii)
- i = ((Sel + ii) + (ds_list_size(global.FilesList) * 2)) mod ds_list_size(global.FilesList);
- draw_set_color(c_white);
- if (i == Sel) draw_set_color(c_yellow);
- draw_set_alpha(1 - (abs(ii) / 4));
- str = ds_list_find_value(global.FilesList, i);
- if (string_length(str) > 30) { str = string_delete(str, 28, string_length(str)); str += "..."; }
- draw_text(xx, yy, str);
- draw_rectangle(xx - (w / 2), yy - (h / 2), xx + (w / 2), yy + (h / 2), 1);
- }
- draw_set_color(c_red);
- draw_line(0, room_height / 2, room_width, room_height / 2);
Add Comment
Please, Sign In to add comment