Advertisement
Munomario777

RoA CSS Template

Mar 4th, 2020
3,715
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. //Fancy CSS template by Muno
  2. //Put in css_draw.gml
  3.  
  4. var temp_x = x + 8;
  5. var temp_y = y + 9;
  6.  
  7. patch_ver = "1.0";
  8. patch_day = "04";
  9. patch_month = "MAR";
  10.  
  11. var num_alts = 16;
  12. var alt_cur = get_player_color(player);
  13.  
  14.  
  15.  
  16. //Alt name init. var doesn't work with arrays lol
  17.  
  18. alt_name[0] = "Default";
  19. alt_name[1] = "woag";
  20. alt_name[2] = "woag";
  21. alt_name[3] = "woag";
  22. alt_name[4] = "woag";
  23. alt_name[5] = "woag";
  24. alt_name[6] = "woag";
  25. alt_name[7] = "woag";
  26. alt_name[8] = "woag";
  27. alt_name[9] = "woag";
  28. alt_name[10] = "woag";
  29. alt_name[11] = "woag";
  30. alt_name[12] = "woag";
  31. alt_name[13] = "woag";
  32. alt_name[14] = "woag";
  33. alt_name[15] = "woag";
  34.  
  35.  
  36.  
  37. //Patch
  38.  
  39. draw_set_halign(fa_left);
  40.  
  41. textDraw(temp_x + 2, temp_y + 30, "medFont", c_white, 0, 1000, 1, true, 1, "VER. " + patch_ver);
  42.  
  43. textDraw(temp_x + 2, temp_y + 50, "fName", c_white, 0, 1000, 1, true, 1, patch_day + " " + patch_month);
  44.  
  45.  
  46.  
  47. //Alt
  48.  
  49. rectDraw(temp_x, temp_y + 135, temp_x + 201, temp_y + 142, c_black);
  50.  
  51. for(i = 0; i < num_alts; i++){
  52. var draw_color = (i == alt_cur) ? c_white : c_gray;
  53. var draw_x = temp_x + 2 + 10 * i;
  54. rectDraw(draw_x, temp_y + 137, draw_x + 7, temp_y + 140, draw_color);
  55. }
  56.  
  57. draw_set_halign(fa_left);
  58.  
  59. //include alt. name
  60. textDraw(temp_x + 2, temp_y + 124, "fName", c_white, 0, 1000, 1, true, 1, "Alt. " + (alt_cur < 9 ? "0" : "") + string(alt_cur + 1) + ": " + alt_name[alt_cur]);
  61.  
  62. //exclude alt. name
  63. //textDraw(temp_x + 2, temp_y + 124, "fName", c_white, 0, 1000, 1, true, 1, "Alt. " + (alt_cur < 9 ? "0" : "") + string(alt_cur + 1));
  64.  
  65.  
  66.  
  67. #define textDraw(x, y, font, color, lineb, linew, scale, outline, alpha, string)
  68.  
  69. draw_set_font(asset_get(argument[2]));
  70.  
  71. if argument[7]{ //outline. doesn't work lol
  72. for (i = -1; i < 2; i++){
  73. for (j = -1; j < 2; j++){
  74. draw_text_ext_transformed_color(argument[0] + i * 2, argument[1] + j * 2, argument[9], argument[4], argument[5], argument[6], argument[6], 0, c_black, c_black, c_black, c_black, 1);
  75. }
  76. }
  77. }
  78.  
  79. draw_text_ext_transformed_color(argument[0], argument[1], argument[9], argument[4], argument[5], argument[6], argument[6], 0, argument[3], argument[3], argument[3], argument[3], argument[8]);
  80.  
  81. return string_width_ext(argument[9], argument[4], argument[5]);
  82.  
  83.  
  84.  
  85. #define rectDraw(x1, y1, x2, y2, color)
  86.  
  87. draw_rectangle_color(argument[0], argument[1], argument[2], argument[3], argument[4], argument[4], argument[4], argument[4], false);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement