Guest User

Untitled

a guest
May 16th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // VinMod code, taken from DPM. Cleaned by Orpheon.
  2.  
  3. xoffset = view_xview[0];
  4. yoffset = view_yview[0];
  5. xsize = view_wview[0];
  6. ysize = view_hview[0];
  7. xbegin = 120;
  8. ybegin = 40;
  9. spacing = 14;
  10. width = 300;
  11.  
  12. x_left = xoffset + 180;
  13. y_top = yoffset + 8;
  14. x_right = xoffset + xsize - 10;
  15. y_bottom = yoffset + ysize - 10;
  16.  
  17. // Window coordinates:
  18. window_left = x_left + 10;
  19. window_right = x_right - 10;
  20. window_top = y_top + 20;
  21. window_bottom = y_bottom - 30;
  22.  
  23. draw_set_color(c_gray);
  24. draw_roundrect(x_left,y_top,x_right,y_bottom + 5,false);  
  25. draw_rectangle_color(window_left, window_top, window_right, window_bottom,c_black,c_black,c_black,c_black,false);// The big log screen
  26. draw_rectangle_color(x_left + 10,y_bottom - 25,x_right - 10,y_bottom - 5,c_black,c_black,c_black,c_black,false);// The input field
  27.  
  28. // Console window bevel:
  29. draw_line_color(window_left, window_top, window_left, window_bottom,c_ltgray,c_ltgray);
  30. draw_line_color(window_left, window_top, window_right, window_top,c_ltgray,c_ltgray);
  31. draw_line_color(window_right, window_top, window_right, window_bottom,c_dkgray,c_dkgray);
  32. draw_line_color(window_left, window_bottom, window_right, window_bottom,c_dkgray,c_dkgray);
  33. // Input field bevel:
  34. draw_line_color(x_left + 10,y_bottom - 25,x_right - 10,y_bottom - 25,c_ltgray,c_ltgray);
  35. draw_line_color(x_left + 10,y_bottom - 25,x_left + 10,y_bottom - 5,c_ltgray,c_ltgray);
  36.  
  37. draw_set_color(c_white);
  38. draw_set_valign(fa_middle);
  39. draw_set_halign(fa_left);
  40. draw_set_alpha(1);
  41. draw_set_font(fnt_consoleTitle);
  42. draw_text(x_left+15, y_top+10, "Console - OHU"+string(GAME_VERSION_STRING));
  43. draw_set_font(fnt_consoleText);
  44.  
  45. // Draw text in input field
  46. draw_text(x_left+12, y_bottom-15,keyboard_string+typingChar);
  47.  
  48. // Draw the whole log
  49. var message;
  50. for(i=0; i<ds_list_size(global.consoleLog); i+=1)
  51. {
  52.     message = ds_list_find_value(global.consoleLog, ds_list_size(global.consoleLog)-1-i)
  53.  
  54.     switch string_copy(message, 0, 3)
  55.     {
  56.         case "/:/":// If a color-code was included.
  57.             draw_set_color(getColorCode(string_copy(message, 4, 1)))
  58.             draw_text(window_left+10, (window_bottom-20)-i*spacing, string_copy(message, 5, string_length(message)));
  59.             break
  60.  
  61.         default:
  62.             draw_set_color(c_white);
  63.             draw_text(window_left+5, (window_bottom-20)-i*spacing, message);
  64.             break
  65.     }
  66. }
  67.  
  68.  
  69. draw_set_font(fnt_gg2);
Add Comment
Please, Sign In to add comment