- added a new builtin plugin: Details_YouAreNotPrepared.

- options panel recreated from scretch.
This commit is contained in:
terciob19
2013-12-20 19:23:57 -02:00
parent 985f8badb8
commit f6d807bf51
34 changed files with 2986 additions and 1296 deletions
+52 -6
View File
@@ -407,7 +407,7 @@ local ButtonMetaFunctions = {}
end
--> custom textures
function ButtonMetaFunctions:InstallCustomTexture (texture, rect)
function ButtonMetaFunctions:InstallCustomTexture (texture, rect, coords)
self.button:SetNormalTexture (nil)
self.button:SetPushedTexture (nil)
@@ -424,7 +424,13 @@ local ButtonMetaFunctions = {}
self.button.texture:SetPoint ("bottomright", self.button, "bottomright", rect.x2, rect.y2)
end
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
if (coords) then
self.button.texture.coords = coords
self.button.texture:SetTexCoord (_unpack (coords.Normal))
else
self.button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
self.button.texture:SetTexture (texture)
end
@@ -440,8 +446,14 @@ local ButtonMetaFunctions = {}
end
end
button.MyObject.is_mouse_over = true
if (button.texture) then
button.texture:SetTexCoord (0, 1, 0.25+(0.0078125/2), 0.5+(0.0078125/2))
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
else
button.texture:SetTexCoord (0, 1, 0.24609375, 0.49609375)
end
end
if (button.MyObject.have_tooltip) then
@@ -466,10 +478,16 @@ local ButtonMetaFunctions = {}
end
end
if (button.texture) then
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
button.MyObject.is_mouse_over = false
if (button.texture and not button.MyObject.is_mouse_down) then
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Normal))
else
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
end
if (button.MyObject.have_tooltip) then
_detalhes.popup:ShowMe (false)
end
@@ -512,6 +530,16 @@ local ButtonMetaFunctions = {}
end
end
button.MyObject.is_mouse_down = true
if (button.texture) then
if (button.texture.coords) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Pushed))
else
button.texture:SetTexCoord (0, 1, 0.5078125, 0.75)
end
end
button.text:SetPoint ("center", button,"center", 1, -1)
button.mouse_down = GetTime()
@@ -548,7 +576,25 @@ local ButtonMetaFunctions = {}
return
end
end
button.MyObject.is_mouse_down = false
if (button.texture) then
if (button.texture.coords) then
if (button.MyObject.is_mouse_over) then
button.texture:SetTexCoord (_unpack (button.texture.coords.Highlight))
else
button.texture:SetTexCoord (_unpack (coords.Normal))
end
else
if (button.MyObject.is_mouse_over) then
button.texture:SetTexCoord (0, 1, 0.24609375, 0.49609375)
else
button.texture:SetTexCoord (0, 1, 0, 0.24609375)
end
end
end
button.text:SetPoint ("center", button,"center", 0, 0)
if (button.MyObject.container.isMoving) then
+8 -1
View File
@@ -239,7 +239,7 @@ local DropDownMetaFunctions = {}
end
--> frame stratas
function DropDownMetaFunctions:SetFrameStrata()
function DropDownMetaFunctions:GetFrameStrata()
return self.dropdown:GetFrameStrata()
end
function DropDownMetaFunctions:SetFrameStrata (strata)
@@ -423,6 +423,13 @@ function DetailsDropDownOnMouseDown (button)
local selectedTexture = _G [button:GetName() .. "_ScrollFrame_ScrollChild_SelectedTexture"]
local mouseOverTexture = _G [button:GetName() .. "_ScrollFrame_ScrollChild_MouseOverTexture"]
--scrollFrame:SetFrameStrata ("DIALOG")
--scrollBorder:SetFrameStrata ("DIALOG")
--scrollChild:SetFrameStrata ("DIALOG")
--print (scrollFrame:GetFrameStrata())
--print (_G ["DetailsOptionsWindow1FragsPvpSlider"]:GetFrameStrata())
local i = 1
local showing = 0
local currentText = button.text:GetText() or ""
+4 -4
View File
@@ -69,7 +69,7 @@
<Frames>
<Frame name="$Parent_Border" parentKey="dropdownborder" hidden="true">
<Frame name="$Parent_Border" parentKey="dropdownborder" hidden="true" frameStrata="DIALOG">
<Size x="150" y="170"/>
<Anchors>
@@ -99,14 +99,14 @@
</Frame>
<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true">
<ScrollFrame name="$Parent_ScrollFrame" parentKey="dropdownframe" hidden="true" frameStrata="DIALOG">
<Size x="150" y="150"/>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$Parent" relativePoint="BOTTOMLEFT" x="0" y="-10" />
</Anchors>
<ScrollChild>
<Frame name="$Parent_ScrollChild">
<Frame name="$Parent_ScrollChild" frameStrata="DIALOG">
<Size x="150" y="150"/>
@@ -183,7 +183,7 @@
</Button>
<Button name="DetailsDropDownOptionTemplate" virtual="true">
<Button name="DetailsDropDownOptionTemplate" virtual="true" frameStrata="DIALOG">
<Size x="150" y="20" />
<Layers>
+18 -1
View File
@@ -130,6 +130,17 @@ local LabelMetaFunctions = {}
end
return _object.label:SetJustifyH (_value)
end
--> text valign
local smember_textvalign = function (_object, _value)
if (_value == "^") then
_value = "top"
elseif (_value == "_") then
_value = "bottom"
elseif (_value == "|") then
_value = "middle"
end
return _object.label:SetJustifyV (_value)
end
--> field size width
local smember_width = function (_object, _value)
return _object.label:SetWidth (_value)
@@ -138,11 +149,16 @@ local LabelMetaFunctions = {}
local smember_height = function (_object, _value)
return _object.label:SetHeight (_value)
end
--> outline (shadow)
local smember_outline = function (_object, _value)
_detalhes:SetFontOutline (_object.label, _value)
end
local set_members_function_index = {
["show"] = smember_show,
["hide"] = smember_hide,
["align"] = smember_textalign,
["valign"] = smember_textvalign,
["text"] = smember_text,
["width"] = smember_width,
["height"] = smember_height,
@@ -152,7 +168,8 @@ local LabelMetaFunctions = {}
["fontsize"] = smember_textsize,
["textcolor"] = smember_textcolor,
["textfont"] = smember_textfont,
["textsize"] = smember_textsize
["textsize"] = smember_textsize,
["shadow"] = smember_outline
}
LabelMetaFunctions.__newindex = function (_table, _key, _value)
+2 -2
View File
@@ -397,7 +397,7 @@ local APIFrameFunctions
frame.isMoving = true
frame:StartMoving()
end
elseif (not frame.MyObject.container.isLocked and frame.MyObject.container:IsMovable()) then
if (not frame.isLocked and frame:IsMovable()) then
frame.MyObject.container.isMoving = true
@@ -431,7 +431,7 @@ local APIFrameFunctions
frame.MyObject.container.isMoving = false
end
end
end
end
------------------------------------------------------------------------------------------------------------
--> object constructor