- Added a new tab on options panel for tooltip configuration.

- Added a new tab on options panel for broker config.
- Added new abbreviation method called "comma".
- Fully removed the delete button switch between instances, new all instances have a delete button.
- Full re-write on the instance, delete and close buttons.
- Fixed the total healing done by the raid group which was counting overheal too.
- HotCorners now sort icons according with most used.
- Few changes on all skins in order to fit on the new right menu buttons.
- Added Horde avatars.
- Fixed issue where shortcut panel shows below thw windows when its in Dialog strata.
- Fixed problem with import data capture for charts.

- API Cooltip: Added new option: TextShadow -> true or false.
- New API: _detalhes.StatusBar:SetPlugin (instance, pluginname, anchor)
- New API: _detalhes:SetPlayerDetailsWindowTexture (texture)
- New API: _detalhes:SetOptionsWindowTexture (texture)
This commit is contained in:
tercio
2014-05-16 01:26:21 -03:00
parent 5cf85b8eb4
commit 81771ec1ec
40 changed files with 2148 additions and 1602 deletions
+13 -3
View File
@@ -88,6 +88,7 @@ function DetailsCreateCoolTip()
["TextSize"] = true,
["TextFont"] = true,
["TextColor"] = true,
["TextShadow"] = true,
["LeftTextWidth"] = true,
["RightTextWidth"] = true,
["LeftTextHeight"] = true,
@@ -129,6 +130,7 @@ function DetailsCreateCoolTip()
["TextSize"] = nil,
["TextFont"] = nil,
["TextColor"] = nil,
["TextShadow"] = nil,
["LeftTextWidth"] = nil,
["RightTextWidth"] = nil,
["LeftTextHeight"] = nil,
@@ -636,13 +638,15 @@ function DetailsCreateCoolTip()
menuButton.leftText:SetHeight (0)
end
if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then
if (CoolTip.OptionsTable.TextFont and not leftTextTable [7]) then --font
if (_G [CoolTip.OptionsTable.TextFont]) then
menuButton.leftText:SetFontObject (GameFontRed or CoolTip.OptionsTable.TextFont)
else
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
local _, size, flags = menuButton.leftText:GetFont()
flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (font, size, flags)
end
@@ -650,18 +654,20 @@ function DetailsCreateCoolTip()
if (_G [leftTextTable [7]]) then
menuButton.leftText:SetFontObject (leftTextTable [7])
local face, size, flags = menuButton.leftText:GetFont()
flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (face, size, flags)
else
local font = SharedMedia:Fetch ("font", leftTextTable [7])
local face, size, flags = menuButton.leftText:GetFont()
flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.leftText:SetFont (face, size, flags)
end
else
size = leftTextTable [6] or CoolTip.OptionsTable.TextSize or 10
face = leftTextTable [7] or [[Fonts\FRIZQT__.TTF]]
flags = leftTextTable [8]
flags = leftTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
menuButton.leftText:SetFont (face, size, flags)
end
@@ -707,6 +713,8 @@ function DetailsCreateCoolTip()
else
local font = SharedMedia:Fetch ("font", CoolTip.OptionsTable.TextFont)
local _, size, flags = menuButton.rightText:GetFont()
flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (font, size, flags)
end
@@ -714,11 +722,13 @@ function DetailsCreateCoolTip()
if (_G [rightTextTable [7]]) then
menuButton.rightText:SetFontObject (rightTextTable [7])
local face, size, flags = menuButton.rightText:GetFont()
flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (face, size, flags)
else
local font = SharedMedia:Fetch ("font", rightTextTable [7])
local face, size, flags = menuButton.rightText:GetFont()
flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or size
menuButton.rightText:SetFont (face, size, flags)
end
@@ -726,7 +736,7 @@ function DetailsCreateCoolTip()
else
size = rightTextTable [6] or CoolTip.OptionsTable.TextSize or 10
face = rightTextTable [7] or [[Fonts\FRIZQT__.TTF]]
flags = rightTextTable [8]
flags = rightTextTable [8] or CoolTip.OptionsTable.TextShadow or nil
menuButton.rightText:SetFont (face, size, flags)
end
+111 -19
View File
@@ -278,6 +278,8 @@ local DropDownMetaFunctions = {}
------------------------------------------------------------------------------------------------------------
--> scripts
local last_opened = false
local function isOptionVisible (thisOption)
if (_type (thisOption.shown) == "boolean" or _type (thisOption.shown) == "function") then
if (not thisOption.shown) then
@@ -289,23 +291,116 @@ local function isOptionVisible (thisOption)
return true
end
function DropDownMetaFunctions:Select (optionName, byOptionNumber)
function DropDownMetaFunctions:Refresh()
local menu = self.func()
if (#menu == 0) then
self:NoOption (true)
self.no_options = true
return false
elseif (self.no_options) then
self.no_options = false
self:NoOption (false)
self:NoOptionSelected()
return true
end
return true
end
function DropDownMetaFunctions:NoOptionSelected()
self.label:SetText (self.empty_text or "no option selected")
self.label:SetTextColor (1, 1, 1, 0.4)
if (self.empty_icon) then
self.icon:SetTexture (self.empty_icon)
else
self.icon:SetTexture ([[Interface\COMMON\UI-ModelControlPanel]])
self.icon:SetTexCoord (0.625, 0.78125, 0.328125, 0.390625)
end
self.icon:SetVertexColor (1, 1, 1, 0.4)
self.last_select = nil
end
function DropDownMetaFunctions:NoOption (state)
if (state) then
self:Disable()
self:SetAlpha (0.5)
self.label:SetText ("no options")
self.label:SetTextColor (1, 1, 1, 0.4)
self.icon:SetTexture ([[Interface\CHARACTERFRAME\UI-Player-PlayTimeUnhealthy]])
self.icon:SetTexCoord (0, 1, 0, 1)
self.icon:SetVertexColor (1, 1, 1, 0.4)
else
self:Enable()
self:SetAlpha (1)
end
end
function DropDownMetaFunctions:Select (optionName, byOptionNumber)
if (type (optionName) == "boolean" and not optionName) then
self:NoOptionSelected()
return false
end
local menu = self.func()
if (#menu == 0) then
self:NoOption (true)
return true
else
self:NoOption (false)
end
if (byOptionNumber and type (optionName) == "number") then
--print ("selected", optionName)
return self:Selected (menu [optionName])
if (not menu [optionName]) then --> invalid index
self:NoOptionSelected()
return false
end
self:Selected (menu [optionName])
return true
end
for _, thisMenu in ipairs (menu) do
if (thisMenu.label == optionName and isOptionVisible (thisMenu)) then
return self:Selected (thisMenu)
self:Selected (thisMenu)
return true
end
end
return false
end
function DropDownMetaFunctions:SetEmptyTextAndIcon (text, icon)
if (text) then
self.empty_text = text
end
if (icon) then
self.empty_icon = icon
end
self:Selected (self.last_select)
end
function DropDownMetaFunctions:Selected (_table)
if (not _table) then
--> there is any options?
if (not self:Refresh()) then
self.last_select = nil
return
end
--> exists options but none selected
self:NoOptionSelected()
return
end
self.last_select = _table
self:NoOption (false)
self.label:SetText (_table.label)
self.icon:SetTexture (_table.icon)
@@ -337,9 +432,9 @@ function DropDownMetaFunctions:Selected (_table)
end
if (_table.font) then
self.label:SetFont (_table.font, 10.5)
self.label:SetFont (_table.font, 10)
else
self.label:SetFont ("GameFontHighlightSmall", 10.5)
self.label:SetFont ("GameFontHighlightSmall", 10)
end
self:SetValue (_table.value)
@@ -368,6 +463,10 @@ function DropDownMetaFunctions:Open()
self.dropdown.dropdownborder:Show()
self.dropdown.arrowTexture:SetTexture ("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Down")
self.opened = true
if (last_opened) then
last_opened:Close()
end
last_opened = self
end
function DropDownMetaFunctions:Close()
@@ -383,6 +482,7 @@ function DropDownMetaFunctions:Close()
selectedTexture:Hide()
self.opened = false
last_opened = false
end
--> close by escape key
@@ -799,24 +899,16 @@ function gump:NewDropDown (parent, container, name, member, w, h, func, default)
_setmetatable (DropDownObject, DropDownMetaFunctions)
--> initialize first menu selected
local menu = func()
if (type (default) == "string") then
DropDownObject:Select (default)
else
for i = default, #menu do
local _table = menu [i]
if (not _table) then
break
end
if (isOptionVisible (_table)) then
DropDownObject:Selected (_table)
break
end
elseif (type (default) == "number") then
if (not DropDownObject:Select (default)) then
DropDownObject:Select (default, true)
end
end
return DropDownObject
end
+5 -2
View File
@@ -30,14 +30,17 @@
<Layer level="ARTWORK">
<!-- icon texture -->
<Texture name="$parent_IconTexture" parentKey="icon" file = "Interface\ICONS\Spell_ChargePositive">
<Texture name="$parent_IconTexture" parentKey="icon" file = "Interface\COMMON\UI-ModelControlPanel">
<Color r="1" g="1" b="1" a="0.4"/>
<TexCoords left="0.625" right="0.78125" top="0.328125" bottom="0.390625"/>
<Size x="20" y="20" />
<Anchors>
<Anchor point="LEFT" relativeTo="$parent" relativePoint="LEFT" x="2" y="0"/>
</Anchors>
</Texture>
<!-- text -->
<FontString name="$parent_Text" parentKey="text" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="true">
<FontString name="$parent_Text" parentKey="text" inherits="GameFontHighlightSmall" justifyH="LEFT" nonspacewrap="true" text="no option selected">
<Color r="1" g="1" b="1" a="0.4"/>
<FontHeight val="10.5"/>
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_IconTexture" relativePoint="RIGHT" x="5" y="0"/>
+16 -12
View File
@@ -163,24 +163,28 @@ local APIFrameFunctions
--> methods
--> right click to close
function PanelMetaFunctions:CreateRightClickLabel (textType, w, h)
function PanelMetaFunctions:CreateRightClickLabel (textType, w, h, close_text)
local text
w = w or 20
h = h or 20
if (textType) then
textType = string.lower (textType)
if (textType == "short") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
elseif (textType == "medium") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"]
elseif (textType == "large") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"]
end
if (close_text) then
text = close_text
else
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
if (textType) then
textType = string.lower (textType)
if (textType == "short") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
elseif (textType == "medium") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_MEDIUM"]
elseif (textType == "large") then
text = Loc ["STRING_RIGHTCLICK_CLOSE_LARGE"]
end
else
text = Loc ["STRING_RIGHTCLICK_CLOSE_SHORT"]
end
end
return gump:NewLabel (self, _, "$parentRightMouseToClose", nil, "|TInterface\\TUTORIALFRAME\\UI-TUTORIAL-FRAME:"..w..":"..h..":0:1:512:512:8:70:328:409|t " .. text)
end