Commit 313290f0 authored by nevcairiel's avatar nevcairiel
Browse files

AceGUI-3.0: Slider: Add a more visible backdrop/border around the manual input area (Ticket #98)

git-svn-id: https://repos.wowace.com/wow/ace3/trunk@888 5debad98-a965-4143-8383-f471b3509dcf
parent fb9b8de5
......@@ -16,7 +16,7 @@ local CreateFrame, UIParent = CreateFrame, UIParent
--------------------------
do
local Type = "Slider"
local Version = 8
local Version = 9
local function OnAcquire(self)
self:SetWidth(200)
......@@ -164,6 +164,14 @@ do
end
end
local function EditBox_OnEnter(this)
this:SetBackdropBorderColor(0.5,0.5,0.5,1)
end
local function EditBox_OnLeave(this)
this:SetBackdropBorderColor(0.3,0.3,0.3,0.8)
end
local function SetIsPercent(self, value)
self.ispercent = value
UpdateLabels(self)
......@@ -182,6 +190,12 @@ do
insets = { left = 3, right = 3, top = 6, bottom = 6 }
}
local ManualBackdrop = {
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
tile = true, edgeSize = 1, tileSize = 5,
}
local function Constructor()
local frame = CreateFrame("Frame",nil,UIParent)
local self = {}
......@@ -240,15 +254,14 @@ do
editbox:EnableMouse(true)
editbox:SetScript("OnEscapePressed",EditBox_OnEscapePressed)
editbox:SetScript("OnEnterPressed",EditBox_OnEnterPressed)
editbox:SetScript("OnEnter",EditBox_OnEnter)
editbox:SetScript("OnLeave",EditBox_OnLeave)
editbox:SetBackdrop(ManualBackdrop)
editbox:SetBackdropColor(0,0,0,0.5)
editbox:SetBackdropBorderColor(0.3,0.3,0.30,0.80)
self.editbox = editbox
editbox.obj = self
local bg = editbox:CreateTexture(nil,"BACKGROUND")
editbox.bg = bg
bg:SetTexture("Interface\\ChatFrame\\ChatFrameBackground")
bg:SetVertexColor(0,0,0,0.25)
bg:SetAllPoints(editbox)
slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
frame:SetWidth(200)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment