Guest User

Untitled

a guest
Jan 11th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.38 KB | None | 0 0
  1. local DataTextPosition = function(f, t, o)
  2.     local left = TukuiInfoLeft
  3.     local right = TukuiInfoRight
  4.     local mapleft = TukuiMinimapStatsLeft
  5.     local mapright = TukuiMinimapStatsRight
  6.     local center = TukuiInfoCenter
  7.     local centerleft = TukuiInfoCenterLeft
  8.     local centerright = TukuiInfoCenterRight
  9.  
  10.    
  11.     if o == 1 then
  12.         t:ClearAllPoints()
  13.         t:SetParent(left)
  14.         t:SetHeight(left:GetHeight())
  15.         t:SetPoint("LEFT", left, 30, 0)
  16.         t:SetPoint('TOP', left)
  17.         t:SetPoint('BOTTOM', left)
  18.     elseif o == 2 then
  19.         t:ClearAllPoints()
  20.         t:SetParent(left)
  21.         t:SetHeight(left:GetHeight())
  22.         t:SetPoint('TOP', left)
  23.         t:SetPoint('BOTTOM', left)
  24.     elseif o == 3 then
  25.         t:ClearAllPoints()
  26.         t:SetParent(left)
  27.         t:SetHeight(left:GetHeight())
  28.         t:SetPoint("RIGHT", left, -30, 0)
  29.         t:SetPoint('TOP', left)
  30.         t:SetPoint('BOTTOM', left)
  31.     elseif o == 4 then
  32.         t:ClearAllPoints()
  33.         t:SetParent(right)
  34.         t:SetHeight(right:GetHeight())
  35.         t:SetPoint("LEFT", right, 30, 0)
  36.         t:SetPoint('TOP', right)
  37.         t:SetPoint('BOTTOM', right)
  38.     elseif o == 5 then
  39.         t:ClearAllPoints()
  40.         t:SetParent(right)
  41.         t:SetHeight(right:GetHeight())
  42.         t:SetPoint('TOP', right)
  43.         t:SetPoint('BOTTOM', right)
  44.     elseif o == 6 then
  45.         t:ClearAllPoints()
  46.         t:SetParent(right)
  47.         t:SetHeight(right:GetHeight())
  48.         t:SetPoint("RIGHT", right, -30, 0)
  49.         t:SetPoint('TOP', right)
  50.         t:SetPoint('BOTTOM', right)
  51.     elseif o == 7 then
  52.         t:ClearAllPoints()
  53.         t:SetParent(mapleft)
  54.         t:SetHeight(mapleft:GetHeight())
  55.         t:SetPoint('TOP', mapleft)
  56.         t:SetPoint('BOTTOM', mapleft)
  57.     elseif o == 8 then
  58.         t:ClearAllPoints()
  59.         t:SetParent(mapright)
  60.         t:SetHeight(mapright:GetHeight())
  61.         t:SetPoint('TOP', mapright)
  62.         t:SetPoint('BOTTOM', mapright)
  63.     elseif o == 9 then
  64.         t:ClearAllPoints()
  65.         t:SetParent(centerleft)
  66.         t:SetHeight(centerleft:GetHeight())
  67.         t:SetPoint('TOP', centerleft)
  68.         t:SetPoint('BOTTOM', centerleft)
  69.     elseif o == 10 then
  70.         t:ClearAllPoints()
  71.         t:SetParent(center)
  72.         t:SetHeight(center:GetHeight())
  73.         t:SetPoint("LEFT", center, 30, 0)
  74.         t:SetPoint('TOP', center)
  75.         t:SetPoint('BOTTOM', center)
  76.     elseif o == 11 then
  77.         t:ClearAllPoints()
  78.         t:SetParent(center)
  79.         t:SetHeight(center:GetHeight())
  80.         t:SetPoint('TOP', center)
  81.         t:SetPoint('BOTTOM', center)
  82.     elseif o == 12 then
  83.         t:ClearAllPoints()
  84.         t:SetParent(center)
  85.         t:SetHeight(center:GetHeight())
  86.         t:SetPoint("RIGHT", center, -30, 0)
  87.         t:SetPoint('TOP', center)
  88.         t:SetPoint('BOTTOM', center)
  89.     elseif o == 13 then
  90.         t:ClearAllPoints()
  91.         t:SetParent(centerright)
  92.         t:SetHeight(centerright:GetHeight())
  93.         t:SetPoint('TOP', centerright)
  94.         t:SetPoint('BOTTOM', centerright)
  95.     else
  96.         f:Hide()
  97.         t:Hide()
  98.     end
  99. end
  100.  
  101. local datatext = {
  102.     "Guild",
  103.     "Friends",
  104.     "Gold",
  105.     "FPS",
  106.     "System",
  107.     "Bags",
  108.     "Gold",
  109.     "Time",
  110.     "Durability",
  111.     "Heal",
  112.     "Damage",
  113.     "Power",
  114.     "Haste",
  115.     "Crit",
  116.     "Avoidance",
  117.     "Armor",
  118.     "Currency",
  119.     "Hit",
  120.     "Mastery",
  121.     "MicroMenu",
  122.     "Regen",
  123.     "Talent",
  124.     "CallToArms",
  125. }
  126.  
  127. for _, data in pairs(datatext) do
  128.     local t = "TukuiStat"
  129.     local frame = _G[t..data]
  130.     local text = _G[t..data.."Text"]
  131.  
  132.     if frame and frame.Option then
  133.         DataTextPosition(frame, text, frame.Option)
  134.             end
  135. end
  136. for _, self in pairs(G.DataText) do
  137.     if self.Text then
  138.         self.Text:SetFont(C.media.pixelfont, 12, "MONOCHROMEOUTLINE")
  139.     end
  140. end
  141.  
  142. for i=1, 3 do
  143.     local dt = G.DataText.Battleground["Text"..i]
  144.     dt:SetFont(C.media.pixelfont, 12, "MONOCHROMEOUTLINE")
  145. end
Add Comment
Please, Sign In to add comment