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:
local aspect = CreateFrame("Frame", nil, UIParent)
aspect:RegisterEvent("PLAYER_ENTERING_WORLD")
aspect:SetScript("OnEvent", function(self, event)
UIParent:SetScale(0.6) -- you can change the scale here but you will break the entire add-on --
aspect:UnregisterAllEvents()
print ("Your Resolution Scale has been changed to 0.6")
end)
-- welcome to Project Deranjata Artwork, Visual Style Portion of Project Deranjata
local resolHeight = GetScreenHeight()
local resolWidth = GetScreenWidth()
local aspectRatio = (resolWidth/resolHeight)
print ("if this function works your Aspect ratio is", format("%.2f", aspectRatio))
--This is the Backdrop Variable--
local backdrop = {
bgFile = "Interface\\DialogFrame\\UI-DialogBox-Background",
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
tile = true,
tileSize = 32,
edgeSize = 20,
insets = {
left = 4,
right = 4,
top = 4,
bottom = 4,
}
}
-- This is Left Main Frame Chunk
local frame = CreateFrame("frame", "LeftChatBaseFrame", UIParent)
LeftChatBaseFrame:SetWidth(resolWidth*.34)
LeftChatBaseFrame:SetHeight(resolHeight*.33)
LeftChatBaseFrame:SetPoint("BOTTOMLEFT", UIParent,"BOTTOMLEFT", -6, -6)
LeftChatBaseFrame:SetFrameStrata("BACKGROUND")
LeftChatBaseFrame:SetFrameLevel(1)
LeftChatBaseFrame:SetAlpha(1)
LeftChatBaseFrame:SetBackdrop(backdrop)
-- This is Right Main Frame Chunk
local frame = CreateFrame("frame", "RightChatBaseFrame", UIParent)
RightChatBaseFrame:SetWidth(resolWidth*.34)
RightChatBaseFrame:SetHeight(resolHeight*.33)
RightChatBaseFrame:SetPoint("BOTTOMRIGHT", UIParent,"BOTTOMRIGHT", 6, -6)
RightChatBaseFrame:SetFrameStrata("BACKGROUND")
RightChatBaseFrame:SetFrameLevel(1)
RightChatBaseFrame:SetAlpha(1)
RightChatBaseFrame:SetBackdrop(backdrop)
-- This is the Center Main Frame Chunk
local frame = CreateFrame("frame", "CenterBase", UIParent)
CenterBase:SetWidth(resolWidth*1.007)
CenterBase:SetHeight(resolHeight*.21)
CenterBase:SetPoint("BOTTOM", UIParent,"BOTTOM", 0, -6)
CenterBase:SetFrameStrata("BACKGROUND")
CenterBase:SetFrameLevel(2)
CenterBase:SetBackdrop(backdrop)
-- This is map frame chunk
local frame = CreateFrame("frame", "CenterMapBase", UIParent)
CenterMapBase:SetWidth(resolHeight*.21)
CenterMapBase:SetHeight(resolHeight*.21)
CenterMapBase:SetPoint("BOTTOM", UIParent,"BOTTOM", 0, -6)
CenterMapBase:SetFrameStrata("BACKGROUND")
CenterMapBase:SetFrameLevel(3)
CenterMapBase:SetBackdrop(backdrop)
--Button False Embed--
local frame = CreateFrame("Button", "ExpandLeft", LeftChatBaseFrame, "UIPanelButtonTemplate")
frame:SetHeight(21)
frame:SetWidth(21)
frame:SetText("R")
frame:ClearAllPoints()
frame:SetPoint("TOPRIGHT", -4, -4)
ExpandLeft:SetScript("OnClick", ReloadUI)
--Button False Embed--
local frame = CreateFrame("Button", "ExpandRight", RightChatBaseFrame, "UIPanelButtonTemplate")
frame:SetHeight(21)
frame:SetWidth(22)
frame:SetText("B")
frame:ClearAllPoints()
frame:SetPoint("BOTTOMRIGHT", -4, 4)
ExpandRight:SetScript("OnClick", ToggleAllBags)