WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Legion Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=177)
-   -   WorldFrame resize (https://www.wowinterface.com/forums/showthread.php?t=54005)

Resike 07-24-16 05:41 AM

WorldFrame resize
 
The rendered world acts really weird when resizing the WorldFrame from TOP or RIGTH, BOTTOM and LEFT works fine. The aspect raito is lost and the 3D object in the world can't be clicked properly.

Lua Code:
  1. WorldFrame:SetMinResize(178, 100)
  2.     --WorldFrame:SetClampedToScreen(true)
  3.     local C = CreateFrame("Frame", nil, WorldFrame)
  4.     C:SetClampedToScreen(true)
  5.     C:SetFrameStrata("Fullscreen_Dialog")
  6.     C:SetPoint("Center", WorldFrame, "Center", 0, 0)
  7.     C:SetSize(12, 12)
  8.     C:SetFrameLevel(20)
  9.     C:EnableMouse(true)
  10.     C.texture = C:CreateTexture(nil, "Overlay")
  11.     C.texture:SetAllPoints(C)
  12.     C.texture:SetTexture("Interface\\Addons\\ZPerl_RaidHelper\\Images\\XPerl_MoveCursor")
  13.     C:SetScript("OnMouseDown", function(self, button)
  14.         if button == "LeftButton" then
  15.             WorldFrame:SetMovable(true)
  16.             WorldFrame:StartMoving()
  17.         end
  18.     end)
  19.     C:SetScript("OnMouseUp", function(self, button)
  20.         WorldFrame:StopMovingOrSizing()
  21.         WorldFrame:SetMovable(false)
  22.     end)
  23.     local BR = CreateFrame("Frame", nil, WorldFrame)
  24.     BR:SetClampedToScreen(true)
  25.     BR:SetFrameStrata("Fullscreen_Dialog")
  26.     BR:SetPoint("BottomRight", WorldFrame, "BottomRight", 0, 0)
  27.     BR:SetSize(12, 12)
  28.     BR:SetFrameLevel(20)
  29.     BR:EnableMouse(true)
  30.     BR.texture = BR:CreateTexture(nil, "Overlay")
  31.     BR.texture:SetAllPoints(BR)
  32.     BR.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Up")
  33.     BR:SetScript("OnEnter", function(self)
  34.         BR.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Highlight")
  35.     end)
  36.     BR:SetScript("OnLeave", function(self)
  37.         BR.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Up")
  38.     end)
  39.     BR:SetScript("OnMouseDown", function(self, button)
  40.         if button == "LeftButton" then
  41.             WorldFrame:SetResizable(true)
  42.             WorldFrame:StartSizing("BottomRight")
  43.         end
  44.         BR.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Down")
  45.     end)
  46.     BR:SetScript("OnMouseUp", function(self, button)
  47.         WorldFrame:StopMovingOrSizing()
  48.         WorldFrame:SetResizable(false)
  49.     end)
  50.     local TL = CreateFrame("Frame", nil, WorldFrame)
  51.     TL:SetClampedToScreen(true)
  52.     TL:SetFrameStrata("Fullscreen_Dialog")
  53.     TL:SetPoint("TopLeft", WorldFrame, "TopLeft", 0, 0)
  54.     TL:SetSize(12, 12)
  55.     TL:SetFrameLevel(20)
  56.     TL:EnableMouse(true)
  57.     TL.texture = TL:CreateTexture(nil, "Overlay")
  58.     local ULx, ULy, LLx, LLy, URx, URy, LRx, LRy = TL.texture:GetTexCoord()
  59.     TL.texture:SetTexCoord(LRx, LRy, URx, URy, LLx, LLy, ULx, ULy)
  60.     TL.texture:SetAllPoints(TL)
  61.     TL.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Up")
  62.     TL:SetScript("OnEnter", function(self)
  63.         TL.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Highlight")
  64.     end)
  65.     TL:SetScript("OnLeave", function(self)
  66.         TL.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Up")
  67.     end)
  68.     TL:SetScript("OnMouseDown", function(self, button)
  69.         if button == "LeftButton" then
  70.             WorldFrame:SetResizable(true)
  71.             WorldFrame:StartSizing("TopLeft")
  72.         end
  73.         TL.texture:SetTexture("Interface\\ChatFrame\\UI-ChatIM-SizeGrabber-Down")
  74.     end)
  75.     TL:SetScript("OnMouseUp", function(self, button)
  76.         WorldFrame:StopMovingOrSizing()
  77.         WorldFrame:SetResizable(false)
  78.     end)


All times are GMT -6. The time now is 05:09 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI