View Single Post
11-21-13, 07:16 AM   #16
Uitat
A Chromatic Dragonspawn
 
Uitat's Avatar
AddOn Author - Click to view addons
Join Date: May 2011
Posts: 162
so far so good

this is just the artwork , still not ready to post the code for the bars, just want your guys opinion if it flows well and the naming conventions are good

Lua Code:
  1. local aspect = CreateFrame("Frame", nil, UIParent)
  2.         aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
  3.         aspect:SetScript("OnEvent", function(self, event)
  4.             UIParent:SetScale(0.6)  -- you can change the scale here but you will break the entire add-on --
  5.             aspect:UnregisterAllEvents()
  6.         print ("Your Resolution Scale has been changed to 0.6")
  7. end)
  8.  
  9.  
  10. -- welcome to Project Deranjata Artwork, Visual Style Portion of Project Deranjata
  11.  
  12. local resolHeight = GetScreenHeight()
  13. local resolWidth = GetScreenWidth()
  14. local aspectRatio = (resolWidth/resolHeight)
  15. print ("if this function works your Aspect ratio is", format("%.2f", aspectRatio))
  16.  
  17. --This is the Backdrop Variable--
  18. local backdrop = {
  19.     bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
  20.     edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
  21.     tile = true,
  22.     tileSize = 32,
  23.     edgeSize = 20,
  24.     insets = {
  25.         left = 4,
  26.         right = 4,
  27.         top = 4,
  28.         bottom = 4,
  29.         }
  30.     }
  31. -- This is Left Main Frame Chunk
  32. local frame = CreateFrame("frame", "LeftChatBaseFrame", UIParent)
  33.         LeftChatBaseFrame:SetWidth(resolWidth*.34)
  34.         LeftChatBaseFrame:SetHeight(resolHeight*.33)
  35.         LeftChatBaseFrame:SetPoint("BOTTOMLEFT", UIParent,"BOTTOMLEFT", -6, -6)
  36.         LeftChatBaseFrame:SetFrameStrata("BACKGROUND")
  37.         LeftChatBaseFrame:SetFrameLevel(1) 
  38.         LeftChatBaseFrame:SetAlpha(1)
  39.         LeftChatBaseFrame:SetBackdrop(backdrop)
  40. -- This is Right Main Frame Chunk
  41. local frame = CreateFrame("frame", "RightChatBaseFrame", UIParent)
  42.         RightChatBaseFrame:SetWidth(resolWidth*.34)
  43.         RightChatBaseFrame:SetHeight(resolHeight*.33)
  44.         RightChatBaseFrame:SetPoint("BOTTOMRIGHT", UIParent,"BOTTOMRIGHT", 6, -6)
  45.         RightChatBaseFrame:SetFrameStrata("BACKGROUND")
  46.         RightChatBaseFrame:SetFrameLevel(1)
  47.         RightChatBaseFrame:SetAlpha(1)
  48.         RightChatBaseFrame:SetBackdrop(backdrop)
  49. -- This is the Center Main Frame Chunk
  50. local frame = CreateFrame("frame", "CenterBase", UIParent)
  51.         CenterBase:SetWidth(resolWidth*1.007)
  52.         CenterBase:SetHeight(resolHeight*.21)
  53.         CenterBase:SetPoint("BOTTOM", UIParent,"BOTTOM", 0, -6)
  54.         CenterBase:SetFrameStrata("BACKGROUND")
  55.         CenterBase:SetFrameLevel(2)
  56.         CenterBase:SetBackdrop(backdrop)
  57. -- This is map frame chunk 
  58. local frame = CreateFrame("frame", "CenterMapBase", UIParent)
  59.         CenterMapBase:SetWidth(resolHeight*.21)
  60.         CenterMapBase:SetHeight(resolHeight*.21)
  61.         CenterMapBase:SetPoint("BOTTOM", UIParent,"BOTTOM", 0, -6)
  62.         CenterMapBase:SetFrameStrata("BACKGROUND")
  63.         CenterMapBase:SetFrameLevel(3)
  64.         CenterMapBase:SetBackdrop(backdrop)
  65.        
  66. --Button False Embed--
  67. local frame = CreateFrame("Button", "ExpandLeft", LeftChatBaseFrame, "UIPanelButtonTemplate")
  68. frame:SetHeight(21)
  69. frame:SetWidth(21)
  70. frame:SetText("R")
  71. frame:ClearAllPoints()
  72. frame:SetPoint("TOPRIGHT", -4, -4)
  73. ExpandLeft:SetScript("OnClick", ReloadUI)
  74.  
  75. --Button False Embed--
  76. local frame = CreateFrame("Button", "ExpandRight", RightChatBaseFrame, "UIPanelButtonTemplate")
  77. frame:SetHeight(21)
  78. frame:SetWidth(22)
  79. frame:SetText("B")
  80. frame:ClearAllPoints()
  81. frame:SetPoint("BOTTOMRIGHT", -4, 4)
  82. ExpandRight:SetScript("OnClick", ToggleAllBags)

Last edited by Uitat : 11-21-13 at 07:21 AM. Reason: forgot the aspect ratio changing fuction
  Reply With Quote