Advertisement
Mister_Stefan

Img Attach (OT)

Apr 1st, 2022
1,447
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var texture_object = {
  2.  
  3. }
  4. function AddTexture(path) {
  5.     if (texture_object[path] == undefined) {
  6.         texture_object[path] = Render.AddTexture(path);
  7.         return texture_object[path];
  8.     }
  9.     else
  10.         return texture_object[path];
  11. }
  12. function drawTexture()
  13. {
  14.     if (!UI.IsMenuOpen()) return;
  15.     var ref_menu = UI.GetMenuPosition();
  16.     var multiplier = UI.GetValue(["Config", "Cheat", "General", "GUI scaling"]);
  17.    
  18.     var menu = {
  19.         x: ref_menu[0],
  20.         y: ref_menu[1],
  21.         w: ref_menu[2],
  22.         h: ref_menu[3]
  23.     }
  24.     var r1 = {
  25.         p: AddTexture("ot/pictures/anime.png"),
  26.         w: 262 * multiplier,
  27.         h: 452 * multiplier
  28.     }
  29.     var r2 = {
  30.         p: AddTexture("ot/pictures/kanna.png"),
  31.         w: 250 * multiplier,
  32.         h: 144 * multiplier
  33.     }
  34.    
  35.     Render.TexturedRect(menu.x - r1.w + (17 * multiplier), menu.y, r1.w, r1.h, r1.p); // 17 for her fingys
  36.     Render.TexturedRect(menu.x + (menu.w - r2.w) - 5, menu.y - r2.h, r2.w, r2.h, r2.p); // -5 to fix falloff
  37.    
  38. }
  39. Cheat.RegisterCallback("Draw", "drawTexture");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement