Mercurial > wow > inventory
diff Frames.lua @ 104:8502f02bf543
Increased edge size to make them more visible.
Item mover window is no longer setting point to itself.
Lowered description position so it doesn?t overlap the title.
author | Zerotorescue |
---|---|
date | Tue, 11 Jan 2011 23:13:40 +0100 |
parents | 6ae44d372360 |
children | d3fbb5676a5e |
line wrap: on
line diff
--- a/Frames.lua Tue Jan 11 19:51:30 2011 +0100 +++ b/Frames.lua Tue Jan 11 23:13:40 2011 +0100 @@ -5,8 +5,8 @@ local this = self.frame or self; GameTooltip:SetOwner(this, "ANCHOR_NONE"); - if this.tooltipLocation and this.tooltipLocation == "TOP" then - GameTooltip:SetPoint("TOP", this, "TOP"); + if this.tooltipLocation and this.tooltipLocation == "BOTTOM" then + GameTooltip:SetPoint("TOP", this, "BOTTOM"); else GameTooltip:SetPoint("BOTTOM", this, "TOP"); end @@ -42,7 +42,7 @@ frame:SetBackdrop({ bgFile = "Interface\\ChatFrame\\ChatFrameBackground", edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border", - edgeSize = 13, + edgeSize = 20, insets = { left = 5, right = 5, @@ -59,17 +59,19 @@ -- Set event handlers frame:SetScript("OnMouseUp", function(this) this:StopMovingOrSizing(); end); frame:SetScript("OnShow", function(this) - -- We wish to display our box at a similar position as the default interface's static popups, so we literally copied the code for these popups - local lastFrame = StaticPopup_DisplayedFrames[#StaticPopup_DisplayedFrames]; - if lastFrame then - this:SetPoint("TOP", lastFrame, "BOTTOM", 0, 0); - else - this:SetPoint("TOP", UIParent, "TOP", 0, -135); + if not tContains(StaticPopup_DisplayedFrames, this) then + -- We wish to display our box at a similar position as the default interface's static popups, so we literally copied the code for these popups + local lastFrame = StaticPopup_DisplayedFrames[#StaticPopup_DisplayedFrames]; + if lastFrame then + this:SetPoint("TOP", lastFrame, "BOTTOM", 0, 0); + else + this:SetPoint("TOP", UIParent, "TOP", 0, -135); + end + + -- Position other static popups below this + tinsert(StaticPopup_DisplayedFrames, this); end - -- Position other static popups below this - tinsert(StaticPopup_DisplayedFrames, this); - this:AdjustScrollTableRows(); PlaySound("OrcExploration"); @@ -118,8 +120,8 @@ -- Description local lblDescription = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal"); - lblDescription:SetPoint("TOPLEFT", frame, "TOPLEFT", 10, -23); - lblDescription:SetWidth(frameWidth - 10 - 10); -- 10 margin left & 10 margin right + lblDescription:SetPoint("TOPLEFT", frame, "TOPLEFT", 15, -25); + lblDescription:SetWidth(frameWidth - 15 - 15); -- 10 margin left & 10 margin right lblDescription:SetJustifyH("LEFT"); lblDescription:SetJustifyV("TOP"); lblDescription:SetText("The items listed below can be refilled from this location, do you wish to move them to your bags?"); @@ -131,7 +133,7 @@ local btnMove = CreateFrame("Button", "$parentProceed", frame, "UIPanelButtonTemplate"); btnMove:SetHeight(21); btnMove:SetWidth(125); - btnMove:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 15, 10); + btnMove:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 15, 11); btnMove:SetText("Move Items"); btnMove:SetScript("OnClick", onAccept); btnMove:SetScript("OnEnter", ShowTooltip); @@ -145,7 +147,7 @@ local btnCancel = CreateFrame("Button", "$parentCancel", frame, "UIPanelButtonTemplate"); btnCancel:SetHeight(21); btnCancel:SetWidth(125); - btnCancel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 10); + btnCancel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 11); btnCancel:SetText("Cancel"); btnCancel:SetScript("OnClick", onCancel); btnCancel:SetScript("OnEnter", ShowTooltip); @@ -158,8 +160,8 @@ -- Because the scrolling table code-behind will change this element's height, we can't rely on that. Make a dummy frame which we can measure local frmMeasureDummy = CreateFrame("Frame", nil, frame); frmMeasureDummy:SetPoint("TOP", frame.lblDescription, "BOTTOM", 0, -20); - frmMeasureDummy:SetPoint("LEFT", frame.lblDescription, "LEFT", 10, 0); - frmMeasureDummy:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -10, 35); + frmMeasureDummy:SetPoint("LEFT", frame.lblDescription, "LEFT", 15, 0); + frmMeasureDummy:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 35); frame.frmMeasureDummy = frmMeasureDummy; @@ -222,8 +224,8 @@ frame.scrollTable = table; table.frame:SetPoint("TOP", frame.lblDescription, "BOTTOM", 0, -20); - table.frame:SetPoint("LEFT", frame.lblDescription, "LEFT", 10, 0); - table.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -10, 35); + table.frame:SetPoint("LEFT", frame, "LEFT", 15, 0); + table.frame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -15, 35); -- Change the amount of displayed rows based on the size of the frame frame.AdjustScrollTableRows = function(this)