hero class fixes from Mattibalize
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,79 +0,0 @@
|
||||
------------------------------------------------------------------------
|
||||
r295 | cremor | 2010-10-22 16:37:30 +0000 (Fri, 22 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-deDE.lua
|
||||
|
||||
- deDE update
|
||||
------------------------------------------------------------------------
|
||||
r294 | whitetooth | 2010-10-22 16:07:47 +0000 (Fri, 22 Oct 2010) | 2 lines
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-deDE.lua
|
||||
M /trunk/RatingBuster-Locale-enUS.lua
|
||||
M /trunk/RatingBuster-Locale-esES.lua
|
||||
M /trunk/RatingBuster-Locale-frFR.lua
|
||||
M /trunk/RatingBuster-Locale-koKR.lua
|
||||
M /trunk/RatingBuster-Locale-ruRU.lua
|
||||
M /trunk/RatingBuster-Locale-zhCN.lua
|
||||
M /trunk/RatingBuster-Locale-zhTW.lua
|
||||
M /trunk/RatingBuster.lua
|
||||
|
||||
- Removed deprecated stats
|
||||
- Update libs
|
||||
------------------------------------------------------------------------
|
||||
r293 | cremor | 2010-10-22 14:12:12 +0000 (Fri, 22 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-deDE.lua
|
||||
|
||||
- deDE update
|
||||
------------------------------------------------------------------------
|
||||
r292 | whitetooth | 2010-10-21 07:47:03 +0000 (Thu, 21 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-deDE.lua
|
||||
M /trunk/RatingBuster-Locale-enUS.lua
|
||||
M /trunk/RatingBuster-Locale-esES.lua
|
||||
M /trunk/RatingBuster-Locale-frFR.lua
|
||||
M /trunk/RatingBuster-Locale-koKR.lua
|
||||
M /trunk/RatingBuster-Locale-ruRU.lua
|
||||
M /trunk/RatingBuster-Locale-zhCN.lua
|
||||
M /trunk/RatingBuster-Locale-zhTW.lua
|
||||
M /trunk/RatingBuster.lua
|
||||
|
||||
- Partial support for Master Rating
|
||||
------------------------------------------------------------------------
|
||||
r289 | whitetooth | 2010-10-19 17:22:17 +0000 (Tue, 19 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster.lua
|
||||
|
||||
- Removed "ADD_AP_MOD_SPELL_DMG"
|
||||
------------------------------------------------------------------------
|
||||
r288 | whitetooth | 2010-10-19 17:01:30 +0000 (Tue, 19 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk
|
||||
M /trunk/.pkgmeta
|
||||
M /trunk/About RatingBuster.txt
|
||||
M /trunk/RatingBuster.lua
|
||||
M /trunk/RatingBuster.toc
|
||||
M /trunk/embeds.xml
|
||||
|
||||
- Core updated to LibStatLogic-1.2
|
||||
------------------------------------------------------------------------
|
||||
r287 | 7destiny | 2010-10-15 16:39:21 +0000 (Fri, 15 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-koKR.lua
|
||||
|
||||
- koKR Update
|
||||
------------------------------------------------------------------------
|
||||
r286 | whitetooth | 2010-10-02 10:15:26 +0000 (Sat, 02 Oct 2010) | 1 line
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster.lua
|
||||
|
||||
- Fixed some loading errors in 4.0
|
||||
------------------------------------------------------------------------
|
||||
r285 | cremor | 2010-06-03 14:46:28 +0000 (Thu, 03 Jun 2010) | 2 lines
|
||||
Changed paths:
|
||||
M /trunk/RatingBuster-Locale-deDE.lua
|
||||
M /trunk/RatingBuster.lua
|
||||
|
||||
- "Hide Blizzard Item Comparisons" now also works for ItemRefTooltips
|
||||
- deDE update
|
||||
------------------------------------------------------------------------
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 151 KiB |
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster deDE locale
|
||||
Revision: $Revision: 295 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- Kuja
|
||||
]]
|
||||
@@ -62,14 +62,20 @@ L["Options for Rating display"] = "Optionen für die Wertungsanzeige"
|
||||
L["Show Rating Conversions"] = "Zeige Wertungsumrechnung"
|
||||
L["Show Rating conversions in tooltips"] = "Zeige Wertungsumrechnung im Tooltip"
|
||||
-- /rb rating spell
|
||||
L["Show Spell Hit/Haste"] = "Zeige Zaubertempo/-trefferchance"
|
||||
L["Show Spell Hit/Haste from Hit/Haste Rating"] = "Zeige Zaubertempo/-trefferchance von Tempo-/Trefferwertung"
|
||||
--L["Show Spell Hit/Haste"] = true
|
||||
--L["Show Spell Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "Zeige physisches Tempo/Trefferchance"
|
||||
L["Show Physical Hit/Haste from Hit/Haste Rating"] = "Zeige physisches Tempo/Trefferchance von Tempo-/Trefferwertung"
|
||||
--L["Show Physical Hit/Haste"] = true
|
||||
--L["Show Physical Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "Zeige detaillierten Umrechnungtext"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "Zeige detaillierten Text für Abhärtungs- und Waffenkundeumrechnung"
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "Verteidigungsanalyse"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "Wandle Verteidigung in Vermeidung von (kritischen) Treffern, Ausweichen, Parieren und Blocken um"
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "Waffenfertigkeitswertungsanalyse"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "Wandle Waffenfertigkeitswertung in (kritische) Trefferchance, Ausweich-, Parier- und Blockmissachtung um"
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = "Waffenkundeanalyse"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "Wandle Waffenkunde in Ausweich- und Pariermissachtung um"
|
||||
@@ -320,12 +326,6 @@ L["Intellect Summary"] = "Intelligenzübersicht"
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = "Willenskraft zusammenrechnen"
|
||||
L["Spirit Summary"] = "Willenkraftübersicht"
|
||||
-- /rb sum basic mastery
|
||||
L["Sum Mastery"] = "Meisterschaft zusammenrechnen"
|
||||
L["Mastery Summary"] = "Meisterschaftsübersicht"
|
||||
-- /rb sum basic masteryrating
|
||||
L["Sum Mastery Rating"] = "Meisterschaftswertung zusammenrechnen"
|
||||
L["Mastery Rating Summary"] = "Meisterschaftswertungsübersicht"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "Werte - Physisch"
|
||||
@@ -341,13 +341,13 @@ L["Sum Feral Attack Power"] = "Feral Angriffskraft zusammenrechnen"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "Feral Angriffskraft <- Feral Angriffskraft, Angriffskraft, Stärke, Beweglichkeit"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "Trefferchance zusammenrechnen"
|
||||
L["Hit Chance <- Hit Rating"] = "Trefferchance <- Trefferwertung"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "Trefferchance <- Trefferwertung, Waffenfertigkeitswertung"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "Trefferwertung zusammenrechnen"
|
||||
L["Hit Rating Summary"] = "Trefferwertungsübersicht"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "Kritische Trefferchance zusammenrechnen"
|
||||
L["Crit Chance <- Crit Rating, Agility"] = "Kritische Trefferchance <- kritische Trefferwertung, Beweglichkeit"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "Kritische Trefferchance <- kritische Trefferwertung, Beweglichkeit, Waffenfertigkeitswertung"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Kritische Trefferwertung zusammenrechnen"
|
||||
L["Crit Rating Summary"] = "Kritische Trefferwertungsübersicht"
|
||||
@@ -359,13 +359,13 @@ L["Sum Haste Rating"] = "Tempowertung zusammenrechnen"
|
||||
L["Haste Rating Summary"] = "Tempowertungsübersicht"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "Distanztrefferchance zusammenrechnen"
|
||||
L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = "Distanztrefferchance <- Trefferwertung, Distanztrefferwertung"
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = "Distanztrefferchance <- Trefferwertung, Waffenfertigkeitswertung, Distanztrefferwertung"
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "Distanztrefferwertung zusammenrechnen"
|
||||
L["Ranged Hit Rating Summary"] = "Distanztrefferwertungsübersicht"
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "Kritische Distanztrefferchance zusammenrechnen"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = "Kritische Distanztrefferchance <- kritische Trefferwertung, Beweglichkeit, kritische Distanztrefferwertung"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = "Kritische Distanztrefferchance <- kritische Trefferwertung, Beweglichkeit, Waffenfertigkeitswertung, kritische Distanztrefferwertung"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "Kritische Distanztrefferwertung zusammenrechnen"
|
||||
L["Ranged Crit Rating Summary"] = "Kritische Distanztrefferwertungsübersicht"
|
||||
@@ -378,6 +378,12 @@ L["Ranged Haste Rating Summary"] = "Distanztempowertungsübersicht"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "Waffenmaximalschaden zusammenrechnen"
|
||||
L["Weapon Max Damage Summary"] = "Waffenmaximalschadensübersicht"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "Rüstungsmissachtung zusammenrechnen"
|
||||
L["Ignore Armor Summary"] = "Rüstungsmissachtungsübersicht"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "Rüstungsdurchlag zusammenrechnen"
|
||||
L["Armor Penetration Summary"] = "Rüstungsdurchlagsübersicht"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
@@ -388,8 +394,11 @@ L["Weapon Skill <- Weapon Skill Rating"] = "Waffenfertigkeit <- Waffenfertigkeit
|
||||
L["Sum Expertise"] = "Waffenkunde zusammenrechnen"
|
||||
L["Expertise <- Expertise Rating"] = "Waffenkunde <- Waffenkundewertung"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "Waffenkundewertung zusammenrechnen"
|
||||
L["Expertise Rating Summary"] = "Waffenkundewertungsübersicht"
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "Rüstungsdurchlagwertung zusammenrechnen"
|
||||
L["Armor Penetration Rating Summary"] = "Rüstungsdurchlagwertungsübersicht"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Werte - Zauber"
|
||||
@@ -445,22 +454,34 @@ L["Stat - Tank"] = "Werte - Verteidigung"
|
||||
L["Choose tank stats for summary"] = "Wähle Verteidigungswerte für die Übersicht"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "Rüstung zusammenrechnen"
|
||||
L["Armor <- Armor from items and bonuses"] = "Rüstung <- Rüstung von Gegenständen und Boni"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "Rüstung <- Rüstung von Gegenständen, Rüstung von Boni, Beweglichkeit, Intelligenz"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "Blockwert zusammenrechnen"
|
||||
L["Block Value <- Block Value, Strength"] = "Blockwert <- Blockwert, Stärke"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Ausweichchance zusammenrechnen"
|
||||
L["Dodge Chance <- Dodge Rating, Agility"] = "Ausweichchance <- Ausweichwertung, Beweglichkeit"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "Ausweichchance <- Ausweichwertung, Beweglichkeit, Verteidigungswertung"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "Parierchance zusammenrechnen"
|
||||
L["Parry Chance <- Parry Rating"] = "Parierchance <- Parierwertung"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "Parierchance <- Parierwertung, Verteidigungswertung"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Blockchance zusammenrechnen"
|
||||
L["Block Chance <- Block Rating"] = " Blockchance <- Blockwertung"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = " Blockchance <- Blockwertung, Verteidigungswertung"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "Treffervermeidung zusammenrechnen"
|
||||
L["Hit Avoidance <- Defense Rating"] = "Treffervermeidung <- Verteidigungswertung"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "Kritische Treffervermeidung"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "Kritische Treffervermeidung <- Verteidigungswertung, Abhärtungswertung"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Ausweichmissachtung zusammenrechnen"
|
||||
L["Dodge Neglect <- Expertise"] = "Ausweichmissachtung <- Waffenkunde"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "Ausweichmissachtung <- Waffenkunde, Waffenfertigkeitswertung"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "Pariermissachtung zusammenrechnen"
|
||||
L["Parry Neglect <- Expertise"] = "Pariermissachtung <- Waffenkunde"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "Pariermissachtung <- Waffenkunde, Waffenfertigkeitswertung"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "Blockmissachtung"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "Blockmissachtung <- Waffenfertigkeitswertung"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Arkanwiderstand zusammenrechnen"
|
||||
L["Arcane Resistance Summary"] = "Arkanwiderstandsübersicht"
|
||||
@@ -477,8 +498,8 @@ L["Frost Resistance Summary"] = "Frostwiderstandsübersicht"
|
||||
L["Sum Shadow Resistance"] = "Schattenwiderstand zusammenrechnen"
|
||||
L["Shadow Resistance Summary"] = "Schattenwiderstandsübersicht"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "Ausweichwertung zusammenrechnen"
|
||||
L["Dodge Rating Summary"] = "Ausweichwertungsübersicht"
|
||||
L["Sum Dodge Rating"] = "Verteidigungswertung zusammenrechnen"
|
||||
L["Dodge Rating Summary"] = "Verteidigungswertungsübersicht"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "Parierwertung zusammenrechnen"
|
||||
L["Parry Rating Summary"] = "Parierwertungsübersicht"
|
||||
@@ -488,12 +509,15 @@ L["Block Rating Summary"] = "Blockwertungsübersicht"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "Abhärtung zusammenrechnen"
|
||||
L["Resilience Summary"] = "Abhärtungsübersicht"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "Verteidigung zusammenrechnen"
|
||||
L["Defense <- Defense Rating"] = "Verteidigung <- Verteidigungswertung"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "TankPoints zusammenrechnen"
|
||||
L["TankPoints <- Health, Total Reduction"] = "TankPoints <- Leben, Gesamtreduzierung"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "Gesamtreduzierung zusammenrechnen"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Gesamtreduzierung <- Rüstung, Ausweichen, Parieren, Blocken, Gegner-Verfehlen, Gegner-Kritisch, Gegner-Schmettern, Schadensmodifikatoren"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Gesamtreduzierung <- Rüstung, Ausweichen, Parieren, Blocken, Blockwert, Verteidigung, Abhärtung, Gegner-Verfehlen, Gegner-Kritisch, Gegner-Schmettern, Schadensmodifikatoren"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Vermeidung zusammenrechnen"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Vermeidung <- Ausweichen, Parieren, Gegner-Verfehlen, Blocken (optional)"
|
||||
@@ -671,7 +695,6 @@ L["statList"] = {
|
||||
{pattern = "waffenkundewertung", id = CR_EXPERTISE},
|
||||
-- {pattern = "hit avoidance rating", id = CR_HIT_TAKEN_MELEE}, - seit 2.0.10 gibt es kein item mehr damit
|
||||
{pattern = "rüstungsdurchschlagwertung", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = "meisterschaftswertung", id = CR_MASTERY},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster enUS locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- Whitetooth (hotdogee [at] gmail [dot] com)
|
||||
]]
|
||||
@@ -70,6 +70,12 @@ L["Show Physical Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = true
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = true
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = true
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = true
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = true
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = true
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = true
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = true
|
||||
@@ -100,6 +106,12 @@ L["Show Attack Power from Strength"] = true
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = true
|
||||
L["Show Block Value from Strength"] = true
|
||||
-- /rb Ascension Custom Conviction
|
||||
L["Show Conviction"] = true
|
||||
L["Show Spell Crit from Strength"] = true
|
||||
-- /rb Ascension Custom Divine Strenth
|
||||
L["Show Divine Strength"] = true
|
||||
L["Show Hit Rating from Strength"] = true
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = true
|
||||
L["Show Spell Damage from Strength"] = true
|
||||
@@ -109,6 +121,9 @@ L["Show Healing from Strength"] = true
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = true
|
||||
L["Show Parry from Strength"] = true
|
||||
-- /rb Ascension Custom Iron Will
|
||||
L["Show Iron Will"] = true
|
||||
L["Show Parry Rating from Strength"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = true
|
||||
@@ -131,6 +146,16 @@ L["Show Armor from Agility"] = true
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Agility"] = true
|
||||
-- /rb Ascension Custom Thundering Strikes
|
||||
L["Show Thundering Strikes"] = true
|
||||
L["Show Spell Crit from Agility"] = true
|
||||
-- /rb Ascension Custom Shamanistic Focus/Combat Experience
|
||||
L["Show Shamanistic Focus"] = true
|
||||
L["Show Combat Experience"] = true
|
||||
L["Show Spell Hit from Agility"] = true
|
||||
-- /rb Ascension Custom Natural Reaction
|
||||
L["Show Natural Reaction"] = true
|
||||
L["Show Dodge from Natural Reaction"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = true
|
||||
@@ -147,6 +172,9 @@ L["Show Healing from Stamina"] = true
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Stamina"] = true
|
||||
-- /rb Ascension Custom Hunter VS Wild
|
||||
L["Show Hunter vs. Wild"] = true
|
||||
L["Show Attack Power from Stamina"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = true
|
||||
@@ -200,6 +228,11 @@ L["Show Healing from Spirit"] = true
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = true
|
||||
L["Show Spell Crit chance from Spirit"] = true
|
||||
--/rb Ascension Custom Spirit Spell crit
|
||||
L["Show Meditation"] = true
|
||||
L["Show Molten Armor"] = true
|
||||
L["Show Improved Spirit Tap"] = true
|
||||
L["Show Crit Rating from Spirit"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = true
|
||||
@@ -320,12 +353,6 @@ L["Intellect Summary"] = true
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = true
|
||||
L["Spirit Summary"] = true
|
||||
-- /rb sum basic mastery
|
||||
L["Sum Mastery"] = true
|
||||
L["Mastery Summary"] = true
|
||||
-- /rb sum basic masteryrating
|
||||
L["Sum Mastery Rating"] = true
|
||||
L["Mastery Rating Summary"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = true
|
||||
@@ -341,13 +368,13 @@ L["Sum Feral Attack Power"] = true
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = true
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = true
|
||||
L["Hit Chance <- Hit Rating"] = true
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = true
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = true
|
||||
L["Hit Rating Summary"] = true
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = true
|
||||
L["Crit Chance <- Crit Rating, Agility"] = true
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = true
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = true
|
||||
L["Crit Rating Summary"] = true
|
||||
@@ -359,13 +386,13 @@ L["Sum Haste Rating"] = true
|
||||
L["Haste Rating Summary"] = true
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = true
|
||||
L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = true
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = true
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = true
|
||||
L["Ranged Hit Rating Summary"] = true
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = true
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = true
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = true
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = true
|
||||
L["Ranged Crit Rating Summary"] = true
|
||||
@@ -378,6 +405,12 @@ L["Ranged Haste Rating Summary"] = true
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = true
|
||||
L["Weapon Max Damage Summary"] = true
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = true
|
||||
L["Ignore Armor Summary"] = true
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = true
|
||||
L["Armor Penetration Summary"] = true
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
@@ -390,6 +423,9 @@ L["Expertise <- Expertise Rating"] = true
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = true
|
||||
L["Expertise Rating Summary"] = true
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = true
|
||||
L["Armor Penetration Rating Summary"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = true
|
||||
@@ -445,22 +481,34 @@ L["Stat - Tank"] = true
|
||||
L["Choose tank stats for summary"] = true
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = true
|
||||
L["Armor <- Armor from items and bonuses"] = true
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = true
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = true
|
||||
L["Block Value <- Block Value, Strength"] = true
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = true
|
||||
L["Dodge Chance <- Dodge Rating, Agility"] = true
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = true
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = true
|
||||
L["Parry Chance <- Parry Rating"] = true
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = true
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = true
|
||||
L["Block Chance <- Block Rating"] = true
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = true
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = true
|
||||
L["Hit Avoidance <- Defense Rating"] = true
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = true
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = true
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = true
|
||||
L["Dodge Neglect <- Expertise"] = true
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = true
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = true
|
||||
L["Parry Neglect <- Expertise"] = true
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = true
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = true
|
||||
L["Block Neglect <- Weapon Skill Rating"] = true
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = true
|
||||
L["Arcane Resistance Summary"] = true
|
||||
@@ -488,12 +536,15 @@ L["Block Rating Summary"] = true
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = true
|
||||
L["Resilience Summary"] = true
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = true
|
||||
L["Defense <- Defense Rating"] = true
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = true
|
||||
L["TankPoints <- Health, Total Reduction"] = true
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = true
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = true
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = true
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = true
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = true
|
||||
@@ -659,6 +710,7 @@ L["statList"] = {
|
||||
{pattern = "ranged hit rating", id = CR_HIT_RANGED},
|
||||
{pattern = "hit rating", id = CR_HIT_MELEE},
|
||||
|
||||
|
||||
{pattern = "resilience", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "spell haste rating", id = CR_HASTE_SPELL},
|
||||
@@ -671,7 +723,6 @@ L["statList"] = {
|
||||
|
||||
{pattern = "hit avoidance rating", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "armor penetration rating", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = "mastery rating", id = CR_MASTERY},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
@@ -698,6 +749,8 @@ L["statList"] = {
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = true
|
||||
L["$value% Spell Crit"] = true
|
||||
L["$value% Melee Hit"] = true
|
||||
L["$value% Spell Hit"] = true
|
||||
L["$value% Dodge"] = true
|
||||
L["$value HP"] = true
|
||||
L["$value MP"] = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster esES locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- carahuevo@Curse
|
||||
- kaiemg
|
||||
@@ -63,6 +63,12 @@ L["Show Rating conversions in tooltips"] = "Mostrar conversion de indices en too
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "Mostrar texto detallado conversiones"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "Mostrar texto detallado de conversiones de Temple y Pericia"
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "Desglose Defensa"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "Convierte Defensa en evitar Critico, evitar Golpe, Esquivar, Parar y Bloquear"
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "Desglose Habilidad arma"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "Convierta Habilidad arma en Critico, Golpe, falla Esquivar, y fallo Bloquear"
|
||||
-- /rb rating exp -- 2.3.0
|
||||
L["Expertise Breakdown"] = "Desglose Pericia"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "Convierte Pericia en fallo Esquivar y fallo Parar"
|
||||
@@ -297,15 +303,9 @@ L["Stamina Summary"] = "Resumen Aguante"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "Res. Intelecto"
|
||||
L["Intellect Summary"] = "Resumen Intelecto"
|
||||
-- /rb sum basic spi
|
||||
-- /rb sum statcomp spi
|
||||
L["Sum Spirit"] = "Res. Espiritu"
|
||||
L["Spirit Summary"] = "Resumen Espiritu"
|
||||
-- /rb sum basic mastery
|
||||
--L["Sum Mastery"] = ""
|
||||
--L["Mastery Summary"] = ""
|
||||
-- /rb sum basic masteryrating
|
||||
--L["Sum Mastery Rating"] = ""
|
||||
--L["Mastery Rating Summary"] = ""
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "Datos - Fisicas"
|
||||
@@ -321,13 +321,13 @@ L["Sum Feral Attack Power"] = "Res. P.Ataque feral"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "P.Ataque feral <- P.Ataque feral, P.Ataque, Fuerza, Agilidad"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "Res. prob. Golpe"
|
||||
--L["Hit Chance <- Hit Rating"] = "prob. Golpe <- Indice Golpe, Indice pericia"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "prob. Golpe <- Indice Golpe, Indice pericia"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "Res. Indice Golpe"
|
||||
L["Hit Rating Summary"] = "Resumen Indice Golpe"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "Res. Prob. Crit."
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "Prob.Crit <- Crit, Agilidad, Indice Pericia"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "Prob.Crit <- Crit, Agilidad, Indice Pericia"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Res. Indice Critico"
|
||||
L["Crit Rating Summary"] = "Resumen Indice Critico"
|
||||
@@ -339,13 +339,13 @@ L["Sum Haste Rating"] = "Res. Indice Celeridad"
|
||||
L["Haste Rating Summary"] = "Resumen Indice Celeridad"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "Res. Prob. Golpe a Distancia"
|
||||
-- --L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = true
|
||||
-- L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = true
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "Res. Indice Golpe a Distancia"
|
||||
-- L["Ranged Hit Rating Summary"] = true
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "Res. Prob. Critico a Distancia"
|
||||
-- --L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = true
|
||||
-- L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = true
|
||||
-- /rb sum physical rangedcritrating
|
||||
-- L["Sum Ranged Crit Rating"] = true
|
||||
-- L["Ranged Crit Rating Summary"] = true
|
||||
@@ -358,6 +358,12 @@ L["Sum Ranged Crit Chance"] = "Res. Prob. Critico a Distancia"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "Res. Max Dano Arma"
|
||||
L["Weapon Max Damage Summary"] = "Resumen de Maximo Dano Arma"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "Res. Ignorar armadura"
|
||||
L["Ignore Armor Summary"] = "Resumen de Ignorar Armadura"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "Res. Penetracion Armadura"
|
||||
L["Armor Penetration Summary"] = "Resumen de Penetracion Armadura"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
@@ -370,6 +376,9 @@ L["Expertise <- Expertise Rating"] = "Pericia <- Indice Pericia"
|
||||
-- /rb sum physical exprating
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "Res. Indice Penetracion Armadura"
|
||||
L["Armor Penetration Rating Summary"] = "Resumen Indice Penetracion de Armadura"
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Datos - Hechizo"
|
||||
@@ -425,22 +434,34 @@ L["Stat - Tank"] = "Datos - Tanque"
|
||||
L["Choose tank stats for summary"] = "Escoge datos de tanque para resumen"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "Res. Armadura"
|
||||
--L["Armor <- Armor from items and bonuses"] = "Armadura <- Armadura de items, Armadura de bonus, Agilidad, Intelecto"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "Armadura <- Armadura de items, Armadura de bonus, Agilidad, Intelecto"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "Res. Valor Bloqueo"
|
||||
L["Block Value <- Block Value, Strength"] = "Valor Bloqueo <- Valor Bloqueo, Fuerza"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Res. prob. Esquivar"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "Prob. Esquivar <- Indice Esquivar, Agilidad, Indice Defensa"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "Prob. Esquivar <- Indice Esquivar, Agilidad, Indice Defensa"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "Res. prob. Parar"
|
||||
--L["Parry Chance <- Parry Rating"] = "Prob. Parar <- Indice Parar, Indice Defensa"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "Prob. Parar <- Indice Parar, Indice Defensa"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Res. prob Bloqueo"
|
||||
--L["Block Chance <- Block Rating"] = "Prob. Bloqueo <- Indice Bloqueo, Indice Defensa"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "Prob. Bloqueo <- Indice Bloqueo, Indice Defensa"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "Res. Elusion golpe"
|
||||
L["Hit Avoidance <- Defense Rating"] = "Elusion golpe <- Indice Defensa"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "Res. Elusion Critico"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "Elusion Critico <- Indice Defensa, Temple"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Res. fallo Esquivar"
|
||||
--L["Dodge Neglect <- Expertise"] = "Fallo Esquivar <- Pericia, Indice habilidad arma"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "Fallo Esquivar <- Pericia, Indice habilidad arma"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "Res. fallo Parar"
|
||||
--L["Parry Neglect <- Expertise"] = "Fallo Parar <- Pericia, Indice habilidad arma"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "Fallo Parar <- Pericia, Indice habilidad arma"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "Res. fallo Bloquear"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "Fallo Bloquear <- Indice habilidad arma"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Res. Resist. Arcana"
|
||||
L["Arcane Resistance Summary"] = "Resumen Resistencia Arcana"
|
||||
@@ -468,12 +489,15 @@ L["Block Rating Summary"] = "Resumen Indice Bloquear"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "Res. Temple"
|
||||
L["Resilience Summary"] = "Resumen Temple"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "Res. Defensa"
|
||||
L["Defense <- Defense Rating"] = "Defensa <- Indice Defensa"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "Res. Ptos. Tanque"
|
||||
L["TankPoints <- Health, Total Reduction"] = "Ptos. Tanque <- Salud, Total Reduccion"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "Res. Total Reduccion"
|
||||
--L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Total Reduccion <- Armadura, Esquivar, Parar, Bloquear, Valor bloqueo, Defensa, Temple, FalloEnemigo, CriticoEnemigo, AplastamientoEnemigo, Modifics.DanoRecibido"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Total Reduccion <- Armadura, Esquivar, Parar, Bloquear, Valor bloqueo, Defensa, Temple, FalloEnemigo, CriticoEnemigo, AplastamientoEnemigo, Modifics.DanoRecibido"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Res. Elusion"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Elusion <- Esquivar, Parar, FalloEnemigo, Bloqueo(Opcional)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster frFR locale (incomplete)
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- Tixu@Curse, Silaor and renchap
|
||||
]]
|
||||
@@ -70,8 +70,10 @@ L["Show Rating conversions in tooltips"] = "Affiche dans l'infobulle les gains a
|
||||
-- /rb rating detail
|
||||
--L["Show Detailed Conversions Text"] = true -- à traduire
|
||||
--L["Show detailed text for Resilience and Expertise conversions"] = true -- à traduire
|
||||
-- /rb rating def
|
||||
--L["Defense Breakdown"] = true -- à traduire
|
||||
--L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = true
|
||||
-- /rb rating wpn
|
||||
--L["Weapon Skill Breakdown"] = true -- à traduire
|
||||
--L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = true -- à traduire
|
||||
-- /rb rating exp
|
||||
@@ -335,13 +337,13 @@ L["Sum Healing"] = "Cumul Soins"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "Soins <- Soins, Intel, Esprit, Agi, Force"
|
||||
-- /rb sum stat hit
|
||||
L["Sum Hit Chance"] = "Cumul Toucher"
|
||||
--L["Hit Chance <- Hit Rating"] = "Toucher <- Toucher, Score Arme"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "Toucher <- Toucher, Score Arme"
|
||||
-- /rb sum stat hitspell
|
||||
L["Sum Spell Hit Chance"] = "Cumul Toucher des Sorts"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "Toucher des Sorts <- Toucher des Sorts"
|
||||
-- /rb sum stat crit
|
||||
L["Sum Crit Chance"] = "Cumul Crit"
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "Crit <- %Crit, Agi, Comp Arme"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "Crit <- %Crit, Agi, Comp Arme"
|
||||
-- /rb sum stat critspell
|
||||
L["Sum Spell Crit Chance"] = "Cumul Crit Sorts"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "Crit Sorts <- %Crit Sorts, Intel"
|
||||
@@ -359,19 +361,25 @@ L["Sum Health Regen when out of combat"] = "Cumul Regen Vie HC"
|
||||
L["Health Regen when out of combat <- Spirit"] = "Regen Vie HC <- Esprit"
|
||||
-- /rb sum stat armor
|
||||
L["Sum Armor"] = "Cumul Armure"
|
||||
--L["Armor <- Armor from items and bonuses"] = "Armure <- Armure Objets, Armure Bonus, Agi, Intel"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "Armure <- Armure Objets, Armure Bonus, Agi, Intel"
|
||||
-- /rb sum stat blockvalue
|
||||
L["Sum Block Value"] = "Cumul Dégats Bloqués"
|
||||
L["Block Value <- Block Value, Strength"] = "Dégats Bloqués <- Dégats Bloqués, Force"
|
||||
-- /rb sum stat dodge
|
||||
L["Sum Dodge Chance"] = "Cumul Esquive"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "Esquive <- Score Esquive, Agi, Score Def"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "Esquive <- Score Esquive, Agi, Score Def"
|
||||
-- /rb sum stat parry
|
||||
L["Sum Parry Chance"] = "Cumul Parade"
|
||||
--L["Parry Chance <- Parry Rating"] = "Parade <- Score Parade, Score Def"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "Parade <- Score Parade, Score Def"
|
||||
-- /rb sum stat block
|
||||
L["Sum Block Chance"] = "Cumul Bloquage"
|
||||
--L["Block Chance <- Block Rating"] = "Bloquage <- Score Bloquage, Score Def"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "Bloquage <- Score Bloquage, Score Def"
|
||||
-- /rb sum stat avoidhit
|
||||
L["Sum Hit Avoidance"] = "Cumul Raté"
|
||||
L["Hit Avoidance <- Defense Rating"] = "Raté <- Score Def"
|
||||
-- /rb sum stat avoidcrit
|
||||
L["Sum Crit Avoidance"] = "Cumul Def Crit"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "Def Crit <- Score Def, Resilience"
|
||||
-- /rb sum stat neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Cumul Ignore Esquive"
|
||||
--L["Dodge Neglect <- Weapon Skill Rating"] = "Ignore Esquive <- Score Arme"
|
||||
@@ -379,6 +387,8 @@ L["Sum Dodge Neglect"] = "Cumul Ignore Esquive"
|
||||
L["Sum Parry Neglect"] = "Cumul Ignore Parade"
|
||||
--L["Parry Neglect <- Weapon Skill Rating"] = "Ignore Parade <- Score Arme"
|
||||
-- /rb sum stat neglectblock
|
||||
L["Sum Block Neglect"] = "Cumul Ignore Bloquage"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "Ignore Bloquage <- Score Arme"
|
||||
-- /rb sum stat resarcane
|
||||
L["Sum Arcane Resistance"] = "Cumul RA"
|
||||
L["Arcane Resistance Summary"] = "Résumé de la RA"
|
||||
@@ -419,6 +429,7 @@ L["Intellect Summary"] = "Résumé de l'Intelligence"
|
||||
L["Sum Spirit"] = "Cumul Esprit"
|
||||
L["Spirit Summary"] = "Résumé de l'Esprit"
|
||||
-- /rb sum statcomp def
|
||||
L["Sum Defense"] = "Cumul Def"
|
||||
L["Defense <- Defense Rating"] = "Def <- Score def"
|
||||
-- /rb sum statcomp wpn
|
||||
L["Sum Weapon Skill"] = "Cumul Comp Arme"
|
||||
@@ -426,12 +437,6 @@ L["Weapon Skill <- Weapon Skill Rating"] = "Comp Arme <- Score Arme"
|
||||
-- /rb sum physical exprating
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
-- /rb sum basic mastery
|
||||
--L["Sum Mastery"] = ""
|
||||
--L["Mastery Summary"] = ""
|
||||
-- /rb sum basic masteryrating
|
||||
--L["Sum Mastery Rating"] = ""
|
||||
--L["Mastery Rating Summary"] = ""
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = "Set de gemme"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster koKR locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- Slowhand, 7destiny, kcgcom, fenlis
|
||||
]]
|
||||
@@ -62,14 +62,20 @@ L["Options for Rating display"] = "전투 숙련도 표시에 대한 설정입
|
||||
L["Show Rating Conversions"] = "전투 숙련도 계산 표시"
|
||||
L["Show Rating conversions in tooltips"] = "툴팁에 전투 숙련도를 전투 능력치로 계산하여 표시합니다."
|
||||
-- /rb rating spell
|
||||
L["Show Spell Hit/Haste"] = "주문 적중/가속 표시"
|
||||
L["Show Spell Hit/Haste from Hit/Haste Rating"] = "주문의 적중/가속을 표시합니다."
|
||||
--L["Show Spell Hit/Haste"] = true
|
||||
--L["Show Spell Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "물리 적중/가속 표시"
|
||||
L["Show Physical Hit/Haste from Hit/Haste Rating"] = "물리 적중/가속을 표시합니다."
|
||||
--L["Show Physical Hit/Haste"] = true
|
||||
--L["Show Physical Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "세부적인 전투 숙련도 계산 표시"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "탄력도와 숙련을 세부적인 전투 능력치로 계산해서 표시합니다."
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "방어 숙련 세분화"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "방어 숙련을 치명타 감소, 빗맞힘, 회피, 무기 막기, 방패 막기로 계산해서 표시합니다."
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "무기 숙련 세분화"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "무기 숙련을 치명타, 적중, 회피 무시, 무기 막기 무시, 방패막기 무시로 계산해서 표시합니다."
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = "숙련 세분화"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "숙련을 회피 무시와 무기 막기 무시로 계산해서 표시합니다."
|
||||
@@ -320,12 +326,6 @@ L["Intellect Summary"] = "지능 요약"
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = "정신력 합계"
|
||||
L["Spirit Summary"] = "정신력 요약"
|
||||
-- /rb sum basic mastery
|
||||
--L["Sum Mastery"] = ""
|
||||
--L["Mastery Summary"] = ""
|
||||
-- /rb sum basic masteryrating
|
||||
--L["Sum Mastery Rating"] = ""
|
||||
--L["Mastery Rating Summary"] = ""
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "능력치 - 물리"
|
||||
@@ -341,13 +341,13 @@ L["Sum Feral Attack Power"] = "야성 전투력 합계"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "야성 전투력 <- 야성 전투력, 전투력, 힘, 민첩성"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "적중률 합계"
|
||||
--L["Hit Chance <- Hit Rating"] = "적중률 <- 적중도, 무기 숙련도"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "적중률 <- 적중도, 무기 숙련도"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "적중도 합계"
|
||||
L["Hit Rating Summary"] = "적중도 요약"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "치명타율 합계"
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "치명타 적중도 합계"
|
||||
L["Crit Rating Summary"] = "치명타 적중도 요약"
|
||||
@@ -359,13 +359,13 @@ L["Sum Haste Rating"] = "공격 가속도 합계"
|
||||
L["Haste Rating Summary"] = "공격 가속도 요약"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "원거리 적중률 합계"
|
||||
--L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = "원거리 적중률 <- 적중도, 무기 숙련도, 원거리 적중도"
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = "원거리 적중률 <- 적중도, 무기 숙련도, 원거리 적중도"
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "원거리 적중도 합계"
|
||||
L["Ranged Hit Rating Summary"] = "원거리 적중도 요약"
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "원거리 치명타율 합계"
|
||||
--L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = "원거리 치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도, 치명타 적중도"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = "원거리 치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도, 치명타 적중도"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "원거리 치명타 적중도 합계"
|
||||
L["Ranged Crit Rating Summary"] = "원거리 치명타 적중도 요약"
|
||||
@@ -378,6 +378,12 @@ L["Ranged Haste Rating Summary"] = "원거리 공격 가속도 요약"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "무기 최대 공격력 합계"
|
||||
L["Weapon Max Damage Summary"] = "무기 최대 공격력 요약"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "방어도 무시 합계"
|
||||
L["Ignore Armor Summary"] = "방어도 무시 요약"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "방어도 관통력 합계"
|
||||
L["Armor Penetration Summary"] = "방어도 관통력 요약"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
@@ -390,6 +396,9 @@ L["Expertise <- Expertise Rating"] = "숙련 <- 숙련도"
|
||||
-- /rb sum physical exprating
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "방어도 관통도 합계"
|
||||
L["Armor Penetration Rating Summary"] = "방어도 관통도 요약"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "능력치 - 주문"
|
||||
@@ -445,22 +454,34 @@ L["Stat - Tank"] = "능력치 - 방어"
|
||||
L["Choose tank stats for summary"] = "방어 능력치를 선택합니다."
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "방어도 합계"
|
||||
--L["Armor <- Armor from items and bonuses"] = "방어도 <- 아이템 방어도, 방어도 보너스, 민첩성, 지능"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "방어도 <- 아이템 방어도, 방어도 보너스, 민첩성, 지능"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "피해 방어량 합계"
|
||||
L["Block Value <- Block Value, Strength"] = "피해 방어량 <- 피해 방어량, 힘"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "회피율 합계"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "회피율 <- 회피 숙련도, 민첩성, 방어 숙련도"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "회피율 <- 회피 숙련도, 민첩성, 방어 숙련도"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "무기 막기 확률 합계"
|
||||
--L["Parry Chance <- Parry Rating"] = "무기 막기 확률 <- 무기 막기 숙련도, 방어 숙련도"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "무기 막기 확률 <- 무기 막기 숙련도, 방어 숙련도"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "방패 막기 확률 합계"
|
||||
--L["Block Chance <- Block Rating"] = "방패 막기 확률 <- 방패 막기 숙련도, 방어 숙련도"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "방패 막기 확률 <- 방패 막기 숙련도, 방어 숙련도"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "빗맞힘 합계"
|
||||
L["Hit Avoidance <- Defense Rating"] = "빗맞힘 <- 방어 숙련도"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "치명타 감소 합계"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "치명타 감소 <- 방어 숙련도, 탄력도"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "회피 무시 합계"
|
||||
--L["Dodge Neglect <- Expertise"] = "회피 무시 <- 숙련도, 무기 숙련도"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "회피 무시 <- 숙련도, 무기 숙련도"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "무기 막기 무시 합계"
|
||||
--L["Parry Neglect <- Expertise"] = "무기 막기 무시 <- 숙련도, 무기 숙련도"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "무기 막기 무시 <- 숙련도, 무기 숙련도"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "방패 막기 무시 합계"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "방패 막기 무시 <- 무기 숙련도"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "비전 저항력 합계"
|
||||
L["Arcane Resistance Summary"] = "비전 저항력 요약"
|
||||
@@ -488,12 +509,15 @@ L["Block Rating Summary"] = "방어 막기 숙련도 요약"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "탄력 합계"
|
||||
L["Resilience Summary"] = "탄력 요약"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "방어 숙련 합계"
|
||||
L["Defense <- Defense Rating"] = "방어 숙련 <- 방어 숙련도"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "탱킹 점수 (TankPoint) 합계"
|
||||
L["TankPoints <- Health, Total Reduction"] = "탱킹 점수 (TankPoint) <- 생명력, 총 피해감소"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "총 피해감소 합계"
|
||||
--L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "총 피해감소 <- 방어도, 회피, 무기 막기, 방패 막기, 피해 방어량, 방어 숙련, 탄력, 빗맞힘(자신), 치명타 감소, 몹강타, 피해감소 효과"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "총 피해감소 <- 방어도, 회피, 무기 막기, 방패 막기, 피해 방어량, 방어 숙련, 탄력, 빗맞힘(자신), 치명타 감소, 몹강타, 피해감소 효과"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "총 방어행동 합계"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "방어행동 (Avoidance) <- 회피, 무기 막기, 빗맞힘, 방패 막기(선택적)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster ruRU locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 283 $
|
||||
Translated by:
|
||||
- Orsana \ StingerSoft \ Swix
|
||||
]]
|
||||
@@ -70,6 +70,12 @@ L["Show Physical Hit/Haste from Hit/Haste Rating"] = "Показывать ме
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "Детальная конвертация рейтингов"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "Показывать детальную конвертацию рейтингов мастерства и устойчивости"
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "Разбивать защиту"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "Разбивать защиту на избежание крита, поподание, уклонение, парирование и блокирование"
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "Разбивать уровень владения оружием"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "Разбивать уровень владения оружием на крит, попадание, игнорирование уклона, игнорирование парирования и блока"
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = "Разбивать уровень мастерства"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "Разбивать уровень мастерства на игнорирование уклонения и парирования"
|
||||
@@ -320,12 +326,6 @@ L["Intellect Summary"] = "Суммировать интеллект"
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = "Сумма духа"
|
||||
L["Spirit Summary"] = "Суммировать дух"
|
||||
-- /rb sum basic mastery
|
||||
--L["Sum Mastery"] = ""
|
||||
--L["Mastery Summary"] = ""
|
||||
-- /rb sum basic masteryrating
|
||||
--L["Sum Mastery Rating"] = ""
|
||||
--L["Mastery Rating Summary"] = ""
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "Статы - физические"
|
||||
@@ -341,13 +341,13 @@ L["Sum Feral Attack Power"] = "Сумма силы атаки в облике з
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "Силы атаки в облике зверя <- Сила атаки в облике зверя, Сила атаки, Сила, Ловкость"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "Сумма вероятности поподания"
|
||||
--L["Hit Chance <- Hit Rating"] = "Вероятности поподания <- Рейтинг меткости, Рейтинг владения оружием"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "Вероятности поподания <- Рейтинг меткости, Рейтинг владения оружием"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "Сумма рейтинга меткости"
|
||||
L["Hit Rating Summary"] = "Суммировать рейтинг меткости"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "Сумма вероятности крит удара"
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "Вероятности крит удара <- Рейтинг крит удара, Ловкость, Рейтинг владения оружием"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "Вероятности крит удара <- Рейтинг крит удара, Ловкость, Рейтинг владения оружием"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Сумма рейтинга крита"
|
||||
L["Crit Rating Summary"] = "Суммировать рейтинг крит удара"
|
||||
@@ -359,13 +359,13 @@ L["Sum Haste Rating"] = "Сумма рейтинга скорости"
|
||||
L["Haste Rating Summary"] = "Суммировать рейтинг скорости"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "Сумма вероятности поподания в дальнем бою"
|
||||
--L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = "Вероятность поподания в дальнем бою <- Рейтинг меткости, Рейтинг владения оружием, Рейтинг меткости дальнего боя"
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = "Вероятность поподания в дальнем бою <- Рейтинг меткости, Рейтинг владения оружием, Рейтинг меткости дальнего боя"
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "Сумма рейтинга меткости дальнего боя"
|
||||
L["Ranged Hit Rating Summary"] = "Суммировать рейтинг меткости дальнего боя"
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "Сумма вероятности крита в дальнем бою"
|
||||
--L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = "Вероятность крита в дальнем бою <- Рейтинг крита, Ловкость, Рейтинг владения оружием, Рейтинга крит удара дальнего боя"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = "Вероятность крита в дальнем бою <- Рейтинг крита, Ловкость, Рейтинг владения оружием, Рейтинга крит удара дальнего боя"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "Сумма рейтинга крит удара дальнего боя"
|
||||
L["Ranged Crit Rating Summary"] = "Суммировать рейтинг критического удара в дальнем бою"
|
||||
@@ -378,6 +378,12 @@ L["Ranged Haste Rating Summary"] = "Суммировать рейтинг ско
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "Сумма макс урона оружия"
|
||||
L["Weapon Max Damage Summary"] = "Суммировать макс урон уружия"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "Сумма игнорирования брони"
|
||||
L["Ignore Armor Summary"] = "Суммировать игнорирование брони"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "Сумма пробивание брони"
|
||||
L["Armor Penetration Summary"] = "Суммировать пробивание брони"
|
||||
-- /rb sum physical weapondps
|
||||
L["Sum Weapon DPS"] = "Сумма УВС оружия"
|
||||
L["Weapon DPS Summary"] = "Суммировать урон в секунду от оружия"
|
||||
@@ -390,6 +396,9 @@ L["Expertise <- Expertise Rating"] = "Мастерство <- рейтинг м
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "Сумма рейтинга мастерства"
|
||||
L["Expertise Rating Summary"] = "Суммировать рейтинг мастерства"
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "Сумма рейтинга пробивание брони"
|
||||
L["Armor Penetration Rating Summary"] = "Суммировать рейтинг пробивания брони"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Статы - заклинания"
|
||||
@@ -445,22 +454,34 @@ L["Stat - Tank"] = "Статы - танкования"
|
||||
L["Choose tank stats for summary"] = "Выбор статов танкования для подсчета"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "Сумма брони"
|
||||
--L["Armor <- Armor from items and bonuses"] = "Броня <- Броня с одежды, Броня от бонусов, Ловкость, Интеллект"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "Броня <- Броня с одежды, Броня от бонусов, Ловкость, Интеллект"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "Сумма значение блока"
|
||||
L["Block Value <- Block Value, Strength"] = "Значение блока <- Значение блока, Сила"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Сумма вероятности уклонения"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "Вероятность уклонения <- рейтинг уклонения, ловкость, рейтинг защиты"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "Вероятность уклонения <- рейтинг уклонения, ловкость, рейтинг защиты"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "Сумма вероятности парирования"
|
||||
--L["Parry Chance <- Parry Rating"] = "Вероятность парирования <- рейтинг парирования, рейтинг защиты"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "Вероятность парирования <- рейтинг парирования, рейтинг защиты"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Сумма вероятности блокирования"
|
||||
--L["Block Chance <- Block Rating"] = "Вероятность блокирования <- рейтинг блокирования, рейтинг защиты"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "Вероятность блокирования <- рейтинг блокирования, рейтинг защиты"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "Сумма уклонения от удара"
|
||||
L["Hit Avoidance <- Defense Rating"] = "Уклонение от удара <- Рейтинг защиты"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "Сумма уклонения от крит. удара"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "Уклонения от крит. удара <- Рейтинг защиты, Устойчивость"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Сумма игнорирования уклонения"
|
||||
--L["Dodge Neglect <- Expertise"] = "Игнорирование уклонения <- Мастерство, Рейтинг владения оружием"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "Игнорирование уклонения <- Мастерство, Рейтинг владения оружием"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "Сумма игнорирования парирования"
|
||||
--L["Parry Neglect <- Expertise"] = "Игнорирование парирования <- Мастерство, Рейтинг владения оружием"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "Игнорирование парирования <- Мастерство, Рейтинг владения оружием"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "Сумма игнорирования блока"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "Игнорирование блока <- Рейтинг владения оружием"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Сумма защиты от тайной магии"
|
||||
L["Arcane Resistance Summary"] = "Суммировать сопротивление тайной магии"
|
||||
@@ -488,12 +509,15 @@ L["Block Rating Summary"] = "Суммировать рейтинг блока"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "Сумма устойчивости"
|
||||
L["Resilience Summary"] = "Суммировать устойчивость"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "Сумма защиты"
|
||||
L["Defense <- Defense Rating"] = "Защита <- Рейтинг защиты"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "Самма TankPoints"
|
||||
L["TankPoints <- Health, Total Reduction"] ="TankPoints <- Здоровье, Общее Cнижение"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "Самма общего снижения"
|
||||
--L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Общее снижение <- Броня, Уклонение, Парирование, Блок, Значение блока, Защита, Устойчивость, ПромахСущества, КритСущества, MobCrush, DamageTakenMods"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "Общее снижение <- Броня, Уклонение, Парирование, Блок, Значение блока, Защита, Устойчивость, ПромахСущества, КритСущества, MobCrush, DamageTakenMods"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Сумма уклонения от удара"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Уклонение от удара <- Уклонение, Парирование, ПромахСущества, Блок(дополнительный)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster zhCN locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- iceburn
|
||||
- 急云@CWDG
|
||||
@@ -63,6 +63,12 @@ L["Show Physical Hit/Haste from Hit/Haste Rating"] = "显示命中/急速等级
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "显示详细转换文本"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "显示详细的抗性和精准等级转换"
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "分析防御"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "将防御分为避免爆击、避免击中、躲闪、招架和格挡"
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "分析武器技能"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "加武器技能分为爆击、击中、防止被躲闪、防止被招架和防止被格挡"
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = "精准效能"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "转换精准等级为忽略躲闪和忽略招架"
|
||||
@@ -300,12 +306,6 @@ L["Intellect Summary"] = "统计智力"
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = "统计精神"
|
||||
L["Spirit Summary"] = "统计精神"
|
||||
-- /rb sum basic mastery
|
||||
--L["Sum Mastery"] = ""
|
||||
--L["Mastery Summary"] = ""
|
||||
-- /rb sum basic masteryrating
|
||||
--L["Sum Mastery Rating"] = ""
|
||||
--L["Mastery Rating Summary"] = ""
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "属性 - 物理"
|
||||
@@ -321,13 +321,13 @@ L["Sum Feral Attack Power"] = "统计野性攻击强度"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "野性攻击强度 ← 野性攻击强度、攻击强度、力量、敏捷"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "统计物理命中几率"
|
||||
--L["Hit Chance <- Hit Rating"] = "物理命中几率 ← 命中等级、武器技能等级"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "物理命中几率 ← 命中等级、武器技能等级"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "统计命中等级"
|
||||
L["Hit Rating Summary"] = "统计命中等级"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "统计物理爆击几率"
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "物理爆击几率 ← 爆击等级、敏捷、武器技能等级"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "物理爆击几率 ← 爆击等级、敏捷、武器技能等级"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "统计爆击等级"
|
||||
L["Crit Rating Summary"] = "统计爆击等级"
|
||||
@@ -339,13 +339,13 @@ L["Sum Haste Rating"] = "统计急速等级"
|
||||
L["Haste Rating Summary"] = "统计急速等级"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "统计远程命中几率"
|
||||
--L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = "远程米中几率 ← 命中等级、武器技能等级、远程命中等级"
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = "远程米中几率 ← 命中等级、武器技能等级、远程命中等级"
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "统计远程命中等级"
|
||||
L["Ranged Hit Rating Summary"] = "统计远程命中等级"
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "统计远爆击几率"
|
||||
--L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = "远程爆击几率 ← 爆击等级、敏捷、武器技能等级、远程爆击等级"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = "远程爆击几率 ← 爆击等级、敏捷、武器技能等级、远程爆击等级"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "统计远程爆击等级"
|
||||
L["Ranged Crit Rating Summary"] = "统计远程爆击等级"
|
||||
@@ -358,6 +358,12 @@ L["Ranged Haste Rating Summary"] = "统计远程急速等级"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "统计武器最大伤害"
|
||||
L["Weapon Max Damage Summary"] = "统计武器最大伤害"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "统计忽略护甲"
|
||||
L["Ignore Armor Summary"] = "统计忽略护甲效果"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "统计护甲穿透"
|
||||
L["Armor Penetration Summary"] = "统计无视护甲穿透"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = "统计武器DPS"
|
||||
--L["Weapon DPS Summary"] = "武器DPS统计"
|
||||
@@ -370,6 +376,9 @@ L["Expertise <- Expertise Rating"] = "精准 ← 精准等级"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "统计精准等级"
|
||||
L["Expertise Rating Summary"] = "统计精准等级"
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "统计无视护甲穿透等级"
|
||||
L["Armor Penetration Rating Summary"] = "统计无视护甲穿透等级"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "属性 - 法术"
|
||||
@@ -425,22 +434,34 @@ L["Stat - Tank"] = "属性 - 抗打击"
|
||||
L["Choose tank stats for summary"] = "选择你想要统计的抗打击能力的属性"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "统计护甲值"
|
||||
--L["Armor <- Armor from items and bonuses"] = "护甲值 ← 物品护甲、护甲加成、敏捷、智力"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "护甲值 ← 物品护甲、护甲加成、敏捷、智力"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "统计格挡值"
|
||||
L["Block Value <- Block Value, Strength"] = "格挡值 ← 格挡值、力量"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "统计躲闪几率"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "躲闪几率 ← 躲闪等级、敏捷、防御等级"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "躲闪几率 ← 躲闪等级、敏捷、防御等级"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "统计招架几率"
|
||||
--L["Parry Chance <- Parry Rating"] = "招架几率 ← 招架等级、防御等级"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "招架几率 ← 招架等级、防御等级"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "统计格挡几率"
|
||||
--L["Block Chance <- Block Rating"] = "格挡几率 ← 格挡等级、防御等级"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "格挡几率 ← 格挡等级、防御等级"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "统计物理命中躲闪"
|
||||
L["Hit Avoidance <- Defense Rating"] = "物理命中躲闪 ← 防御等级"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "统计物理爆击躲闪"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "物理爆击躲闪 ← 防御等级、韧性"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "统计防止被躲闪"
|
||||
--L["Dodge Neglect <- Expertise"] = "防止被躲闪 ← 精准等级、武器技能等级"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "防止被躲闪 ← 精准等级、武器技能等级"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "统计防止被招架"
|
||||
--L["Parry Neglect <- Expertise"] = "防止被招架 ← 精准等级、武器技能等级"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "防止被招架 ← 精准等级、武器技能等级"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "统计防止被格挡"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "防止被格挡 ← 武器技能等级"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "统计奥术抗性"
|
||||
L["Arcane Resistance Summary"] = "统计奥术抗性"
|
||||
@@ -468,12 +489,15 @@ L["Block Rating Summary"] = "统计格挡等级"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "统计韧性"
|
||||
L["Resilience Summary"] = "统计韧性等级"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "统计防御"
|
||||
L["Defense <- Defense Rating"] = "防御 ← 防御等级"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "统计抗打击能力"
|
||||
L["TankPoints <- Health, Total Reduction"] = "抗打击能力 ← 生命值, 所有伤害减免"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "统计伤害减免"
|
||||
--L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "所有伤害减免 <- 护甲值, 躲闪, 招架, 格挡, 格挡值, 防御技能, 韧性, 怪物未击中几率, 怪物重击几率, 怪物碾压打击几率, 伤害减免"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "所有伤害减免 <- 护甲值, 躲闪, 招架, 格挡, 格挡值, 防御技能, 韧性, 怪物未击中几率, 怪物重击几率, 怪物碾压打击几率, 伤害减免"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "统计躲避"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "躲避 ← 躲闪, 招架, 怪物未命中, 格挡(可选)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: RatingBuster zhTW locale
|
||||
Revision: $Revision: 294 $
|
||||
Revision: $Revision: 282 $
|
||||
Translated by:
|
||||
- Whitetooth@Cenarius (hotdogee@bahamut.twbbs.org)
|
||||
- CuteMiyu
|
||||
@@ -73,6 +73,12 @@ L["Show Physical Hit/Haste from Hit/Haste Rating"] = "顯示命中/加速給的
|
||||
-- /rb rating detail
|
||||
L["Show Detailed Conversions Text"] = "顯示詳細轉換文字"
|
||||
L["Show detailed text for Resilience and Expertise conversions"] = "顯示韌性和熟練技能的詳細轉換文字"
|
||||
-- /rb rating def
|
||||
L["Defense Breakdown"] = "分析防禦"
|
||||
L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = "將防禦分為避免致命、避免命中、閃躲、招架和格擋"
|
||||
-- /rb rating wpn
|
||||
L["Weapon Skill Breakdown"] = "分析武器技能"
|
||||
L["Convert Weapon Skill into Crit, Hit, Dodge Neglect, Parry Neglect and Block Neglect"] = "將武器技能分為致命、擊中、防止被閃躲、防止被招架和防止被格擋"
|
||||
-- /rb rating exp
|
||||
L["Expertise Breakdown"] = "分析熟練技能"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "將熟練技能分為防止被閃躲、防止被招架"
|
||||
@@ -323,12 +329,6 @@ L["Intellect Summary"] = "統計智力"
|
||||
-- /rb sum basic spi
|
||||
L["Sum Spirit"] = "統計精神"
|
||||
L["Spirit Summary"] = "統計精神"
|
||||
-- /rb sum basic mastery
|
||||
L["Sum Mastery"] = "統計精通"
|
||||
L["Mastery Summary"] = "統計精通"
|
||||
-- /rb sum basic masteryrating
|
||||
L["Sum Mastery Rating"] = "統計精通等級"
|
||||
L["Mastery Rating Summary"] = "統計精通等級"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum physical
|
||||
L["Stat - Physical"] = "統計物理屬性"
|
||||
@@ -344,13 +344,13 @@ L["Sum Feral Attack Power"] = "統計野性攻擊強度"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "野性攻擊強度 ← 野性攻擊強度、攻擊強度、力量、敏捷"
|
||||
-- /rb sum physical hit
|
||||
L["Sum Hit Chance"] = "統計命中機率"
|
||||
--L["Hit Chance <- Hit Rating"] = "命中機率 ← 命中等級、武器技能等級"
|
||||
L["Hit Chance <- Hit Rating, Weapon Skill Rating"] = "命中機率 ← 命中等級、武器技能等級"
|
||||
-- /rb sum physical hitrating
|
||||
L["Sum Hit Rating"] = "統計命中等級"
|
||||
L["Hit Rating Summary"] = "統計命中等級"
|
||||
-- /rb sum physical crit
|
||||
L["Sum Crit Chance"] = "統計致命一擊機率"
|
||||
--L["Crit Chance <- Crit Rating, Agility"] = "致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級"
|
||||
L["Crit Chance <- Crit Rating, Agility, Weapon Skill Rating"] = "致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "統計致命等級"
|
||||
L["Crit Rating Summary"] = "統計致命等級"
|
||||
@@ -362,13 +362,13 @@ L["Sum Haste Rating"] = "統計加速等級"
|
||||
L["Haste Rating Summary"] = "統計加速等級"
|
||||
-- /rb sum physical rangedhit
|
||||
L["Sum Ranged Hit Chance"] = "統計遠程命中機率"
|
||||
--L["Ranged Hit Chance <- Hit Rating, Ranged Hit Rating"] = "遠程命中機率 ← 命中等級、武器技能等級、遠程命中等級"
|
||||
L["Ranged Hit Chance <- Hit Rating, Weapon Skill Rating, Ranged Hit Rating"] = "遠程命中機率 ← 命中等級、武器技能等級、遠程命中等級"
|
||||
-- /rb sum physical rangedhitrating
|
||||
L["Sum Ranged Hit Rating"] = "統計遠程命中等級"
|
||||
L["Ranged Hit Rating Summary"] = "統計遠程命中等級"
|
||||
-- /rb sum physical rangedcrit
|
||||
L["Sum Ranged Crit Chance"] = "統計遠程致命一級機率"
|
||||
--L["Ranged Crit Chance <- Crit Rating, Agility, Ranged Crit Rating"] = "遠程致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級、遠程致命一級等級"
|
||||
L["Ranged Crit Chance <- Crit Rating, Agility, Weapon Skill Rating, Ranged Crit Rating"] = "遠程致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級、遠程致命一級等級"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "統計遠程致命一級等級"
|
||||
L["Ranged Crit Rating Summary"] = "統計遠程致命一級等級"
|
||||
@@ -381,6 +381,12 @@ L["Ranged Haste Rating Summary"] = "統計遠程加速等級"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "統計武器最大傷害"
|
||||
L["Weapon Max Damage Summary"] = "統計武器最大傷害"
|
||||
-- /rb sum physical ignorearmor
|
||||
L["Sum Ignore Armor"] = "統計無視護甲"
|
||||
L["Ignore Armor Summary"] = "統計無視護甲"
|
||||
-- /rb sum physical arp
|
||||
L["Sum Armor Penetration"] = "統計護甲穿透"
|
||||
L["Armor Penetration Summary"] = "統計無視護甲穿透"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
@@ -393,6 +399,9 @@ L["Expertise <- Expertise Rating"] = "熟練技能 ← 熟練等級"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "統計熟練等級"
|
||||
L["Expertise Rating Summary"] = "統計熟練等級"
|
||||
-- /rb sum physical arprating
|
||||
L["Sum Armor Penetration Rating"] = "統計無視護甲穿透等級"
|
||||
L["Armor Penetration Rating Summary"] = "統計無視護甲穿透等級"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "統計魔法屬性"
|
||||
@@ -448,22 +457,34 @@ L["Stat - Tank"] = "統計坦克屬性"
|
||||
L["Choose tank stats for summary"] = "自訂坦克屬性統計項目"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "統計護甲值"
|
||||
--L["Armor <- Armor from items and bonuses"] = "護甲值 ← 物品護甲、護甲加成、敏捷、智力"
|
||||
L["Armor <- Armor from items, Armor from bonuses, Agility, Intellect"] = "護甲值 ← 物品護甲、護甲加成、敏捷、智力"
|
||||
-- /rb sum tank blockvalue
|
||||
L["Sum Block Value"] = "統計格擋值"
|
||||
L["Block Value <- Block Value, Strength"] = "格擋值 ← 格擋值、力量"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "統計閃躲機率"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "閃躲機率 ← 閃躲等級、敏捷、防禦等級"
|
||||
L["Dodge Chance <- Dodge Rating, Agility, Defense Rating"] = "閃躲機率 ← 閃躲等級、敏捷、防禦等級"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "統計招架機率"
|
||||
--L["Parry Chance <- Parry Rating"] = "招架機率 ← 招架等級、防禦等級"
|
||||
L["Parry Chance <- Parry Rating, Defense Rating"] = "招架機率 ← 招架等級、防禦等級"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "統計格擋機率"
|
||||
--L["Block Chance <- Block Rating"] = "格擋機率 ← 格擋等級、防禦等級"
|
||||
L["Block Chance <- Block Rating, Defense Rating"] = "格擋機率 ← 格擋等級、防禦等級"
|
||||
-- /rb sum tank avoidhit
|
||||
L["Sum Hit Avoidance"] = "統計迴避命中"
|
||||
L["Hit Avoidance <- Defense Rating"] = "迴避命中 ← 防禦等級"
|
||||
-- /rb sum tank avoidcrit
|
||||
L["Sum Crit Avoidance"] = "統計迴避致命一擊"
|
||||
L["Crit Avoidance <- Defense Rating, Resilience"] = "迴避致命一擊 ← 防禦等級、韌性"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "統計防止被閃躲"
|
||||
--L["Dodge Neglect <- Expertise"] = "防止被閃躲 ← 熟練技能、武器技能等級"
|
||||
L["Dodge Neglect <- Expertise, Weapon Skill Rating"] = "防止被閃躲 ← 熟練技能、武器技能等級"
|
||||
-- /rb sum stat neglectparry
|
||||
L["Sum Parry Neglect"] = "統計防止被招架"
|
||||
--L["Parry Neglect <- Expertise"] = "防止被招架 ← 熟練技能、武器技能等級"
|
||||
L["Parry Neglect <- Expertise, Weapon Skill Rating"] = "防止被招架 ← 熟練技能、武器技能等級"
|
||||
-- /rb sum tank neglectblock
|
||||
L["Sum Block Neglect"] = "統計防止被格擋"
|
||||
L["Block Neglect <- Weapon Skill Rating"] = "防止被格擋 ← 武器技能等級"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "統計秘法抗性"
|
||||
L["Arcane Resistance Summary"] = "統計秘法抗性"
|
||||
@@ -491,12 +512,15 @@ L["Block Rating Summary"] = "統計格檔等級"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "統計韌性"
|
||||
L["Resilience Summary"] = "統計韌性"
|
||||
-- /rb sum tank def
|
||||
L["Sum Defense"] = "統計防禦"
|
||||
L["Defense <- Defense Rating"] = "防禦 ← 防禦等級"
|
||||
-- /rb sum tank tp
|
||||
L["Sum TankPoints"] = "統計坦克點"
|
||||
L["TankPoints <- Health, Total Reduction"] = "坦克點 ← 生命力、傷害減免總值"
|
||||
-- /rb sum tank tr
|
||||
L["Sum Total Reduction"] = "統計傷害減免總值"
|
||||
--L["Total Reduction <- Armor, Dodge, Parry, Block, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "傷害減免總值 ← 護甲、閃躲、招架、格擋、格檔值、防禦、韌性、怪物未擊中、怪物致命、怪物輾壓、DamageTakenMods (?)"
|
||||
L["Total Reduction <- Armor, Dodge, Parry, Block, Block Value, Defense, Resilience, MobMiss, MobCrit, MobCrush, DamageTakenMods"] = "傷害減免總值 ← 護甲、閃躲、招架、格擋、格檔值、防禦、韌性、怪物未擊中、怪物致命、怪物輾壓、DamageTakenMods (?)"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "統計傷害迴避"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "傷害迴避 ← 閃躲、招架、怪物未擊中、格擋(選項)"
|
||||
|
||||
+822
-331
File diff suppressed because it is too large
Load Diff
@@ -1,18 +1,19 @@
|
||||
## Interface: 30300
|
||||
## Interface: 30301
|
||||
## Title: RatingBuster
|
||||
## Notes: Item stat breakdown, analysis and comparison
|
||||
## Notes-zhTW: 裝備數值解析與比較
|
||||
## Author: Whitetooth
|
||||
## Modder: Aramis/Fujoshi
|
||||
## X-eMail: hotdogee [at] gmail [dot] com
|
||||
## SavedVariables: RatingBusterDB
|
||||
## OptionalDeps: Ace3, LibTipHooker-1.1, LibStatLogic-1.2, UTF8, LibBabble-Inventory-3.0, LibDualSpec-1.0, TankPoints
|
||||
## X-Embeds: Ace3, LibTipHooker-1.1, LibStatLogic-1.2, UTF8, LibBabble-Inventory-3.0, LibDualSpec-1.0
|
||||
## OptionalDeps: Ace3, LibTipHooker-1.1, LibStatLogic-1.1, UTF8, LibBabble-Inventory-3.0, LibDualSpec-1.0, TankPoints
|
||||
## X-Embeds: Ace3, LibTipHooker-1.1, LibStatLogic-1.1, UTF8, LibBabble-Inventory-3.0, LibDualSpec-1.0
|
||||
## X-Category: Interface Enhancements
|
||||
## X-RelSite-WoWI: 5819
|
||||
## X-RelSite-Curse: 4991
|
||||
## X-License: GPL v2
|
||||
## X-Encoding: UTF-8
|
||||
## X-Curse-Packaged-Version: r295
|
||||
## X-Curse-Packaged-Version: r284
|
||||
## X-Curse-Project-Name: RatingBuster
|
||||
## X-Curse-Project-ID: rating-buster
|
||||
## X-Curse-Repository-ID: wow/rating-buster/mainline
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
..\FrameXML\UI.xsd">
|
||||
|
||||
<Script file="libs\LibStub\LibStub.lua"/>
|
||||
<Include file="libs\LibStatLogic-1.2\lib.xml"/>
|
||||
<Include file="libs\LibStatLogic-1.1\lib.xml"/>
|
||||
<Include file="libs\LibTipHooker-1.1\lib.xml"/>
|
||||
<Include file="libs\LibBabble-Inventory-3.0\lib.xml"/>
|
||||
<Include file="Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-- as well as associate it with a slash command.
|
||||
-- @class file
|
||||
-- @name AceConfig-3.0
|
||||
-- @release $Id: AceConfig-3.0.lua 969 2010-10-07 02:11:48Z shefki $
|
||||
-- @release $Id: AceConfig-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
|
||||
|
||||
--[[
|
||||
AceConfig-3.0
|
||||
@@ -19,8 +19,8 @@ if not AceConfig then return end
|
||||
|
||||
local cfgreg = LibStub("AceConfigRegistry-3.0")
|
||||
local cfgcmd = LibStub("AceConfigCmd-3.0")
|
||||
--TODO: local cfgdlg = LibStub("AceConfigDialog-3.0", true)
|
||||
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0", true)
|
||||
local cfgdlg = LibStub("AceConfigDialog-3.0")
|
||||
--TODO: local cfgdrp = LibStub("AceConfigDropdown-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pcall, error, type, pairs = pcall, error, type, pairs
|
||||
@@ -36,7 +36,7 @@ local pcall, error, type, pairs = pcall, error, type, pairs
|
||||
-- You can supply a slash command (or a table of slash commands) to register with AceConfigCmd directly.
|
||||
-- @paramsig appName, options [, slashcmd]
|
||||
-- @param appName The application name for the config table.
|
||||
-- @param options The option table (or a function to generate one on demand). http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/
|
||||
-- @param options The option table (or a function to generate one on demand)
|
||||
-- @param slashcmd A slash command to register for the option table, or a table of slash commands.
|
||||
-- @usage
|
||||
-- local AceConfig = LibStub("AceConfig-3.0")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
|
||||
-- @class file
|
||||
-- @name AceConfigDialog-3.0
|
||||
-- @release $Id: AceConfigDialog-3.0.lua 967 2010-09-25 08:20:55Z nevcairiel $
|
||||
-- @release $Id: AceConfigDialog-3.0.lua 913 2010-02-13 12:16:13Z nevcairiel $
|
||||
|
||||
local LibStub = LibStub
|
||||
local MAJOR, MINOR = "AceConfigDialog-3.0", 50
|
||||
local MAJOR, MINOR = "AceConfigDialog-3.0", 45
|
||||
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceConfigDialog then return end
|
||||
@@ -15,7 +15,6 @@ AceConfigDialog.frame = AceConfigDialog.frame or CreateFrame("Frame")
|
||||
|
||||
AceConfigDialog.frame.apps = AceConfigDialog.frame.apps or {}
|
||||
AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
|
||||
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
|
||||
|
||||
local gui = LibStub("AceGUI-3.0")
|
||||
local reg = LibStub("AceConfigRegistry-3.0")
|
||||
@@ -24,8 +23,8 @@ local reg = LibStub("AceConfigRegistry-3.0")
|
||||
local tconcat, tinsert, tsort, tremove = table.concat, table.insert, table.sort, table.remove
|
||||
local strmatch, format = string.match, string.format
|
||||
local assert, loadstring, error = assert, loadstring, error
|
||||
local pairs, next, select, type, unpack, wipe = pairs, next, select, type, unpack, wipe
|
||||
local rawset, tostring, tonumber = rawset, tostring, tonumber
|
||||
local pairs, next, select, type, unpack = pairs, next, select, type, unpack
|
||||
local rawset, tostring = rawset, tostring
|
||||
local math_min, math_max, math_floor = math.min, math.max, math.floor
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
@@ -77,7 +76,7 @@ Dispatchers[0] = function(func)
|
||||
end
|
||||
|
||||
local function safecall(func, ...)
|
||||
return Dispatchers[select("#", ...)](func, ...)
|
||||
return Dispatchers[select('#', ...)](func, ...)
|
||||
end
|
||||
|
||||
local width_multiplier = 170
|
||||
@@ -104,7 +103,7 @@ Group Types
|
||||
local new, del, copy
|
||||
--newcount, delcount,createdcount,cached = 0,0,0
|
||||
do
|
||||
local pool = setmetatable({},{__mode="k"})
|
||||
local pool = setmetatable({},{__mode='k'})
|
||||
function new()
|
||||
--newcount = newcount + 1
|
||||
local t = next(pool)
|
||||
@@ -241,7 +240,7 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
|
||||
info.handler = handler
|
||||
info.option = option
|
||||
info.type = option.type
|
||||
info.uiType = "dialog"
|
||||
info.uiType = 'dialog'
|
||||
info.uiName = MAJOR
|
||||
|
||||
local a, b, c ,d
|
||||
@@ -322,8 +321,8 @@ local function compareOptions(a,b)
|
||||
end
|
||||
local OrderA, OrderB = tempOrders[a] or 100, tempOrders[b] or 100
|
||||
if OrderA == OrderB then
|
||||
local NameA = (type(tempNames[a]) == "string") and tempNames[a] or ""
|
||||
local NameB = (type(tempNames[b]) == "string") and tempNames[b] or ""
|
||||
local NameA = (type(tempNames[a] == "string") and tempNames[a]) or ""
|
||||
local NameB = (type(tempNames[b] == "string") and tempNames[b]) or ""
|
||||
return NameA:upper() < NameB:upper()
|
||||
end
|
||||
if OrderA < 0 then
|
||||
@@ -479,7 +478,7 @@ function AceConfigDialog:SelectGroup(appName, ...)
|
||||
local treevalue
|
||||
local treestatus
|
||||
|
||||
for n = 1, select("#",...) do
|
||||
for n = 1, select('#',...) do
|
||||
local key = select(n, ...)
|
||||
|
||||
if group.childGroups == "tab" or group.childGroups == "select" then
|
||||
@@ -543,7 +542,7 @@ local function OptionOnMouseOver(widget, event)
|
||||
|
||||
GameTooltip:SetText(name, 1, .82, 0, 1)
|
||||
|
||||
if opt.type == "multiselect" then
|
||||
if opt.type == 'multiselect' then
|
||||
GameTooltip:AddLine(user.text,0.5, 0.5, 0.8, 1)
|
||||
end
|
||||
if type(desc) == "string" then
|
||||
@@ -562,10 +561,10 @@ end
|
||||
|
||||
local function GetFuncName(option)
|
||||
local type = option.type
|
||||
if type == "execute" then
|
||||
return "func"
|
||||
if type == 'execute' then
|
||||
return 'func'
|
||||
else
|
||||
return "set"
|
||||
return 'set'
|
||||
end
|
||||
end
|
||||
local function confirmPopup(appName, rootframe, basepath, info, message, func, ...)
|
||||
@@ -595,7 +594,7 @@ local function confirmPopup(appName, rootframe, basepath, info, message, func, .
|
||||
AceConfigDialog:Open(appName, rootframe, unpack(basepath or emptyTbl))
|
||||
del(info)
|
||||
end
|
||||
for i = 1, select("#", ...) do
|
||||
for i = 1, select('#', ...) do
|
||||
t[i] = select(i, ...) or false
|
||||
end
|
||||
t.timeout = 0
|
||||
@@ -654,7 +653,7 @@ local function ActivateControl(widget, event, ...)
|
||||
info.handler = handler
|
||||
info.option = option
|
||||
info.type = option.type
|
||||
info.uiType = "dialog"
|
||||
info.uiType = 'dialog'
|
||||
info.uiName = MAJOR
|
||||
|
||||
local name
|
||||
@@ -765,13 +764,13 @@ local function ActivateControl(widget, event, ...)
|
||||
end
|
||||
end
|
||||
|
||||
local iscustom = user.rootframe:GetUserData("iscustom")
|
||||
local iscustom = user.rootframe:GetUserData('iscustom')
|
||||
local rootframe
|
||||
|
||||
if iscustom then
|
||||
rootframe = user.rootframe
|
||||
end
|
||||
local basepath = user.rootframe:GetUserData("basepath")
|
||||
local basepath = user.rootframe:GetUserData('basepath')
|
||||
if type(func) == "string" then
|
||||
if handler and handler[func] then
|
||||
confirmPopup(user.appName, rootframe, basepath, info, confirmText, handler[func], handler, info, ...)
|
||||
@@ -799,8 +798,8 @@ local function ActivateControl(widget, event, ...)
|
||||
|
||||
|
||||
|
||||
local iscustom = user.rootframe:GetUserData("iscustom")
|
||||
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
|
||||
local iscustom = user.rootframe:GetUserData('iscustom')
|
||||
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
|
||||
--full refresh of the frame, some controls dont cause this on all events
|
||||
if option.type == "color" then
|
||||
if event == "OnValueConfirmed" then
|
||||
@@ -835,27 +834,22 @@ local function ActivateControl(widget, event, ...)
|
||||
end
|
||||
|
||||
local function ActivateSlider(widget, event, value)
|
||||
local option = widget:GetUserData("option")
|
||||
local min, max, step = option.min or (not option.softMin and 0 or nil), option.max or (not option.softMax and 100 or nil), option.step
|
||||
if min then
|
||||
local option = widget:GetUserData('option')
|
||||
local min, max, step = option.min or 0, option.max or 100, option.step
|
||||
if step then
|
||||
value = math_floor((value - min) / step + 0.5) * step + min
|
||||
end
|
||||
value = math_max(value, min)
|
||||
end
|
||||
if max then
|
||||
value = math_min(value, max)
|
||||
end
|
||||
value = math_max(math_min(value,max),min)
|
||||
ActivateControl(widget,event,value)
|
||||
end
|
||||
|
||||
--called from a checkbox that is part of an internally created multiselect group
|
||||
--this type is safe to refresh on activation of one control
|
||||
local function ActivateMultiControl(widget, event, ...)
|
||||
ActivateControl(widget, event, widget:GetUserData("value"), ...)
|
||||
ActivateControl(widget, event, widget:GetUserData('value'), ...)
|
||||
local user = widget:GetUserDataTable()
|
||||
local iscustom = user.rootframe:GetUserData("iscustom")
|
||||
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
|
||||
local iscustom = user.rootframe:GetUserData('iscustom')
|
||||
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
|
||||
if iscustom then
|
||||
AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
|
||||
else
|
||||
@@ -866,8 +860,8 @@ end
|
||||
local function MultiControlOnClosed(widget, event, ...)
|
||||
local user = widget:GetUserDataTable()
|
||||
if user.valuechanged then
|
||||
local iscustom = user.rootframe:GetUserData("iscustom")
|
||||
local basepath = user.rootframe:GetUserData("basepath") or emptyTbl
|
||||
local iscustom = user.rootframe:GetUserData('iscustom')
|
||||
local basepath = user.rootframe:GetUserData('basepath') or emptyTbl
|
||||
if iscustom then
|
||||
AceConfigDialog:Open(user.appName, user.rootframe, unpack(basepath))
|
||||
else
|
||||
@@ -877,7 +871,7 @@ local function MultiControlOnClosed(widget, event, ...)
|
||||
end
|
||||
|
||||
local function FrameOnClose(widget, event)
|
||||
local appName = widget:GetUserData("appName")
|
||||
local appName = widget:GetUserData('appName')
|
||||
AceConfigDialog.OpenFrames[appName] = nil
|
||||
gui:Release(widget)
|
||||
end
|
||||
@@ -1088,7 +1082,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
|
||||
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
|
||||
|
||||
if type(image) == "string" then
|
||||
if type(image) == 'string' then
|
||||
control = gui:Create("Icon")
|
||||
if not width then
|
||||
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
|
||||
@@ -1096,7 +1090,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
if not height then
|
||||
height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
|
||||
end
|
||||
if type(imageCoords) == "table" then
|
||||
if type(imageCoords) == 'table' then
|
||||
control:SetImage(image, unpack(imageCoords))
|
||||
else
|
||||
control:SetImage(image)
|
||||
@@ -1123,8 +1117,12 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
control = gui:Create(v.multiline and "MultiLineEditBox" or "EditBox")
|
||||
end
|
||||
|
||||
if v.multiline and control.SetNumLines then
|
||||
control:SetNumLines(tonumber(v.multiline) or 4)
|
||||
if v.multiline then
|
||||
local lines = 4
|
||||
if type(v.multiline) == "number" then
|
||||
lines = v.multiline
|
||||
end
|
||||
control:SetHeight(60 + (14*lines))
|
||||
end
|
||||
control:SetLabel(name)
|
||||
control:SetCallback("OnEnterPressed",ActivateControl)
|
||||
@@ -1150,8 +1148,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
local image = GetOptionsMemberValue("image", v, options, path, appName)
|
||||
local imageCoords = GetOptionsMemberValue("imageCoords", v, options, path, appName)
|
||||
|
||||
if type(image) == "string" then
|
||||
if type(imageCoords) == "table" then
|
||||
if type(image) == 'string' then
|
||||
if type(imageCoords) == 'table' then
|
||||
control:SetImage(image, unpack(imageCoords))
|
||||
else
|
||||
control:SetImage(image)
|
||||
@@ -1160,7 +1158,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
elseif v.type == "range" then
|
||||
control = gui:Create("Slider")
|
||||
control:SetLabel(name)
|
||||
control:SetSliderValues(v.softMin or v.min or 0, v.softMax or v.max or 100, v.bigStep or v.step or 0)
|
||||
control:SetSliderValues(v.min or 0,v.max or 100, v.bigStep or v.step or 0)
|
||||
control:SetIsPercent(v.isPercent)
|
||||
local value = GetOptionsMemberValue("get",v, options, path, appName)
|
||||
if type(value) ~= "number" then
|
||||
@@ -1243,8 +1241,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
local text = values[value]
|
||||
local check = gui:Create("CheckBox")
|
||||
check:SetLabel(text)
|
||||
check:SetUserData("value", value)
|
||||
check:SetUserData("text", text)
|
||||
check:SetUserData('value', value)
|
||||
check:SetUserData('text', text)
|
||||
check:SetDisabled(disabled)
|
||||
check:SetTriState(v.tristate)
|
||||
check:SetValue(GetOptionsMemberValue("get",v, options, path, appName, value))
|
||||
@@ -1304,14 +1302,14 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
|
||||
local image, width, height = GetOptionsMemberValue("image",v, options, path, appName)
|
||||
|
||||
if type(image) == "string" then
|
||||
if type(image) == 'string' then
|
||||
if not width then
|
||||
width = GetOptionsMemberValue("imageWidth",v, options, path, appName)
|
||||
end
|
||||
if not height then
|
||||
height = GetOptionsMemberValue("imageHeight",v, options, path, appName)
|
||||
end
|
||||
if type(imageCoords) == "table" then
|
||||
if type(imageCoords) == 'table' then
|
||||
control:SetImage(image, unpack(imageCoords))
|
||||
else
|
||||
control:SetImage(image)
|
||||
@@ -1362,7 +1360,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
||||
end
|
||||
|
||||
local function BuildPath(path, ...)
|
||||
for i = 1, select("#",...) do
|
||||
for i = 1, select('#',...) do
|
||||
tinsert(path, (select(i,...)))
|
||||
end
|
||||
end
|
||||
@@ -1490,13 +1488,17 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
|
||||
local grouptype, parenttype = options.childGroups, "none"
|
||||
|
||||
|
||||
--temp path table to pass to callbacks as we traverse the tree
|
||||
local temppath = new()
|
||||
for i = 1, #path do
|
||||
local v = path[i]
|
||||
temppath[i] = v
|
||||
group = GetSubOption(group, v)
|
||||
inline = inline or pickfirstset(v.dialogInline,v.guiInline,v.inline, false)
|
||||
parenttype = grouptype
|
||||
grouptype = group.childGroups
|
||||
end
|
||||
del(temppath)
|
||||
|
||||
if not parenttype then
|
||||
parenttype = "tree"
|
||||
@@ -1665,12 +1667,9 @@ local function RefreshOnUpdate(this)
|
||||
|
||||
if this.closeAll then
|
||||
for k, v in pairs(AceConfigDialog.OpenFrames) do
|
||||
if not this.closeAllOverride[k] then
|
||||
v:Hide()
|
||||
end
|
||||
end
|
||||
this.closeAll = nil
|
||||
wipe(this.closeAllOverride)
|
||||
end
|
||||
|
||||
for appName in pairs(this.apps) do
|
||||
@@ -1682,7 +1681,7 @@ local function RefreshOnUpdate(this)
|
||||
for key, widget in pairs(AceConfigDialog.BlizOptions[appName]) do
|
||||
local user = widget:GetUserDataTable()
|
||||
if widget:IsVisible() then
|
||||
AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(user.basepath or emptyTbl))
|
||||
AceConfigDialog:Open(widget:GetUserData('appName'), widget, unpack(user.basepath or emptyTbl))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1767,7 +1766,7 @@ function AceConfigDialog:Open(appName, container, ...)
|
||||
tinsert(path, container)
|
||||
container = nil
|
||||
end
|
||||
for n = 1, select("#",...) do
|
||||
for n = 1, select('#',...) do
|
||||
tinsert(path, (select(n, ...)))
|
||||
end
|
||||
|
||||
@@ -1775,10 +1774,10 @@ function AceConfigDialog:Open(appName, container, ...)
|
||||
if container then
|
||||
f = container
|
||||
f:ReleaseChildren()
|
||||
f:SetUserData("appName", appName)
|
||||
f:SetUserData("iscustom", true)
|
||||
f:SetUserData('appName', appName)
|
||||
f:SetUserData('iscustom', true)
|
||||
if #path > 0 then
|
||||
f:SetUserData("basepath", copy(path))
|
||||
f:SetUserData('basepath', copy(path))
|
||||
end
|
||||
local status = AceConfigDialog:GetStatusTable(appName)
|
||||
if not status.width then
|
||||
@@ -1802,9 +1801,9 @@ function AceConfigDialog:Open(appName, container, ...)
|
||||
end
|
||||
f:ReleaseChildren()
|
||||
f:SetCallback("OnClose", FrameOnClose)
|
||||
f:SetUserData("appName", appName)
|
||||
f:SetUserData('appName', appName)
|
||||
if #path > 0 then
|
||||
f:SetUserData("basepath", copy(path))
|
||||
f:SetUserData('basepath', copy(path))
|
||||
end
|
||||
f:SetTitle(name or "")
|
||||
local status = AceConfigDialog:GetStatusTable(appName)
|
||||
@@ -1816,11 +1815,6 @@ function AceConfigDialog:Open(appName, container, ...)
|
||||
f:Show()
|
||||
end
|
||||
del(path)
|
||||
|
||||
if AceConfigDialog.frame.closeAll then
|
||||
-- close all is set, but thats not good, since we're just opening here, so force it
|
||||
AceConfigDialog.frame.closeAllOverride[appName] = true
|
||||
end
|
||||
end
|
||||
|
||||
-- convert pre-39 BlizOptions structure to the new format
|
||||
@@ -1828,7 +1822,7 @@ if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
|
||||
local old = AceConfigDialog.BlizOptions
|
||||
local new = {}
|
||||
for key, widget in pairs(old) do
|
||||
local appName = widget:GetUserData("appName")
|
||||
local appName = widget:GetUserData('appName')
|
||||
if not new[appName] then new[appName] = {} end
|
||||
new[appName][key] = widget
|
||||
end
|
||||
@@ -1838,12 +1832,12 @@ else
|
||||
end
|
||||
|
||||
local function FeedToBlizPanel(widget, event)
|
||||
local path = widget:GetUserData("path")
|
||||
AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(path or emptyTbl))
|
||||
local path = widget:GetUserData('path')
|
||||
AceConfigDialog:Open(widget:GetUserData('appName'), widget, unpack(path or emptyTbl))
|
||||
end
|
||||
|
||||
local function ClearBlizPanel(widget, event)
|
||||
local appName = widget:GetUserData("appName")
|
||||
local appName = widget:GetUserData('appName')
|
||||
AceConfigDialog.frame.closing[appName] = true
|
||||
AceConfigDialog.frame:SetScript("OnUpdate", RefreshOnUpdate)
|
||||
end
|
||||
@@ -1869,8 +1863,8 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
||||
local BlizOptions = AceConfigDialog.BlizOptions
|
||||
|
||||
local key = appName
|
||||
for n = 1, select("#", ...) do
|
||||
key = key.."\001"..select(n, ...)
|
||||
for n = 1, select('#', ...) do
|
||||
key = key..'\001'..select(n, ...)
|
||||
end
|
||||
|
||||
if not BlizOptions[appName] then
|
||||
@@ -1883,13 +1877,13 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
||||
group:SetName(name or appName, parent)
|
||||
|
||||
group:SetTitle(name or appName)
|
||||
group:SetUserData("appName", appName)
|
||||
if select("#", ...) > 0 then
|
||||
group:SetUserData('appName', appName)
|
||||
if select('#', ...) > 0 then
|
||||
local path = {}
|
||||
for n = 1, select("#",...) do
|
||||
for n = 1, select('#',...) do
|
||||
tinsert(path, (select(n, ...)))
|
||||
end
|
||||
group:SetUserData("path", path)
|
||||
group:SetUserData('path', path)
|
||||
end
|
||||
group:SetCallback("OnShow", FeedToBlizPanel)
|
||||
group:SetCallback("OnHide", ClearBlizPanel)
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
|
||||
-- @class file
|
||||
-- @name AceConfigRegistry-3.0
|
||||
-- @release $Id: AceConfigRegistry-3.0.lua 921 2010-05-09 15:49:14Z nevcairiel $
|
||||
local MAJOR, MINOR = "AceConfigRegistry-3.0", 12
|
||||
-- @release $Id: AceConfigRegistry-3.0.lua 890 2009-12-06 12:50:05Z nevcairiel $
|
||||
local MAJOR, MINOR = "AceConfigRegistry-3.0", 11
|
||||
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceConfigRegistry then return end
|
||||
@@ -134,9 +134,7 @@ local typedkeys={
|
||||
},
|
||||
range={
|
||||
min=optnumber,
|
||||
softMin=optnumber,
|
||||
max=optnumber,
|
||||
softMax=optnumber,
|
||||
step=optnumber,
|
||||
bigStep=optnumber,
|
||||
isPercent=optbool,
|
||||
|
||||
@@ -39,8 +39,8 @@
|
||||
-- end
|
||||
-- @class file
|
||||
-- @name AceDB-3.0.lua
|
||||
-- @release $Id: AceDB-3.0.lua 940 2010-06-19 08:01:47Z nevcairiel $
|
||||
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 21
|
||||
-- @release $Id: AceDB-3.0.lua 914 2010-03-08 12:09:22Z nevcairiel $
|
||||
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 20
|
||||
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
|
||||
|
||||
if not AceDB then return end -- No upgrade needed
|
||||
@@ -507,11 +507,11 @@ function DBObjectLib:DeleteProfile(name, silent)
|
||||
error("Cannot delete the active profile in an AceDBObject.", 2)
|
||||
end
|
||||
|
||||
if not rawget(self.profiles, name) and not silent then
|
||||
if not rawget(self.sv.profiles, name) and not silent then
|
||||
error("Cannot delete profile '" .. name .. "'. It does not exist.", 2)
|
||||
end
|
||||
|
||||
self.profiles[name] = nil
|
||||
self.sv.profiles[name] = nil
|
||||
|
||||
-- populate to child namespaces
|
||||
if self.children then
|
||||
@@ -537,7 +537,7 @@ function DBObjectLib:CopyProfile(name, silent)
|
||||
error("Cannot have the same source and destination profiles.", 2)
|
||||
end
|
||||
|
||||
if not rawget(self.profiles, name) and not silent then
|
||||
if not rawget(self.sv.profiles, name) and not silent then
|
||||
error("Cannot copy profile '" .. name .. "'. It does not exist.", 2)
|
||||
end
|
||||
|
||||
@@ -545,7 +545,7 @@ function DBObjectLib:CopyProfile(name, silent)
|
||||
DBObjectLib.ResetProfile(self, nil, true)
|
||||
|
||||
local profile = self.profile
|
||||
local source = self.profiles[name]
|
||||
local source = self.sv.profiles[name]
|
||||
|
||||
copyTable(source, profile)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
|
||||
-- @class file
|
||||
-- @name AceDBOptions-3.0
|
||||
-- @release $Id: AceDBOptions-3.0.lua 938 2010-06-13 07:21:38Z nevcairiel $
|
||||
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 12
|
||||
-- @release $Id: AceDBOptions-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
|
||||
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 11
|
||||
local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
|
||||
|
||||
if not AceDBOptions then return end -- No upgrade needed
|
||||
@@ -30,7 +30,7 @@ local L = {
|
||||
reset_desc = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over.",
|
||||
reset = "Reset Profile",
|
||||
reset_sub = "Reset the current profile to the default",
|
||||
choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already existing profiles.",
|
||||
choose_desc = "You can either create a new profile by entering a name in the editbox, or choose one of the already exisiting profiles.",
|
||||
new = "New",
|
||||
new_sub = "Create a new empty profile.",
|
||||
choose = "Existing Profiles",
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
--
|
||||
-- **Note**: When using AceGUI-3.0 directly, please do not modify the frames of the widgets directly,
|
||||
-- as any "unknown" change to the widgets will cause addons that get your widget out of the widget pool
|
||||
-- to misbehave. If you think some part of a widget should be modifiable, please open a ticket, and we"ll
|
||||
-- to misbehave. If you think some part of a widget should be modifiable, please open a ticket, and we'll
|
||||
-- implement a proper API to modify it.
|
||||
-- @usage
|
||||
-- local AceGUI = LibStub("AceGUI-3.0")
|
||||
@@ -24,8 +24,8 @@
|
||||
-- f:AddChild(btn)
|
||||
-- @class file
|
||||
-- @name AceGUI-3.0
|
||||
-- @release $Id: AceGUI-3.0.lua 924 2010-05-13 15:12:20Z nevcairiel $
|
||||
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 33
|
||||
-- @release $Id: AceGUI-3.0.lua 896 2009-12-06 16:29:49Z nevcairiel $
|
||||
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 30
|
||||
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
|
||||
|
||||
if not AceGUI then return end -- No upgrade needed
|
||||
@@ -98,7 +98,7 @@ Dispatchers[0] = function(func)
|
||||
end
|
||||
|
||||
local function safecall(func, ...)
|
||||
return Dispatchers[select("#", ...)](func, ...)
|
||||
return Dispatchers[select('#', ...)](func, ...)
|
||||
end
|
||||
|
||||
-- Recycling functions
|
||||
@@ -173,16 +173,16 @@ function AceGUI:Create(type)
|
||||
if WidgetRegistry[type] then
|
||||
local widget = newWidget(type)
|
||||
|
||||
if rawget(widget, "Acquire") then
|
||||
if rawget(widget,'Acquire') then
|
||||
widget.OnAcquire = widget.Acquire
|
||||
widget.Acquire = nil
|
||||
elseif rawget(widget, "Aquire") then
|
||||
elseif rawget(widget,'Aquire') then
|
||||
widget.OnAcquire = widget.Aquire
|
||||
widget.Aquire = nil
|
||||
end
|
||||
|
||||
if rawget(widget, "Release") then
|
||||
widget.OnRelease = rawget(widget, "Release")
|
||||
if rawget(widget,'Release') then
|
||||
widget.OnRelease = rawget(widget,'Release')
|
||||
widget.Release = nil
|
||||
end
|
||||
|
||||
@@ -191,8 +191,8 @@ function AceGUI:Create(type)
|
||||
else
|
||||
error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
|
||||
end
|
||||
-- Set the default Layout ("List")
|
||||
safecall(widget.SetLayout, widget, "List")
|
||||
-- Set the default Layout ('List')
|
||||
safecall(widget.SetLayout, widget, 'List')
|
||||
safecall(widget.ResumeLayout, widget)
|
||||
return widget
|
||||
end
|
||||
@@ -204,14 +204,14 @@ end
|
||||
-- If this widget is a Container-Widget, all of its Child-Widgets will be releases as well.
|
||||
-- @param widget The widget to release
|
||||
function AceGUI:Release(widget)
|
||||
safecall(widget.PauseLayout, widget)
|
||||
safecall( widget.PauseLayout, widget )
|
||||
widget:Fire("OnRelease")
|
||||
safecall(widget.ReleaseChildren, widget)
|
||||
safecall( widget.ReleaseChildren, widget )
|
||||
|
||||
if widget.OnRelease then
|
||||
widget:OnRelease()
|
||||
-- else
|
||||
-- error(("Widget type %s doesn't supply an OnRelease Function"):format(widget.type))
|
||||
else
|
||||
error(("Widget type %s doesn't supply an OnRelease Function"):format(type))
|
||||
end
|
||||
for k in pairs(widget.userdata) do
|
||||
widget.userdata[k] = nil
|
||||
@@ -267,6 +267,7 @@ end
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
OnAcquire() - Called when the object is acquired, should set everything to a default hidden state
|
||||
OnRelease() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
@@ -280,7 +281,6 @@ end
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
:OnRelease() - Called when the object is Released, should remove any additional anchors and clear any data
|
||||
:OnWidthSet(width) - Called when the width of the widget is changed
|
||||
:OnHeightSet(height) - Called when the height of the widget is changed
|
||||
Widgets should not use the OnSizeChanged events of thier frame or content members, use these methods instead
|
||||
@@ -294,6 +294,17 @@ end
|
||||
-- Widget Base Template --
|
||||
--------------------------
|
||||
do
|
||||
local function fixlevels(parent,...)
|
||||
local i = 1
|
||||
local child = select(i, ...)
|
||||
while child do
|
||||
child:SetFrameLevel(parent:GetFrameLevel()+1)
|
||||
fixlevels(child, child:GetChildren())
|
||||
i = i + 1
|
||||
child = select(i, ...)
|
||||
end
|
||||
end
|
||||
|
||||
local WidgetBase = AceGUI.WidgetBase
|
||||
|
||||
WidgetBase.SetParent = function(self, parent)
|
||||
@@ -301,6 +312,7 @@ do
|
||||
frame:SetParent(nil)
|
||||
frame:SetParent(parent.content)
|
||||
self.parent = parent
|
||||
--fixlevels(parent.frame,parent.frame:GetChildren())
|
||||
end
|
||||
|
||||
WidgetBase.SetCallback = function(self, name, func)
|
||||
@@ -433,7 +445,7 @@ do
|
||||
if self.LayoutPaused then
|
||||
return
|
||||
end
|
||||
safecall(self.LayoutFunc, self.content, self.children)
|
||||
safecall(self.LayoutFunc,self.content, self.children)
|
||||
end
|
||||
|
||||
--call this function to layout, makes sure layed out objects get a frame to get sizes etc
|
||||
@@ -512,7 +524,7 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
setmetatable(WidgetContainerBase, {__index=WidgetBase})
|
||||
setmetatable(WidgetContainerBase,{__index=WidgetBase})
|
||||
|
||||
--One of these function should be called on each Widget Instance as part of its creation process
|
||||
|
||||
@@ -525,11 +537,10 @@ do
|
||||
widget.base = WidgetContainerBase
|
||||
widget.content.obj = widget
|
||||
widget.frame.obj = widget
|
||||
widget.content:SetScript("OnSizeChanged", ContentResize)
|
||||
widget.frame:SetScript("OnSizeChanged", FrameResize)
|
||||
setmetatable(widget, {__index = WidgetContainerBase})
|
||||
widget.content:SetScript("OnSizeChanged",ContentResize)
|
||||
widget.frame:SetScript("OnSizeChanged",FrameResize)
|
||||
setmetatable(widget,{__index=WidgetContainerBase})
|
||||
widget:SetLayout("List")
|
||||
return widget
|
||||
end
|
||||
|
||||
--- Register a widget-class as a widget.
|
||||
@@ -539,9 +550,8 @@ do
|
||||
widget.events = {}
|
||||
widget.base = WidgetBase
|
||||
widget.frame.obj = widget
|
||||
widget.frame:SetScript("OnSizeChanged", FrameResize)
|
||||
setmetatable(widget, {__index = WidgetBase})
|
||||
return widget
|
||||
widget.frame:SetScript("OnSizeChanged",FrameResize)
|
||||
setmetatable(widget,{__index=WidgetBase})
|
||||
end
|
||||
end
|
||||
|
||||
@@ -601,18 +611,49 @@ function AceGUI:GetNextWidgetNum(type)
|
||||
return self.counts[type]
|
||||
end
|
||||
|
||||
--- Return the number of created widgets for this type.
|
||||
-- In contrast to GetNextWidgetNum, the number is not incremented.
|
||||
-- @param type The widget type
|
||||
function AceGUI:GetWidgetCount(type)
|
||||
return self.counts[type] or 0
|
||||
--[[ Widget Template
|
||||
|
||||
--------------------------
|
||||
-- Widget Name --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Type"
|
||||
|
||||
local function OnAcquire(self)
|
||||
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
--Container Support
|
||||
--local content = CreateFrame("Frame",nil,frame)
|
||||
--self.content = content
|
||||
|
||||
--AceGUI:RegisterAsContainer(self)
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor)
|
||||
end
|
||||
|
||||
--- Return the version of the currently registered widget type.
|
||||
-- @param type The widget type
|
||||
function AceGUI:GetWidgetVersion(type)
|
||||
return WidgetVersions[type]
|
||||
end
|
||||
|
||||
]]
|
||||
|
||||
-------------
|
||||
-- Layouts --
|
||||
@@ -622,11 +663,13 @@ end
|
||||
A Layout is a func that takes 2 parameters
|
||||
content - the frame that widgets will be placed inside
|
||||
children - a table containing the widgets to layout
|
||||
|
||||
]]
|
||||
|
||||
-- Very simple Layout, Children are stacked on top of each other down the left side
|
||||
AceGUI:RegisterLayout("List",
|
||||
function(content, children)
|
||||
|
||||
local height = 0
|
||||
local width = content.width or content:GetWidth() or 0
|
||||
for i = 1, #children do
|
||||
@@ -636,21 +679,25 @@ AceGUI:RegisterLayout("List",
|
||||
frame:ClearAllPoints()
|
||||
frame:Show()
|
||||
if i == 1 then
|
||||
frame:SetPoint("TOPLEFT", content)
|
||||
frame:SetPoint("TOPLEFT",content,"TOPLEFT",0,0)
|
||||
else
|
||||
frame:SetPoint("TOPLEFT", children[i-1].frame, "BOTTOMLEFT")
|
||||
frame:SetPoint("TOPLEFT",children[i-1].frame,"BOTTOMLEFT",0,0)
|
||||
end
|
||||
|
||||
if child.width == "fill" then
|
||||
child:SetWidth(width)
|
||||
frame:SetPoint("RIGHT", content)
|
||||
|
||||
frame:SetPoint("RIGHT",content,"RIGHT")
|
||||
if child.OnWidthSet then
|
||||
child:OnWidthSet(content.width or content:GetWidth())
|
||||
end
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
elseif child.width == "relative" then
|
||||
child:SetWidth(width * child.relWidth)
|
||||
|
||||
if child.OnWidthSet then
|
||||
child:OnWidthSet(content.width or content:GetWidth())
|
||||
end
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
@@ -658,8 +705,9 @@ AceGUI:RegisterLayout("List",
|
||||
|
||||
height = height + (frame.height or frame:GetHeight() or 0)
|
||||
end
|
||||
safecall(content.obj.LayoutFinished, content.obj, nil, height)
|
||||
end)
|
||||
safecall( content.obj.LayoutFinished, content.obj, nil, height )
|
||||
end
|
||||
)
|
||||
|
||||
-- A single control fills the whole content area
|
||||
AceGUI:RegisterLayout("Fill",
|
||||
@@ -669,9 +717,10 @@ AceGUI:RegisterLayout("Fill",
|
||||
children[1]:SetHeight(content:GetHeight() or 0)
|
||||
children[1].frame:SetAllPoints(content)
|
||||
children[1].frame:Show()
|
||||
safecall(content.obj.LayoutFinished, content.obj, nil, children[1].frame:GetHeight())
|
||||
safecall( content.obj.LayoutFinished, content.obj, nil, children[1].frame:GetHeight() )
|
||||
end
|
||||
end)
|
||||
end
|
||||
)
|
||||
|
||||
AceGUI:RegisterLayout("Flow",
|
||||
function(content, children)
|
||||
@@ -717,7 +766,7 @@ AceGUI:RegisterLayout("Flow",
|
||||
frame:ClearAllPoints()
|
||||
if i == 1 then
|
||||
-- anchor the first control to the top left
|
||||
frame:SetPoint("TOPLEFT", content)
|
||||
frame:SetPoint("TOPLEFT",content,"TOPLEFT",0,0)
|
||||
rowheight = frameheight
|
||||
rowoffset = frameoffset
|
||||
rowstart = frame
|
||||
@@ -736,7 +785,7 @@ AceGUI:RegisterLayout("Flow",
|
||||
break
|
||||
end
|
||||
--anchor the previous row, we will now know its height and offset
|
||||
rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
|
||||
rowstart:SetPoint("TOPLEFT",content,"TOPLEFT",0,-(height+(rowoffset-rowstartoffset)+3))
|
||||
height = height + rowheight + 3
|
||||
--save this as the rowstart so we can anchor it after the row is complete and we have the max height and offset of controls in it
|
||||
rowstart = frame
|
||||
@@ -754,21 +803,25 @@ AceGUI:RegisterLayout("Flow",
|
||||
|
||||
--offset is always the larger of the two offsets
|
||||
rowoffset = math_max(rowoffset, frameoffset)
|
||||
rowheight = math_max(rowheight, rowoffset + (frameheight / 2))
|
||||
|
||||
frame:SetPoint("TOPLEFT", children[i-1].frame, "TOPRIGHT", 0, frameoffset - lastframeoffset)
|
||||
rowheight = math_max(rowheight,rowoffset+(frameheight/2))
|
||||
--print("type:", child.type, "offset:",frameoffset-lastframeoffset)
|
||||
frame:SetPoint("TOPLEFT",children[i-1].frame,"TOPRIGHT",0,frameoffset-lastframeoffset)
|
||||
usedwidth = framewidth + usedwidth
|
||||
end
|
||||
end
|
||||
|
||||
if child.width == "fill" then
|
||||
child:SetWidth(width)
|
||||
frame:SetPoint("RIGHT", content)
|
||||
frame:SetPoint("RIGHT",content,"RIGHT",0,0)
|
||||
|
||||
usedwidth = 0
|
||||
rowstart = frame
|
||||
rowstartoffset = frameoffset
|
||||
|
||||
if child.OnWidthSet then
|
||||
child:OnWidthSet(width)
|
||||
end
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
@@ -778,28 +831,33 @@ AceGUI:RegisterLayout("Flow",
|
||||
elseif child.width == "relative" then
|
||||
child:SetWidth(width * child.relWidth)
|
||||
|
||||
if child.OnWidthSet then
|
||||
child:OnWidthSet(width)
|
||||
end
|
||||
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
elseif oversize then
|
||||
if width > 1 then
|
||||
frame:SetPoint("RIGHT", content)
|
||||
frame:SetPoint("RIGHT",content,"RIGHT",0,0)
|
||||
end
|
||||
end
|
||||
|
||||
if child.height == "fill" then
|
||||
frame:SetPoint("BOTTOM", content)
|
||||
frame:SetPoint("BOTTOM",content,"BOTTOM")
|
||||
isfullheight = true
|
||||
end
|
||||
end
|
||||
|
||||
--anchor the last row, if its full height needs a special case since its height has just been changed by the anchor
|
||||
if isfullheight then
|
||||
rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -height)
|
||||
rowstart:SetPoint("TOPLEFT",content,"TOPLEFT",0,-height)
|
||||
elseif rowstart then
|
||||
rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
|
||||
rowstart:SetPoint("TOPLEFT",content,"TOPLEFT",0,-(height+(rowoffset-rowstartoffset)+3))
|
||||
end
|
||||
|
||||
height = height + rowheight + 3
|
||||
safecall(content.obj.LayoutFinished, content.obj, nil, height)
|
||||
end)
|
||||
safecall( content.obj.LayoutFinished, content.obj, nil, height )
|
||||
end
|
||||
)
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
<Script file="AceGUI-3.0.lua"/>
|
||||
<!-- Container -->
|
||||
<Script file="widgets\AceGUIContainer-BlizOptionsGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-DropDownGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-Frame.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-InlineGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-ScrollFrame.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-SimpleGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-TabGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-TreeGroup.lua"/>
|
||||
<Script file="widgets\AceGUIContainer-Window.lua"/>
|
||||
<!-- Widgets -->
|
||||
<Script file="widgets\AceGUIWidget-Button.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-CheckBox.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-ColorPicker.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-DropDownGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-DropDown.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-EditBox.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Frame.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Window.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Heading.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Icon.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-InlineGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-ScrollFrame.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-SimpleGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Slider.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-TabGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-TreeGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Label.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-MultiLineEditBox.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Slider.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-BlizOptionsGroup.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Icon.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,153 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
Acquire() - Called when the object is aquired, should set everything to a default hidden state
|
||||
Release() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
type - the type of the object, same as the name given to :RegisterWidget()
|
||||
|
||||
Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
|
||||
It will be cleared automatically when a widget is released
|
||||
Placing values directly into a widget object should be avoided
|
||||
|
||||
If the Widget can act as a container for other Widgets the following
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
|
||||
|
||||
]]
|
||||
|
||||
----------------------------------
|
||||
-- Blizzard Options Group --
|
||||
----------------------------------
|
||||
--[[
|
||||
Group Designed to be added to the bliz interface options panel
|
||||
]]
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
do
|
||||
local Type = "BlizOptionsGroup"
|
||||
local Version = 10
|
||||
|
||||
local function OnAcquire(self)
|
||||
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self:SetName()
|
||||
end
|
||||
|
||||
local function okay(this)
|
||||
this.obj:Fire("okay")
|
||||
end
|
||||
|
||||
local function cancel(this)
|
||||
this.obj:Fire("cancel")
|
||||
end
|
||||
|
||||
local function defaults(this)
|
||||
this.obj:Fire("defaults")
|
||||
end
|
||||
|
||||
local function SetName(self, name, parent)
|
||||
self.frame.name = name
|
||||
self.frame.parent = parent
|
||||
end
|
||||
|
||||
local function OnShow(this)
|
||||
this.obj:Fire("OnShow")
|
||||
end
|
||||
|
||||
local function OnHide(this)
|
||||
this.obj:Fire("OnHide")
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 63
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 26
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function SetTitle(self, title)
|
||||
local content = self.content
|
||||
content:ClearAllPoints()
|
||||
if not title or title == "" then
|
||||
content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",10,-10)
|
||||
self.label:SetText("")
|
||||
else
|
||||
content:SetPoint("TOPLEFT",self.frame,"TOPLEFT",10,-40)
|
||||
self.label:SetText(title)
|
||||
end
|
||||
content:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",-10,10)
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame")
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.frame = frame
|
||||
self.SetName = SetName
|
||||
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
self.SetTitle = SetTitle
|
||||
|
||||
frame.obj = self
|
||||
frame.okay = okay
|
||||
frame.cancel = cancel
|
||||
frame.defaults = defaults
|
||||
|
||||
frame:Hide()
|
||||
frame:SetScript("OnHide",OnHide)
|
||||
frame:SetScript("OnShow",OnShow)
|
||||
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalLarge")
|
||||
self.label = label
|
||||
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 10, -15)
|
||||
label:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", 10, -45)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetJustifyV("TOP")
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,frame)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",frame,"TOPLEFT",15,-10)
|
||||
content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-10,10)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,54 +1,48 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Button Widget
|
||||
Graphical Button.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Button", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- WoW APIs
|
||||
local _G = _G
|
||||
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
|
||||
local PlaySound = PlaySound
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Button_OnClick(frame, ...)
|
||||
PlaySound("igMainMenuOption")
|
||||
frame.obj:Fire("OnClick", ...)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
--------------------------
|
||||
-- Button --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Button"
|
||||
local Version = 13
|
||||
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
local function OnAcquire(self)
|
||||
-- restore default values
|
||||
self:SetHeight(24)
|
||||
self:SetWidth(200)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self:SetDisabled(false)
|
||||
self:SetText()
|
||||
end,
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
local function Button_OnClick(this, ...)
|
||||
PlaySound("igMainMenuOption")
|
||||
this.obj:Fire("OnClick", ...)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
self.text:SetText(text)
|
||||
end,
|
||||
local function Button_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function Button_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function SetText(self, text)
|
||||
self.text:SetText(text or "")
|
||||
end
|
||||
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
@@ -56,37 +50,57 @@ local methods = {
|
||||
self.frame:Enable()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate2")
|
||||
frame:Hide()
|
||||
local function Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local name = "AceGUI30Button"..num
|
||||
local frame = CreateFrame("Button",name,UIParent,"UIPanelButtonTemplate2")
|
||||
local self = {}
|
||||
self.num = num
|
||||
self.type = Type
|
||||
self.frame = frame
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnClick", Button_OnClick)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
local left = _G[name .. "Left"]
|
||||
local right = _G[name .. "Right"]
|
||||
local middle = _G[name .. "Middle"]
|
||||
|
||||
left:SetPoint("TOP", frame, "TOP", 0, 0)
|
||||
left:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
|
||||
|
||||
right:SetPoint("TOP", frame, "TOP", 0, 0)
|
||||
right:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
|
||||
|
||||
middle:SetPoint("TOP", frame, "TOP", 0, 0)
|
||||
middle:SetPoint("BOTTOM", frame, "BOTTOM", 0, 0)
|
||||
|
||||
local text = frame:GetFontString()
|
||||
self.text = text
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("TOPLEFT", 15, -1)
|
||||
text:SetPoint("BOTTOMRIGHT", -15, 1)
|
||||
text:SetPoint("TOPLEFT",frame,"TOPLEFT", 15, -1)
|
||||
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT", -15, 1)
|
||||
text:SetJustifyV("MIDDLE")
|
||||
|
||||
local widget = {
|
||||
text = text,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
frame:SetScript("OnClick",Button_OnClick)
|
||||
frame:SetScript("OnEnter",Button_OnEnter)
|
||||
frame:SetScript("OnLeave",Button_OnLeave)
|
||||
|
||||
self.SetText = SetText
|
||||
self.SetDisabled = SetDisabled
|
||||
|
||||
frame:EnableMouse(true)
|
||||
|
||||
frame:SetHeight(24)
|
||||
frame:SetWidth(200)
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Checkbox Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "CheckBox", 21
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs = select, pairs
|
||||
local select = select
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
@@ -16,46 +11,52 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: SetDesaturation, GameFontHighlight
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function AlignImage(self)
|
||||
local img = self.image:GetTexture()
|
||||
self.text:ClearAllPoints()
|
||||
if not img then
|
||||
self.text:SetPoint("LEFT", self.checkbg, "RIGHT")
|
||||
self.text:SetPoint("RIGHT")
|
||||
else
|
||||
self.text:SetPoint("LEFT", self.image,"RIGHT", 1, 0)
|
||||
self.text:SetPoint("RIGHT")
|
||||
--------------------------
|
||||
-- Check Box --
|
||||
--------------------------
|
||||
--[[
|
||||
Events :
|
||||
OnValueChanged
|
||||
|
||||
]]
|
||||
do
|
||||
local Type = "CheckBox"
|
||||
local Version = 16
|
||||
|
||||
local function OnAcquire(self)
|
||||
self:SetValue(false)
|
||||
self.tristate = nil
|
||||
self:SetHeight(24)
|
||||
self:SetWidth(200)
|
||||
self:SetImage()
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function CheckBox_OnMouseDown(frame)
|
||||
local self = frame.obj
|
||||
if not self.disabled then
|
||||
if self.image:GetTexture() then
|
||||
self.text:SetPoint("LEFT", self.image,"RIGHT", 2, -1)
|
||||
else
|
||||
self.text:SetPoint("LEFT", self.checkbg, "RIGHT", 1, -1)
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.check:Hide()
|
||||
self.highlight:Hide()
|
||||
self.down = nil
|
||||
self.checked = nil
|
||||
self:SetType()
|
||||
self:SetDisabled(false)
|
||||
self:SetDescription(nil)
|
||||
end
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function CheckBox_OnMouseUp(frame)
|
||||
local self = frame.obj
|
||||
local function CheckBox_OnEnter(this)
|
||||
local self = this.obj
|
||||
self.highlight:Show()
|
||||
self:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function CheckBox_OnLeave(this)
|
||||
local self = this.obj
|
||||
self.highlight:Hide()
|
||||
self:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function CheckBox_OnMouseUp(this)
|
||||
local self = this.obj
|
||||
if not self.disabled then
|
||||
self:ToggleChecked()
|
||||
|
||||
@@ -65,55 +66,39 @@ local function CheckBox_OnMouseUp(frame)
|
||||
PlaySound("igMainMenuOptionCheckBoxOff")
|
||||
end
|
||||
|
||||
self:Fire("OnValueChanged", self.checked)
|
||||
AlignImage(self)
|
||||
self:Fire("OnValueChanged",self.checked)
|
||||
self.text:SetPoint("LEFT",self.check,"RIGHT",0,0)
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetType()
|
||||
self:SetValue(false)
|
||||
self:SetTriState(nil)
|
||||
-- height is calculated from the width and required space for the description
|
||||
self:SetWidth(200)
|
||||
self:SetImage()
|
||||
self:SetDisabled(nil)
|
||||
self:SetDescription(nil)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
if self.desc then
|
||||
self.desc:SetWidth(width - 30)
|
||||
if self.desc:GetText() and self.desc:GetText() ~= "" then
|
||||
self:SetHeight(28 + self.desc:GetHeight())
|
||||
self.down = nil
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function CheckBox_OnMouseDown(this)
|
||||
local self = this.obj
|
||||
if not self.disabled then
|
||||
self.text:SetPoint("LEFT",self.check,"RIGHT",1,-1)
|
||||
self.down = true
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function SetDisabled(self,disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
self.text:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.text:SetTextColor(0.5,0.5,0.5)
|
||||
SetDesaturation(self.check, true)
|
||||
else
|
||||
self.frame:Enable()
|
||||
self.text:SetTextColor(1, 1, 1)
|
||||
self.text:SetTextColor(1,1,1)
|
||||
if self.tristate and self.checked == nil then
|
||||
SetDesaturation(self.check, true)
|
||||
else
|
||||
SetDesaturation(self.check, false)
|
||||
end
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetValue"] = function(self,value)
|
||||
local function SetValue(self,value)
|
||||
local check = self.check
|
||||
self.checked = value
|
||||
if value then
|
||||
@@ -129,48 +114,51 @@ local methods = {
|
||||
self.check:Hide()
|
||||
end
|
||||
end
|
||||
self:SetDisabled(self.disabled)
|
||||
end,
|
||||
SetDisabled(self, self.disabled)
|
||||
end
|
||||
|
||||
["GetValue"] = function(self)
|
||||
return self.checked
|
||||
end,
|
||||
|
||||
["SetTriState"] = function(self, enabled)
|
||||
local function SetTriState(self, enabled)
|
||||
self.tristate = enabled
|
||||
self:SetValue(self:GetValue())
|
||||
end,
|
||||
end
|
||||
|
||||
["SetType"] = function(self, type)
|
||||
local function GetValue(self)
|
||||
return self.checked
|
||||
end
|
||||
|
||||
local function SetType(self, type)
|
||||
local checkbg = self.checkbg
|
||||
local check = self.check
|
||||
local highlight = self.highlight
|
||||
|
||||
local size
|
||||
if type == "radio" then
|
||||
size = 16
|
||||
checkbg:SetHeight(16)
|
||||
checkbg:SetWidth(16)
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-RadioButton")
|
||||
checkbg:SetTexCoord(0, 0.25, 0, 1)
|
||||
checkbg:SetTexCoord(0,0.25,0,1)
|
||||
check:SetHeight(16)
|
||||
check:SetWidth(16)
|
||||
check:SetTexture("Interface\\Buttons\\UI-RadioButton")
|
||||
check:SetTexCoord(0.25, 0.5, 0, 1)
|
||||
check:SetTexCoord(0.25,0.5,0,1)
|
||||
check:SetBlendMode("ADD")
|
||||
highlight:SetTexture("Interface\\Buttons\\UI-RadioButton")
|
||||
highlight:SetTexCoord(0.5, 0.75, 0, 1)
|
||||
highlight:SetTexCoord(0.5,0.75,0,1)
|
||||
else
|
||||
size = 24
|
||||
checkbg:SetHeight(24)
|
||||
checkbg:SetWidth(24)
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
|
||||
checkbg:SetTexCoord(0, 1, 0, 1)
|
||||
checkbg:SetTexCoord(0,1,0,1)
|
||||
check:SetHeight(24)
|
||||
check:SetWidth(24)
|
||||
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
|
||||
check:SetTexCoord(0, 1, 0, 1)
|
||||
check:SetTexCoord(0,1,0,1)
|
||||
check:SetBlendMode("BLEND")
|
||||
highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
|
||||
highlight:SetTexCoord(0, 1, 0, 1)
|
||||
highlight:SetTexCoord(0,1,0,1)
|
||||
end
|
||||
end
|
||||
checkbg:SetHeight(size)
|
||||
checkbg:SetWidth(size)
|
||||
end,
|
||||
|
||||
["ToggleChecked"] = function(self)
|
||||
local function ToggleChecked(self)
|
||||
local value = self:GetValue()
|
||||
if self.tristate then
|
||||
--cycle in true, nil, false order
|
||||
@@ -184,18 +172,18 @@ local methods = {
|
||||
else
|
||||
self:SetValue(not self:GetValue())
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetLabel"] = function(self, label)
|
||||
local function SetLabel(self, label)
|
||||
self.text:SetText(label)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetDescription"] = function(self, desc)
|
||||
local function SetDescription(self, desc)
|
||||
if desc then
|
||||
if not self.desc then
|
||||
local desc = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
|
||||
desc:ClearAllPoints()
|
||||
desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
|
||||
desc:SetPoint("TOPLEFT", self.check, "TOPRIGHT", 5, -21)
|
||||
desc:SetWidth(self.frame.width - 30)
|
||||
desc:SetJustifyH("LEFT")
|
||||
desc:SetJustifyV("TOP")
|
||||
@@ -210,80 +198,112 @@ local methods = {
|
||||
self.desc:SetText("")
|
||||
self.desc:Hide()
|
||||
end
|
||||
--self.text:SetFontObject(GameFontHighlight)
|
||||
self.text:SetFontObject(GameFontHighlight)
|
||||
self:SetHeight(24)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetImage"] = function(self, path, ...)
|
||||
local function SetImage(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = select("#", ...)
|
||||
local n = select('#', ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
AlignImage(self)
|
||||
self:AlignImage()
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
local function AlignImage(self)
|
||||
local img = self.image:GetTexture()
|
||||
self.text:ClearAllPoints()
|
||||
if not img then
|
||||
self.text:SetPoint("LEFT", self.check, "RIGHT", 0, 0)
|
||||
self.text:SetPoint("RIGHT", self.frame, "RIGHT", 0, 0)
|
||||
else
|
||||
self.text:SetPoint("LEFT", self.image,"RIGHT", 1, 0)
|
||||
self.text:SetPoint("RIGHT", self.frame,"RIGHT", 0, 0)
|
||||
end
|
||||
end
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnMouseDown", CheckBox_OnMouseDown)
|
||||
frame:SetScript("OnMouseUp", CheckBox_OnMouseUp)
|
||||
local function OnWidthSet(self, width)
|
||||
if self.desc and self.desc:GetText() ~= "" and self.desc:GetText() ~= nil then
|
||||
self.desc:SetWidth(width - 30)
|
||||
self:SetHeight(28 + self.desc:GetHeight())
|
||||
end
|
||||
end
|
||||
|
||||
local checkbg = frame:CreateTexture(nil, "ARTWORK")
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.SetValue = SetValue
|
||||
self.GetValue = GetValue
|
||||
self.SetDisabled = SetDisabled
|
||||
self.SetType = SetType
|
||||
self.ToggleChecked = ToggleChecked
|
||||
self.SetLabel = SetLabel
|
||||
self.SetTriState = SetTriState
|
||||
self.SetDescription = SetDescription
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.SetImage = SetImage
|
||||
self.AlignImage = AlignImage
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
|
||||
self.text = text
|
||||
|
||||
frame:SetScript("OnEnter",CheckBox_OnEnter)
|
||||
frame:SetScript("OnLeave",CheckBox_OnLeave)
|
||||
frame:SetScript("OnMouseUp",CheckBox_OnMouseUp)
|
||||
frame:SetScript("OnMouseDown",CheckBox_OnMouseDown)
|
||||
frame:EnableMouse()
|
||||
local checkbg = frame:CreateTexture(nil,"ARTWORK")
|
||||
self.checkbg = checkbg
|
||||
checkbg:SetWidth(24)
|
||||
checkbg:SetHeight(24)
|
||||
checkbg:SetPoint("TOPLEFT")
|
||||
checkbg:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
|
||||
|
||||
local check = frame:CreateTexture(nil, "OVERLAY")
|
||||
check:SetAllPoints(checkbg)
|
||||
local check = frame:CreateTexture(nil,"OVERLAY")
|
||||
self.check = check
|
||||
check:SetWidth(24)
|
||||
check:SetHeight(24)
|
||||
check:SetPoint("CENTER",checkbg,"CENTER",0,0)
|
||||
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
|
||||
|
||||
local text = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
|
||||
text:SetJustifyH("LEFT")
|
||||
text:SetHeight(18)
|
||||
text:SetPoint("LEFT", checkbg, "RIGHT")
|
||||
text:SetPoint("RIGHT")
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
local highlight = frame:CreateTexture(nil, "OVERLAY")
|
||||
self.highlight = highlight
|
||||
highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:SetAllPoints(checkbg)
|
||||
highlight:Hide()
|
||||
|
||||
local image = frame:CreateTexture(nil, "OVERLAY")
|
||||
self.image = image
|
||||
image:SetHeight(16)
|
||||
image:SetWidth(16)
|
||||
image:SetPoint("LEFT", checkbg, "RIGHT", 1, 0)
|
||||
image:SetPoint("LEFT", check, "RIGHT", 1, 0)
|
||||
|
||||
local widget = {
|
||||
checkbg = checkbg,
|
||||
check = check,
|
||||
text = text,
|
||||
highlight = highlight,
|
||||
image = image,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
text:SetJustifyH("LEFT")
|
||||
frame:SetHeight(24)
|
||||
frame:SetWidth(200)
|
||||
text:SetHeight(18)
|
||||
text:SetPoint("LEFT",check,"RIGHT",0,0)
|
||||
text:SetPoint("RIGHT",frame,"RIGHT",0,0)
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -1,12 +1,4 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
ColorPicker Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "ColorPicker", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -15,56 +7,80 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: ShowUIPanel, HideUIPanel, ColorPickerFrame, OpacitySliderFrame
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function ColorCallback(self, r, g, b, a, isAlpha)
|
||||
--------------------------
|
||||
-- ColorPicker --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "ColorPicker"
|
||||
local Version = 11
|
||||
|
||||
local function OnAcquire(self)
|
||||
self.HasAlpha = false
|
||||
self:SetColor(0,0,0,1)
|
||||
self:SetHeight(24)
|
||||
self:SetWidth(200)
|
||||
end
|
||||
|
||||
local function SetLabel(self, text)
|
||||
self.text:SetText(text)
|
||||
end
|
||||
|
||||
local function SetColor(self,r,g,b,a)
|
||||
self.r = r
|
||||
self.g = g
|
||||
self.b = b
|
||||
self.a = a or 1
|
||||
self.colorSwatch:SetVertexColor(r,g,b,a)
|
||||
end
|
||||
|
||||
local function Control_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function SetHasAlpha(self, HasAlpha)
|
||||
self.HasAlpha = HasAlpha
|
||||
end
|
||||
|
||||
local function ColorCallback(self,r,g,b,a,isAlpha)
|
||||
if not self.HasAlpha then
|
||||
a = 1
|
||||
end
|
||||
self:SetColor(r, g, b, a)
|
||||
self:SetColor(r,g,b,a)
|
||||
if ColorPickerFrame:IsVisible() then
|
||||
--colorpicker is still open
|
||||
self:Fire("OnValueChanged", r, g, b, a)
|
||||
|
||||
self:Fire("OnValueChanged",r,g,b,a)
|
||||
else
|
||||
--colorpicker is closed, color callback is first, ignore it,
|
||||
--alpha callback is the final call after it closes so confirm now
|
||||
if isAlpha then
|
||||
self:Fire("OnValueConfirmed", r, g, b, a)
|
||||
self:Fire("OnValueConfirmed",r,g,b,a)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function ColorSwatch_OnClick(frame)
|
||||
local function ColorSwatch_OnClick(this)
|
||||
HideUIPanel(ColorPickerFrame)
|
||||
local self = frame.obj
|
||||
local self = this.obj
|
||||
if not self.disabled then
|
||||
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
ColorPickerFrame.func = function()
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
local r,g,b = ColorPickerFrame:GetColorRGB()
|
||||
local a = 1 - OpacitySliderFrame:GetValue()
|
||||
ColorCallback(self, r, g, b, a)
|
||||
ColorCallback(self,r,g,b,a)
|
||||
end
|
||||
|
||||
ColorPickerFrame.hasOpacity = self.HasAlpha
|
||||
ColorPickerFrame.opacityFunc = function()
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
local r,g,b = ColorPickerFrame:GetColorRGB()
|
||||
local a = 1 - OpacitySliderFrame:GetValue()
|
||||
ColorCallback(self, r, g, b, a, true)
|
||||
ColorCallback(self,r,g,b,a,true)
|
||||
end
|
||||
|
||||
local r, g, b, a = self.r, self.g, self.b, self.a
|
||||
if self.HasAlpha then
|
||||
ColorPickerFrame.opacity = 1 - (a or 0)
|
||||
@@ -72,115 +88,94 @@ local function ColorSwatch_OnClick(frame)
|
||||
ColorPickerFrame:SetColorRGB(r, g, b)
|
||||
|
||||
ColorPickerFrame.cancelFunc = function()
|
||||
ColorCallback(self, r, g, b, a, true)
|
||||
ColorCallback(self,r,g,b,a,true)
|
||||
end
|
||||
|
||||
ShowUIPanel(ColorPickerFrame)
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetHeight(24)
|
||||
self:SetWidth(200)
|
||||
self:SetHasAlpha(false)
|
||||
self:SetColor(0, 0, 0, 1)
|
||||
self:SetDisabled(nil)
|
||||
self:SetLabel(nil)
|
||||
end,
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
self.text:SetText(text)
|
||||
end,
|
||||
|
||||
["SetColor"] = function(self, r, g, b, a)
|
||||
self.r = r
|
||||
self.g = g
|
||||
self.b = b
|
||||
self.a = a or 1
|
||||
self.colorSwatch:SetVertexColor(r, g, b, a)
|
||||
end,
|
||||
|
||||
["SetHasAlpha"] = function(self, HasAlpha)
|
||||
self.HasAlpha = HasAlpha
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if self.disabled then
|
||||
self.frame:Disable()
|
||||
self.text:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.text:SetTextColor(0.5,0.5,0.5)
|
||||
else
|
||||
self.frame:Enable()
|
||||
self.text:SetTextColor(1, 1, 1)
|
||||
self.text:SetTextColor(1,1,1)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.SetLabel = SetLabel
|
||||
self.SetColor = SetColor
|
||||
self.SetDisabled = SetDisabled
|
||||
self.SetHasAlpha = SetHasAlpha
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
|
||||
self.text = text
|
||||
text:SetJustifyH("LEFT")
|
||||
text:SetTextColor(1,1,1)
|
||||
frame:SetHeight(24)
|
||||
frame:SetWidth(200)
|
||||
text:SetHeight(24)
|
||||
frame:SetScript("OnClick", ColorSwatch_OnClick)
|
||||
frame:SetScript("OnEnter",Control_OnEnter)
|
||||
frame:SetScript("OnLeave",Control_OnLeave)
|
||||
|
||||
local colorSwatch = frame:CreateTexture(nil, "OVERLAY")
|
||||
self.colorSwatch = colorSwatch
|
||||
colorSwatch:SetWidth(19)
|
||||
colorSwatch:SetHeight(19)
|
||||
colorSwatch:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch")
|
||||
colorSwatch:SetPoint("LEFT")
|
||||
|
||||
local texture = frame:CreateTexture(nil, "BACKGROUND")
|
||||
colorSwatch.texture = texture
|
||||
texture:SetWidth(16)
|
||||
texture:SetHeight(16)
|
||||
texture:SetTexture(1, 1, 1)
|
||||
texture:SetPoint("CENTER", colorSwatch)
|
||||
texture:SetTexture(1,1,1)
|
||||
texture:Show()
|
||||
|
||||
local checkers = frame:CreateTexture(nil, "BACKGROUND")
|
||||
colorSwatch.checkers = checkers
|
||||
checkers:SetTexture("Tileset\\Generic\\Checkers")
|
||||
checkers:SetDesaturated(true)
|
||||
checkers:SetVertexColor(1,1,1,0.75)
|
||||
checkers:SetTexCoord(.25,0,0.5,.25)
|
||||
checkers:SetWidth(14)
|
||||
checkers:SetHeight(14)
|
||||
checkers:SetTexture("Tileset\\Generic\\Checkers")
|
||||
checkers:SetTexCoord(.25, 0, 0.5, .25)
|
||||
checkers:SetDesaturated(true)
|
||||
checkers:SetVertexColor(1, 1, 1, 0.75)
|
||||
checkers:SetPoint("CENTER", colorSwatch)
|
||||
checkers:Show()
|
||||
|
||||
local text = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
|
||||
text:SetHeight(24)
|
||||
text:SetJustifyH("LEFT")
|
||||
text:SetTextColor(1, 1, 1)
|
||||
text:SetPoint("LEFT", colorSwatch, "RIGHT", 2, 0)
|
||||
text:SetPoint("RIGHT")
|
||||
local highlight = frame:CreateTexture(nil, "BACKGROUND")
|
||||
self.highlight = highlight
|
||||
highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:SetAllPoints(frame)
|
||||
highlight:Hide()
|
||||
|
||||
--local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
--highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
|
||||
--highlight:SetBlendMode("ADD")
|
||||
--highlight:SetAllPoints(frame)
|
||||
texture:SetPoint("CENTER", colorSwatch, "CENTER")
|
||||
checkers:SetPoint("CENTER", colorSwatch, "CENTER")
|
||||
colorSwatch:SetPoint("LEFT", frame, "LEFT", 0, 0)
|
||||
text:SetPoint("LEFT",colorSwatch,"RIGHT",2,0)
|
||||
text:SetPoint("RIGHT",frame,"RIGHT")
|
||||
|
||||
local widget = {
|
||||
colorSwatch = colorSwatch,
|
||||
text = text,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -0,0 +1,178 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local assert, pairs, type = assert, pairs, type
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
--[[
|
||||
Selection Group controls all have an interface to select a group for thier contents
|
||||
None of them will auto size to thier contents, and should usually be used with a scrollframe
|
||||
unless you know that the controls will fit inside
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Dropdown Group --
|
||||
--------------------------
|
||||
--[[
|
||||
Events :
|
||||
OnGroupSelected
|
||||
|
||||
]]
|
||||
do
|
||||
local Type = "DropdownGroup"
|
||||
local Version = 13
|
||||
|
||||
local function OnAcquire(self)
|
||||
self.dropdown:SetText("")
|
||||
self:SetDropdownWidth(200)
|
||||
self:SetTitle("")
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.dropdown.list = nil
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
local PaneBackdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local function SetTitle(self,title)
|
||||
self.titletext:SetText(title)
|
||||
self.dropdown.frame:ClearAllPoints()
|
||||
if title and title ~= "" then
|
||||
self.dropdown.frame:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -2, 0)
|
||||
else
|
||||
self.dropdown.frame:SetPoint("TOPLEFT", self.frame, "TOPLEFT", -1, 0)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function SelectedGroup(self,event,value)
|
||||
local group = self.parentgroup
|
||||
local status = group.status or group.localstatus
|
||||
status.selected = value
|
||||
self.parentgroup:Fire("OnGroupSelected", value)
|
||||
end
|
||||
|
||||
local function SetGroupList(self,list)
|
||||
self.dropdown:SetList(list)
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
end
|
||||
|
||||
local function SetGroup(self,group)
|
||||
self.dropdown:SetValue(group)
|
||||
local status = self.status or self.localstatus
|
||||
status.selected = group
|
||||
self:Fire("OnGroupSelected", group)
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 26
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 63
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
self:SetHeight((height or 0) + 63)
|
||||
end
|
||||
|
||||
local function SetDropdownWidth(self, width)
|
||||
self.dropdown:SetWidth(width)
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame")
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.SetTitle = SetTitle
|
||||
self.SetGroupList = SetGroupList
|
||||
self.SetGroup = SetGroup
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.SetDropdownWidth = SetDropdownWidth
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
self.LayoutFinished = LayoutFinished
|
||||
|
||||
self.localstatus = {}
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT", frame, "TOPLEFT", 4, -5)
|
||||
titletext:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -4, -5)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
self.titletext = titletext
|
||||
|
||||
local dropdown = AceGUI:Create("Dropdown")
|
||||
self.dropdown = dropdown
|
||||
dropdown.frame:SetParent(frame)
|
||||
dropdown.frame:SetFrameLevel(dropdown.frame:GetFrameLevel() + 2)
|
||||
dropdown.parentgroup = self
|
||||
dropdown:SetCallback("OnValueChanged",SelectedGroup)
|
||||
dropdown.frame:SetPoint("TOPLEFT",frame,"TOPLEFT", -1, 0)
|
||||
dropdown.frame:Show()
|
||||
dropdown:SetLabel("")
|
||||
|
||||
local border = CreateFrame("Frame",nil,frame)
|
||||
self.border = border
|
||||
border:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-26)
|
||||
border:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,3)
|
||||
|
||||
border:SetBackdrop(PaneBackdrop)
|
||||
border:SetBackdropColor(0.1,0.1,0.1,0.5)
|
||||
border:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,border)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",border,"TOPLEFT",10,-10)
|
||||
content:SetPoint("BOTTOMRIGHT",border,"BOTTOMRIGHT",-10,10)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,16 +1,11 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
EditBox Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "EditBox", 23
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local tostring, pairs = tostring, pairs
|
||||
local tostring = tostring
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
|
||||
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
local _G = _G
|
||||
|
||||
@@ -18,16 +13,16 @@ local _G = _G
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type = "EditBox"
|
||||
local Version = 14
|
||||
|
||||
if not AceGUIEditBoxInsertLink then
|
||||
-- upgradeable hook
|
||||
hooksecurefunc("ChatEdit_InsertLink", function(...) return _G.AceGUIEditBoxInsertLink(...) end)
|
||||
end
|
||||
|
||||
function _G.AceGUIEditBoxInsertLink(text)
|
||||
for i = 1, AceGUI:GetWidgetCount(Type) do
|
||||
for i = 1, AceGUI:GetNextWidgetNum(Type)-1 do
|
||||
local editbox = _G["AceGUI-3.0EditBox"..i]
|
||||
if editbox and editbox:IsVisible() and editbox:HasFocus() then
|
||||
editbox:Insert(text)
|
||||
@@ -36,93 +31,103 @@ function _G.AceGUIEditBoxInsertLink(text)
|
||||
end
|
||||
end
|
||||
|
||||
local function ShowButton(self)
|
||||
if not self.disablebutton then
|
||||
self.button:Show()
|
||||
self.editbox:SetTextInsets(0, 20, 3, 3)
|
||||
|
||||
--------------------------
|
||||
-- Edit box --
|
||||
--------------------------
|
||||
--[[
|
||||
Events :
|
||||
OnTextChanged
|
||||
OnEnterPressed
|
||||
|
||||
]]
|
||||
do
|
||||
local function OnAcquire(self)
|
||||
self:SetHeight(26)
|
||||
self:SetWidth(200)
|
||||
self:SetDisabled(false)
|
||||
self:SetLabel()
|
||||
self.showbutton = true
|
||||
end
|
||||
end
|
||||
|
||||
local function HideButton(self)
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self:SetDisabled(false)
|
||||
self:SetText()
|
||||
end
|
||||
|
||||
local function Control_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function EditBox_OnEscapePressed(this)
|
||||
this:ClearFocus()
|
||||
end
|
||||
|
||||
local function ShowButton(self)
|
||||
if self.showbutton then
|
||||
self.button:Show()
|
||||
self.editbox:SetTextInsets(0,20,3,3)
|
||||
end
|
||||
end
|
||||
|
||||
local function HideButton(self)
|
||||
self.button:Hide()
|
||||
self.editbox:SetTextInsets(0, 0, 3, 3)
|
||||
end
|
||||
self.editbox:SetTextInsets(0,0,3,3)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function EditBox_OnEscapePressed(frame)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function EditBox_OnEnterPressed(frame)
|
||||
local self = frame.obj
|
||||
local value = frame:GetText()
|
||||
local cancel = self:Fire("OnEnterPressed", value)
|
||||
local function EditBox_OnEnterPressed(this)
|
||||
local self = this.obj
|
||||
local value = this:GetText()
|
||||
local cancel = self:Fire("OnEnterPressed",value)
|
||||
if not cancel then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
HideButton(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function EditBox_OnReceiveDrag(frame)
|
||||
local self = frame.obj
|
||||
local function Button_OnClick(this)
|
||||
local editbox = this.obj.editbox
|
||||
editbox:ClearFocus()
|
||||
EditBox_OnEnterPressed(editbox)
|
||||
end
|
||||
|
||||
local function EditBox_OnReceiveDrag(this)
|
||||
local self = this.obj
|
||||
local type, id, info = GetCursorInfo()
|
||||
if type == "item" then
|
||||
self:SetText(info)
|
||||
self:Fire("OnEnterPressed", info)
|
||||
self:Fire("OnEnterPressed",info)
|
||||
ClearCursor()
|
||||
elseif type == "spell" then
|
||||
local name = GetSpellInfo(id, info)
|
||||
local name, rank = GetSpellName(id, info)
|
||||
if rank and rank:match("%d") then
|
||||
name = name.."("..rank..")"
|
||||
end
|
||||
self:SetText(name)
|
||||
self:Fire("OnEnterPressed", name)
|
||||
self:Fire("OnEnterPressed",name)
|
||||
ClearCursor()
|
||||
end
|
||||
HideButton(self)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
end
|
||||
|
||||
local function EditBox_OnTextChanged(frame)
|
||||
local self = frame.obj
|
||||
local value = frame:GetText()
|
||||
local function EditBox_OnTextChanged(this)
|
||||
local self = this.obj
|
||||
local value = this:GetText()
|
||||
if tostring(value) ~= tostring(self.lasttext) then
|
||||
self:Fire("OnTextChanged", value)
|
||||
self:Fire("OnTextChanged",value)
|
||||
self.lasttext = value
|
||||
ShowButton(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function Button_OnClick(frame)
|
||||
local editbox = frame.obj.editbox
|
||||
editbox:ClearFocus()
|
||||
EditBox_OnEnterPressed(editbox)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
-- height is controlled by SetLabel
|
||||
self:SetWidth(200)
|
||||
self:SetDisabled(false)
|
||||
self:SetLabel()
|
||||
self:SetText()
|
||||
self:DisableButton(false)
|
||||
self:SetMaxLetters(0)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.editbox:EnableMouse(false)
|
||||
@@ -134,20 +139,16 @@ local methods = {
|
||||
self.editbox:SetTextColor(1,1,1)
|
||||
self.label:SetTextColor(1,.82,0)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
local function SetText(self, text)
|
||||
self.lasttext = text or ""
|
||||
self.editbox:SetText(text or "")
|
||||
self.editbox:SetCursorPosition(0)
|
||||
HideButton(self)
|
||||
end,
|
||||
end
|
||||
|
||||
["GetText"] = function(self, text)
|
||||
return self.editbox:GetText()
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
local function SetLabel(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:SetText(text)
|
||||
self.label:Show()
|
||||
@@ -161,72 +162,74 @@ local methods = {
|
||||
self:SetHeight(26)
|
||||
self.alignoffset = 12
|
||||
end
|
||||
end,
|
||||
|
||||
["DisableButton"] = function(self, disabled)
|
||||
self.disablebutton = disabled
|
||||
if disabled then
|
||||
HideButton(self)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetMaxLetters"] = function (self, num)
|
||||
self.editbox:SetMaxLetters(num or 0)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local function Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local editbox = CreateFrame("EditBox","AceGUI-3.0EditBox"..num,frame,"InputBoxTemplate")
|
||||
|
||||
local self = {}
|
||||
self.type = Type
|
||||
self.num = num
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.SetDisabled = SetDisabled
|
||||
self.SetText = SetText
|
||||
self.SetLabel = SetLabel
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
self.editbox = editbox
|
||||
editbox.obj = self
|
||||
|
||||
self.alignoffset = 30
|
||||
|
||||
frame:SetHeight(44)
|
||||
frame:SetWidth(200)
|
||||
|
||||
editbox:SetScript("OnEnter",Control_OnEnter)
|
||||
editbox:SetScript("OnLeave",Control_OnLeave)
|
||||
|
||||
local editbox = CreateFrame("EditBox", "AceGUI-3.0EditBox"..num, frame, "InputBoxTemplate")
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:SetFontObject(ChatFontNormal)
|
||||
editbox:SetScript("OnEnter", Control_OnEnter)
|
||||
editbox:SetScript("OnLeave", Control_OnLeave)
|
||||
editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
|
||||
editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
|
||||
editbox:SetScript("OnTextChanged", EditBox_OnTextChanged)
|
||||
editbox:SetScript("OnEscapePressed",EditBox_OnEscapePressed)
|
||||
editbox:SetScript("OnEnterPressed",EditBox_OnEnterPressed)
|
||||
editbox:SetScript("OnTextChanged",EditBox_OnTextChanged)
|
||||
editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
|
||||
editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
|
||||
editbox:SetTextInsets(0, 0, 3, 3)
|
||||
|
||||
editbox:SetTextInsets(0,0,3,3)
|
||||
editbox:SetMaxLetters(256)
|
||||
editbox:SetPoint("BOTTOMLEFT", 6, 0)
|
||||
editbox:SetPoint("BOTTOMRIGHT")
|
||||
|
||||
editbox:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",6,0)
|
||||
editbox:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
editbox:SetHeight(19)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", 0, -2)
|
||||
label:SetPoint("TOPRIGHT", 0, -2)
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-2)
|
||||
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,-2)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetHeight(18)
|
||||
self.label = label
|
||||
|
||||
local button = CreateFrame("Button", nil, editbox, "UIPanelButtonTemplate")
|
||||
local button = CreateFrame("Button",nil,editbox,"UIPanelButtonTemplate")
|
||||
button:SetWidth(40)
|
||||
button:SetHeight(20)
|
||||
button:SetPoint("RIGHT", -2, 0)
|
||||
button:SetPoint("RIGHT",editbox,"RIGHT",-2,0)
|
||||
button:SetText(OKAY)
|
||||
button:SetScript("OnClick", Button_OnClick)
|
||||
button:Hide()
|
||||
|
||||
local widget = {
|
||||
alignoffset = 30,
|
||||
editbox = editbox,
|
||||
label = label,
|
||||
button = button,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
self.button = button
|
||||
button.obj = self
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
editbox.obj, button.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -0,0 +1,308 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, assert, type = pairs, assert, type
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: CLOSE
|
||||
|
||||
----------------
|
||||
-- Main Frame --
|
||||
----------------
|
||||
--[[
|
||||
Events :
|
||||
OnClose
|
||||
|
||||
]]
|
||||
do
|
||||
local Type = "Frame"
|
||||
local Version = 11
|
||||
|
||||
local FrameBackdrop = {
|
||||
bgFile="Interface\\DialogFrame\\UI-DialogBox-Background",
|
||||
edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||
tile = true, tileSize = 32, edgeSize = 32,
|
||||
insets = { left = 8, right = 8, top = 8, bottom = 8 }
|
||||
}
|
||||
|
||||
local PaneBackdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local function frameOnClose(this)
|
||||
this.obj:Fire("OnClose")
|
||||
end
|
||||
|
||||
local function closeOnClick(this)
|
||||
PlaySound("gsTitleOptionExit")
|
||||
this.obj:Hide()
|
||||
end
|
||||
|
||||
local function frameOnMouseDown(this)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function titleOnMouseDown(this)
|
||||
this:GetParent():StartMoving()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function frameOnMouseUp(this)
|
||||
local frame = this:GetParent()
|
||||
frame:StopMovingOrSizing()
|
||||
local self = frame.obj
|
||||
local status = self.status or self.localstatus
|
||||
status.width = frame:GetWidth()
|
||||
status.height = frame:GetHeight()
|
||||
status.top = frame:GetTop()
|
||||
status.left = frame:GetLeft()
|
||||
end
|
||||
|
||||
local function sizerseOnMouseDown(this)
|
||||
this:GetParent():StartSizing("BOTTOMRIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function sizersOnMouseDown(this)
|
||||
this:GetParent():StartSizing("BOTTOM")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function sizereOnMouseDown(this)
|
||||
this:GetParent():StartSizing("RIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function SetTitle(self,title)
|
||||
self.titletext:SetText(title)
|
||||
end
|
||||
|
||||
local function SetStatusText(self,text)
|
||||
self.statustext:SetText(text)
|
||||
end
|
||||
|
||||
local function Hide(self)
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
local function Show(self)
|
||||
self.frame:Show()
|
||||
end
|
||||
|
||||
local function OnAcquire(self)
|
||||
self.frame:SetParent(UIParent)
|
||||
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
self:ApplyStatus()
|
||||
self:Show()
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
self:ApplyStatus()
|
||||
end
|
||||
|
||||
local function ApplyStatus(self)
|
||||
local status = self.status or self.localstatus
|
||||
local frame = self.frame
|
||||
self:SetWidth(status.width or 700)
|
||||
self:SetHeight(status.height or 500)
|
||||
if status.top and status.left then
|
||||
frame:SetPoint("TOP",UIParent,"BOTTOM",0,status.top)
|
||||
frame:SetPoint("LEFT",UIParent,"LEFT",status.left,0)
|
||||
else
|
||||
frame:SetPoint("CENTER",UIParent,"CENTER")
|
||||
end
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 34
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 57
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = "Frame"
|
||||
|
||||
self.Hide = Hide
|
||||
self.Show = Show
|
||||
self.SetTitle = SetTitle
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetStatusText = SetStatusText
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.ApplyStatus = ApplyStatus
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
|
||||
self.localstatus = {}
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
frame:SetWidth(700)
|
||||
frame:SetHeight(500)
|
||||
frame:SetPoint("CENTER",UIParent,"CENTER",0,0)
|
||||
frame:EnableMouse()
|
||||
frame:SetMovable(true)
|
||||
frame:SetResizable(true)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
frame:SetScript("OnMouseDown", frameOnMouseDown)
|
||||
|
||||
frame:SetBackdrop(FrameBackdrop)
|
||||
frame:SetBackdropColor(0,0,0,1)
|
||||
frame:SetScript("OnHide",frameOnClose)
|
||||
frame:SetMinResize(400,200)
|
||||
frame:SetToplevel(true)
|
||||
|
||||
local closebutton = CreateFrame("Button",nil,frame,"UIPanelButtonTemplate")
|
||||
closebutton:SetScript("OnClick", closeOnClick)
|
||||
closebutton:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-27,17)
|
||||
closebutton:SetHeight(20)
|
||||
closebutton:SetWidth(100)
|
||||
closebutton:SetText(CLOSE)
|
||||
|
||||
self.closebutton = closebutton
|
||||
closebutton.obj = self
|
||||
|
||||
local statusbg = CreateFrame("Frame",nil,frame)
|
||||
statusbg:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",15,15)
|
||||
statusbg:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-132,15)
|
||||
statusbg:SetHeight(24)
|
||||
statusbg:SetBackdrop(PaneBackdrop)
|
||||
statusbg:SetBackdropColor(0.1,0.1,0.1)
|
||||
statusbg:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
self.statusbg = statusbg
|
||||
|
||||
local statustext = statusbg:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
self.statustext = statustext
|
||||
statustext:SetPoint("TOPLEFT",statusbg,"TOPLEFT",7,-2)
|
||||
statustext:SetPoint("BOTTOMRIGHT",statusbg,"BOTTOMRIGHT",-7,2)
|
||||
statustext:SetHeight(20)
|
||||
statustext:SetJustifyH("LEFT")
|
||||
statustext:SetText("")
|
||||
|
||||
local title = CreateFrame("Frame",nil,frame)
|
||||
self.title = title
|
||||
title:EnableMouse()
|
||||
title:SetScript("OnMouseDown",titleOnMouseDown)
|
||||
title:SetScript("OnMouseUp", frameOnMouseUp)
|
||||
|
||||
|
||||
local titlebg = frame:CreateTexture(nil,"OVERLAY")
|
||||
titlebg:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
|
||||
titlebg:SetTexCoord(0.31,0.67,0,0.63)
|
||||
titlebg:SetPoint("TOP",frame,"TOP",0,12)
|
||||
titlebg:SetWidth(100)
|
||||
titlebg:SetHeight(40)
|
||||
|
||||
local titlebg_l = frame:CreateTexture(nil,"OVERLAY")
|
||||
titlebg_l:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
|
||||
titlebg_l:SetTexCoord(0.21,0.31,0,0.63)
|
||||
titlebg_l:SetPoint("RIGHT",titlebg,"LEFT",0,0)
|
||||
titlebg_l:SetWidth(30)
|
||||
titlebg_l:SetHeight(40)
|
||||
|
||||
local titlebg_right = frame:CreateTexture(nil,"OVERLAY")
|
||||
titlebg_right:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
|
||||
titlebg_right:SetTexCoord(0.67,0.77,0,0.63)
|
||||
titlebg_right:SetPoint("LEFT",titlebg,"RIGHT",0,0)
|
||||
titlebg_right:SetWidth(30)
|
||||
titlebg_right:SetHeight(40)
|
||||
|
||||
title:SetAllPoints(titlebg)
|
||||
local titletext = title:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
titletext:SetPoint("TOP",titlebg,"TOP",0,-14)
|
||||
|
||||
self.titletext = titletext
|
||||
|
||||
local sizer_se = CreateFrame("Frame",nil,frame)
|
||||
sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
sizer_se:SetWidth(25)
|
||||
sizer_se:SetHeight(25)
|
||||
sizer_se:EnableMouse()
|
||||
sizer_se:SetScript("OnMouseDown",sizerseOnMouseDown)
|
||||
sizer_se:SetScript("OnMouseUp", frameOnMouseUp)
|
||||
self.sizer_se = sizer_se
|
||||
|
||||
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
|
||||
self.line1 = line1
|
||||
line1:SetWidth(14)
|
||||
line1:SetHeight(14)
|
||||
line1:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||
line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
local x = 0.1 * 14/17
|
||||
line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||
|
||||
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
|
||||
self.line2 = line2
|
||||
line2:SetWidth(8)
|
||||
line2:SetHeight(8)
|
||||
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||
line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
local x = 0.1 * 8/17
|
||||
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||
|
||||
local sizer_s = CreateFrame("Frame",nil,frame)
|
||||
sizer_s:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-25,0)
|
||||
sizer_s:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
|
||||
sizer_s:SetHeight(25)
|
||||
sizer_s:EnableMouse()
|
||||
sizer_s:SetScript("OnMouseDown",sizersOnMouseDown)
|
||||
sizer_s:SetScript("OnMouseUp", frameOnMouseUp)
|
||||
self.sizer_s = sizer_s
|
||||
|
||||
local sizer_e = CreateFrame("Frame",nil,frame)
|
||||
sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25)
|
||||
sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
|
||||
sizer_e:SetWidth(25)
|
||||
sizer_e:EnableMouse()
|
||||
sizer_e:SetScript("OnMouseDown",sizereOnMouseDown)
|
||||
sizer_e:SetScript("OnMouseUp", frameOnMouseUp)
|
||||
self.sizer_e = sizer_e
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,frame)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",frame,"TOPLEFT",17,-27)
|
||||
content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-17,40)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,78 +1,76 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Heading Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Heading", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetText()
|
||||
--------------------------
|
||||
-- Heading --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Heading"
|
||||
local Version = 5
|
||||
|
||||
local function OnAcquire(self)
|
||||
self:SetText("")
|
||||
self:SetFullWidth()
|
||||
self:SetHeight(18)
|
||||
end,
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
local function SetText(self, text)
|
||||
self.label:SetText(text or "")
|
||||
if text and text ~= "" then
|
||||
self.left:SetPoint("RIGHT", self.label, "LEFT", -5, 0)
|
||||
self.right:Show()
|
||||
else
|
||||
self.left:SetPoint("RIGHT", -3, 0)
|
||||
if (text or "") == "" then
|
||||
self.left:SetPoint("RIGHT",self.frame,"RIGHT",-3,0)
|
||||
self.right:Hide()
|
||||
else
|
||||
self.left:SetPoint("RIGHT",self.label,"LEFT",-5,0)
|
||||
self.right:Show()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
|
||||
label:SetPoint("TOP")
|
||||
label:SetPoint("BOTTOM")
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetText = SetText
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(18)
|
||||
|
||||
local label = frame:CreateFontString(nil,"BACKGROUND","GameFontNormal")
|
||||
label:SetPoint("TOP",frame,"TOP",0,0)
|
||||
label:SetPoint("BOTTOM",frame,"BOTTOM",0,0)
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetHeight(18)
|
||||
self.label = label
|
||||
|
||||
local left = frame:CreateTexture(nil, "BACKGROUND")
|
||||
self.left = left
|
||||
left:SetHeight(8)
|
||||
left:SetPoint("LEFT", 3, 0)
|
||||
left:SetPoint("RIGHT", label, "LEFT", -5, 0)
|
||||
left:SetPoint("LEFT",frame,"LEFT",3,0)
|
||||
left:SetPoint("RIGHT",label,"LEFT",-5,0)
|
||||
left:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
left:SetTexCoord(0.81, 0.94, 0.5, 1)
|
||||
|
||||
local right = frame:CreateTexture(nil, "BACKGROUND")
|
||||
self.right = right
|
||||
right:SetHeight(8)
|
||||
right:SetPoint("RIGHT", -3, 0)
|
||||
right:SetPoint("LEFT", label, "RIGHT", 5, 0)
|
||||
right:SetPoint("RIGHT",frame,"RIGHT",-3,0)
|
||||
right:SetPoint("LEFT",label,"RIGHT",5,0)
|
||||
right:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
right:SetTexCoord(0.81, 0.94, 0.5, 1)
|
||||
|
||||
local widget = {
|
||||
label = label,
|
||||
left = left,
|
||||
right = right,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -1,48 +1,33 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Icon Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Icon", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs, print = select, pairs, print
|
||||
local select = select
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent, GetBuildInfo = CreateFrame, UIParent, GetBuildInfo
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
--------------------------
|
||||
-- Label --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Icon"
|
||||
local Version = 12
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Button_OnClick(frame, button)
|
||||
frame.obj:Fire("OnClick", button)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
local function OnAcquire(self)
|
||||
self:SetHeight(110)
|
||||
self:SetWidth(110)
|
||||
self:SetLabel()
|
||||
self:SetLabel("")
|
||||
self:SetImage(nil)
|
||||
self:SetImageSize(64, 64)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
local function SetLabel(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:Show()
|
||||
self.label:SetText(text)
|
||||
@@ -51,23 +36,26 @@ local methods = {
|
||||
self.label:Hide()
|
||||
self:SetHeight(self.image:GetHeight() + 10)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetImage"] = function(self, path, ...)
|
||||
local function SetImage(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = select("#", ...)
|
||||
self.imageshown = true
|
||||
local n = select('#', ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
else
|
||||
self.imageshown = nil
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
["SetImageSize"] = function(self, width, height)
|
||||
local function SetImageSize(self, width, height)
|
||||
self.image:SetWidth(width)
|
||||
self.image:SetHeight(height)
|
||||
--self.frame:SetWidth(width + 30)
|
||||
@@ -76,69 +64,86 @@ local methods = {
|
||||
else
|
||||
self:SetHeight(height + 10)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
self.label:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.label:SetTextColor(0.5,0.5,0.5)
|
||||
self.image:SetVertexColor(0.5, 0.5, 0.5, 0.5)
|
||||
else
|
||||
self.frame:Enable()
|
||||
self.label:SetTextColor(1, 1, 1)
|
||||
self.label:SetTextColor(1,1,1)
|
||||
self.image:SetVertexColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
local function OnClick(this, button)
|
||||
this.obj:Fire("OnClick", button)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function OnEnter(this)
|
||||
this.obj.highlight:Show()
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function OnLeave(this)
|
||||
this.obj.highlight:Hide()
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetLabel = SetLabel
|
||||
self.frame = frame
|
||||
self.SetImage = SetImage
|
||||
self.SetImageSize = SetImageSize
|
||||
|
||||
-- SetText should be deprecated along the way
|
||||
self.SetText = SetLabel
|
||||
self.SetDisabled = SetDisabled
|
||||
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(110)
|
||||
frame:SetWidth(110)
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnClick", Button_OnClick)
|
||||
|
||||
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlight")
|
||||
label:SetPoint("BOTTOMLEFT")
|
||||
label:SetPoint("BOTTOMRIGHT")
|
||||
frame:SetScript("OnClick", OnClick)
|
||||
frame:SetScript("OnLeave", OnLeave)
|
||||
frame:SetScript("OnEnter", OnEnter)
|
||||
local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlight")
|
||||
label:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
|
||||
label:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetJustifyV("TOP")
|
||||
label:SetHeight(18)
|
||||
self.label = label
|
||||
|
||||
local image = frame:CreateTexture(nil, "BACKGROUND")
|
||||
local image = frame:CreateTexture(nil,"BACKGROUND")
|
||||
self.image = image
|
||||
image:SetWidth(64)
|
||||
image:SetHeight(64)
|
||||
image:SetPoint("TOP", 0, -5)
|
||||
image:SetPoint("TOP",frame,"TOP",0,-5)
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
local highlight = frame:CreateTexture(nil,"OVERLAY")
|
||||
self.highlight = highlight
|
||||
highlight:SetAllPoints(image)
|
||||
highlight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight")
|
||||
highlight:SetTexCoord(0, 1, 0.23, 0.77)
|
||||
highlight:SetTexCoord(0,1,0.23,0.77)
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:Hide()
|
||||
|
||||
local widget = {
|
||||
label = label,
|
||||
image = image,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
-- SetText is deprecated, but keep it around for a while. (say, to WoW 4.0)
|
||||
if (select(4, GetBuildInfo()) < 40000) then
|
||||
widget.SetText = widget.SetLabel
|
||||
else
|
||||
widget.SetText = function(self, ...) print("AceGUI-3.0-Icon: SetText is deprecated! Use SetLabel instead!"); self:SetLabel(...) end
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
Acquire() - Called when the object is aquired, should set everything to a default hidden state
|
||||
Release() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
type - the type of the object, same as the name given to :RegisterWidget()
|
||||
|
||||
Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
|
||||
It will be cleared automatically when a widget is released
|
||||
Placing values directly into a widget object should be avoided
|
||||
|
||||
If the Widget can act as a container for other Widgets the following
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
|
||||
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Inline Group --
|
||||
--------------------------
|
||||
--[[
|
||||
This is a simple grouping container, no selection
|
||||
It will resize automatically to the height of the controls added to it
|
||||
]]
|
||||
|
||||
do
|
||||
local Type = "InlineGroup"
|
||||
local Version = 6
|
||||
|
||||
local function OnAcquire(self)
|
||||
self:SetWidth(300)
|
||||
self:SetHeight(100)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
local PaneBackdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local function SetTitle(self,title)
|
||||
self.titletext:SetText(title)
|
||||
end
|
||||
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + 40)
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 20
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 20
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetTitle = SetTitle
|
||||
self.frame = frame
|
||||
self.LayoutFinished = LayoutFinished
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local titletext = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT",frame,"TOPLEFT",14,0)
|
||||
titletext:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-14,0)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
|
||||
self.titletext = titletext
|
||||
|
||||
local border = CreateFrame("Frame",nil,frame)
|
||||
self.border = border
|
||||
border:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-17)
|
||||
border:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-1,3)
|
||||
|
||||
border:SetBackdrop(PaneBackdrop)
|
||||
border:SetBackdropColor(0.1,0.1,0.1,0.5)
|
||||
border:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,border)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",border,"TOPLEFT",10,-10)
|
||||
content:SetPoint("BOTTOMRIGHT",border,"BOTTOMRIGHT",-10,10)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,12 +1,7 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
InteractiveLabel Widget
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "InteractiveLabel", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs = select, pairs
|
||||
local select, max = select, math.max
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -15,49 +10,137 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GameFontHighlightSmall
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
--------------------------
|
||||
-- Label --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "InteractiveLabel"
|
||||
local Version = 6
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Label_OnClick(frame, button)
|
||||
frame.obj:Fire("OnClick", button)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:LabelOnAcquire()
|
||||
local function OnAcquire(self)
|
||||
self:SetHeight(18)
|
||||
self:SetWidth(200)
|
||||
self:SetText("")
|
||||
self:SetImage(nil)
|
||||
self:SetColor()
|
||||
self:SetFontObject()
|
||||
self:SetHighlight()
|
||||
self:SetHighlightTexCoord()
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
local function UpdateImageAnchor(self)
|
||||
local width = self.frame.width or self.frame:GetWidth() or 0
|
||||
local image = self.image
|
||||
local label = self.label
|
||||
local frame = self.frame
|
||||
local height
|
||||
|
||||
["SetHighlight"] = function(self, ...)
|
||||
label:ClearAllPoints()
|
||||
image:ClearAllPoints()
|
||||
|
||||
if self.imageshown then
|
||||
local imagewidth = image:GetWidth()
|
||||
if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
|
||||
--image goes on top centered when less than 200 width for the text, or if there is no text
|
||||
image:SetPoint("TOP",frame,"TOP",0,0)
|
||||
label:SetPoint("TOP",image,"BOTTOM",0,0)
|
||||
label:SetPoint("LEFT",frame,"LEFT",0,0)
|
||||
label:SetWidth(width)
|
||||
height = image:GetHeight() + label:GetHeight()
|
||||
else
|
||||
--image on the left
|
||||
local imageheight = image:GetHeight()
|
||||
local labelheight = label:GetHeight()
|
||||
--center image with label
|
||||
if imageheight > labelheight then
|
||||
image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetPoint("LEFT",image,"RIGHT",0,0)
|
||||
else
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",imagewidth,0)
|
||||
image:SetPoint("RIGHT",label,"LEFT",0,0)
|
||||
end
|
||||
label:SetWidth(width - imagewidth)
|
||||
height = max(imageheight, labelheight)
|
||||
end
|
||||
else
|
||||
--no image shown
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetWidth(width)
|
||||
height = self.label:GetHeight()
|
||||
end
|
||||
|
||||
self.resizing = true
|
||||
self.frame:SetHeight(height)
|
||||
self.frame.height = height
|
||||
self.resizing = nil
|
||||
end
|
||||
|
||||
local function SetText(self, text)
|
||||
self.label:SetText(text or "")
|
||||
UpdateImageAnchor(self)
|
||||
end
|
||||
|
||||
local function SetColor(self, r, g, b)
|
||||
if not (r and g and b) then
|
||||
r, g, b = 1, 1, 1
|
||||
end
|
||||
self.label:SetVertexColor(r, g, b)
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
if self.resizing then return end
|
||||
UpdateImageAnchor(self)
|
||||
end
|
||||
|
||||
local function SetImage(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
self.imageshown = true
|
||||
local n = select('#', ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
end
|
||||
else
|
||||
self.imageshown = nil
|
||||
end
|
||||
UpdateImageAnchor(self)
|
||||
end
|
||||
|
||||
local function SetFont(self, font, height, flags)
|
||||
self.label:SetFont(font, height, flags)
|
||||
end
|
||||
|
||||
local function SetFontObject(self, font)
|
||||
self.label:SetFontObject(font or GameFontHighlightSmall)
|
||||
end
|
||||
|
||||
local function SetImageSize(self, width, height)
|
||||
self.image:SetWidth(width)
|
||||
self.image:SetHeight(height)
|
||||
UpdateImageAnchor(self)
|
||||
end
|
||||
|
||||
local function SetHighlight(self, ...)
|
||||
self.highlight:SetTexture(...)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetHighlightTexCoord"] = function(self, ...)
|
||||
local c = select("#", ...)
|
||||
if c == 4 or c == 8 then
|
||||
local function SetHighlightTexCoord(self, ...)
|
||||
if select('#', ...) >= 1 then
|
||||
self.highlight:SetTexCoord(...)
|
||||
else
|
||||
self.highlight:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetDisabled"] = function(self,disabled)
|
||||
local function SetDisabled(self,disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:EnableMouse(false)
|
||||
@@ -67,35 +150,70 @@ local methods = {
|
||||
self.label:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
-- create a Label type that we will hijack
|
||||
local label = AceGUI:Create("Label")
|
||||
local function OnEnter(this)
|
||||
this.obj.highlight:Show()
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function OnLeave(this)
|
||||
this.obj.highlight:Hide()
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function OnClick(this, ...)
|
||||
this.obj:Fire("OnClick", ...)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
local frame = label.frame
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnMouseDown", Label_OnClick)
|
||||
frame:SetScript("OnEnter", OnEnter)
|
||||
frame:SetScript("OnLeave", OnLeave)
|
||||
frame:SetScript("OnMouseDown", OnClick)
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetText = SetText
|
||||
self.SetColor = SetColor
|
||||
self.frame = frame
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.SetImage = SetImage
|
||||
self.SetImageSize = SetImageSize
|
||||
self.SetFont = SetFont
|
||||
self.SetFontObject = SetFontObject
|
||||
self.SetHighlight = SetHighlight
|
||||
self.SetHighlightTexCoord = SetHighlightTexCoord
|
||||
self.SetDisabled = SetDisabled
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(18)
|
||||
frame:SetWidth(200)
|
||||
local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlightSmall")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetWidth(200)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetJustifyV("TOP")
|
||||
self.label = label
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "OVERLAY")
|
||||
highlight:SetTexture(nil)
|
||||
highlight:SetAllPoints()
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:Hide()
|
||||
self.highlight = highlight
|
||||
|
||||
label.highlight = highlight
|
||||
label.type = Type
|
||||
label.LabelOnAcquire = label.OnAcquire
|
||||
for method, func in pairs(methods) do
|
||||
label[method] = func
|
||||
local image = frame:CreateTexture(nil,"BACKGROUND")
|
||||
self.image = image
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
return label
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Keybinding Widget
|
||||
Set Keybindings in the Config UI.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Keybinding", 21
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
-- WoW APIs
|
||||
local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
|
||||
@@ -17,49 +10,68 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: NOT_BOUND
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
--------------------------
|
||||
-- Keybinding --
|
||||
--------------------------
|
||||
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
do
|
||||
local Type = "Keybinding"
|
||||
local Version = 13
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
local ControlBackdrop = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 3, bottom = 3 }
|
||||
}
|
||||
|
||||
local function Keybinding_OnClick(frame, button)
|
||||
local function Control_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function keybindingMsgFixWidth(this)
|
||||
this:SetWidth(this.msg:GetWidth()+10)
|
||||
this:SetScript("OnUpdate",nil)
|
||||
end
|
||||
|
||||
local function Keybinding_OnClick(this, button)
|
||||
if button == "LeftButton" or button == "RightButton" then
|
||||
local self = frame.obj
|
||||
local self = this.obj
|
||||
if self.waitingForKey then
|
||||
frame:EnableKeyboard(false)
|
||||
this:EnableKeyboard(false)
|
||||
self.msgframe:Hide()
|
||||
frame:UnlockHighlight()
|
||||
this:UnlockHighlight()
|
||||
self.waitingForKey = nil
|
||||
else
|
||||
frame:EnableKeyboard(true)
|
||||
this:EnableKeyboard(true)
|
||||
self.msgframe:Show()
|
||||
frame:LockHighlight()
|
||||
this:LockHighlight()
|
||||
self.waitingForKey = true
|
||||
end
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
end
|
||||
|
||||
local ignoreKeys = {
|
||||
["BUTTON1"] = true, ["BUTTON2"] = true,
|
||||
["UNKNOWN"] = true,
|
||||
["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
|
||||
["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
|
||||
}
|
||||
local function Keybinding_OnKeyDown(frame, key)
|
||||
local self = frame.obj
|
||||
local ignoreKeys = nil
|
||||
local function Keybinding_OnKeyDown(this, key)
|
||||
local self = this.obj
|
||||
if self.waitingForKey then
|
||||
local keyPressed = key
|
||||
if keyPressed == "ESCAPE" then
|
||||
keyPressed = ""
|
||||
else
|
||||
if not ignoreKeys then
|
||||
ignoreKeys = {
|
||||
["BUTTON1"] = true, ["BUTTON2"] = true,
|
||||
["UNKNOWN"] = true,
|
||||
["LSHIFT"] = true, ["LCTRL"] = true, ["LALT"] = true,
|
||||
["RSHIFT"] = true, ["RCTRL"] = true, ["RALT"] = true,
|
||||
}
|
||||
end
|
||||
if ignoreKeys[keyPressed] then return end
|
||||
if IsShiftKeyDown() then
|
||||
keyPressed = "SHIFT-"..keyPressed
|
||||
@@ -72,19 +84,19 @@ local function Keybinding_OnKeyDown(frame, key)
|
||||
end
|
||||
end
|
||||
|
||||
frame:EnableKeyboard(false)
|
||||
this:EnableKeyboard(false)
|
||||
self.msgframe:Hide()
|
||||
frame:UnlockHighlight()
|
||||
this:UnlockHighlight()
|
||||
self.waitingForKey = nil
|
||||
|
||||
if not self.disabled then
|
||||
self:SetKey(keyPressed)
|
||||
self:Fire("OnKeyChanged", keyPressed)
|
||||
self:Fire("OnKeyChanged",keyPressed)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function Keybinding_OnMouseDown(frame, button)
|
||||
local function Keybinding_OnMouseDown(this, button)
|
||||
if button == "LeftButton" or button == "RightButton" then
|
||||
return
|
||||
elseif button == "MiddleButton" then
|
||||
@@ -94,25 +106,25 @@ local function Keybinding_OnMouseDown(frame, button)
|
||||
elseif button == "Button5" then
|
||||
button = "BUTTON5"
|
||||
end
|
||||
Keybinding_OnKeyDown(frame, button)
|
||||
end
|
||||
Keybinding_OnKeyDown(this, button)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
local function OnAcquire(self)
|
||||
self:SetWidth(200)
|
||||
self:SetHeight(44)
|
||||
self:SetLabel("")
|
||||
self:SetKey("")
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.waitingForKey = nil
|
||||
self.msgframe:Hide()
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.button:Disable()
|
||||
@@ -121,9 +133,9 @@ local methods = {
|
||||
self.button:Enable()
|
||||
self.label:SetTextColor(1,1,1)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetKey"] = function(self, key)
|
||||
local function SetKey(self, key)
|
||||
if (key or "") == "" then
|
||||
self.button:SetText(NOT_BOUND)
|
||||
self.button:SetNormalFontObject("GameFontNormal")
|
||||
@@ -131,17 +143,9 @@ local methods = {
|
||||
self.button:SetText(key)
|
||||
self.button:SetNormalFontObject("GameFontHighlight")
|
||||
end
|
||||
end,
|
||||
|
||||
["GetKey"] = function(self)
|
||||
local key = self.button:GetText()
|
||||
if key == NOT_BOUND then
|
||||
key = nil
|
||||
end
|
||||
return key
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, label)
|
||||
local function SetLabel(self, label)
|
||||
self.label:SetText(label or "")
|
||||
if (label or "") == "" then
|
||||
self.alignoffset = nil
|
||||
@@ -150,81 +154,77 @@ local methods = {
|
||||
self.alignoffset = 30
|
||||
self:SetHeight(44)
|
||||
end
|
||||
end,
|
||||
}
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
|
||||
local ControlBackdrop = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 3, bottom = 3 }
|
||||
}
|
||||
local button = CreateFrame("Button","AceGUI-3.0 KeybindingButton"..num,frame,"UIPanelButtonTemplate2")
|
||||
|
||||
local function keybindingMsgFixWidth(frame)
|
||||
frame:SetWidth(frame.msg:GetWidth() + 10)
|
||||
frame:SetScript("OnUpdate", nil)
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local name = "AceGUI30KeybindingButton" .. AceGUI:GetNextWidgetNum(Type)
|
||||
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local button = CreateFrame("Button", name, frame, "UIPanelButtonTemplate2")
|
||||
|
||||
button:EnableMouse(true)
|
||||
button:RegisterForClicks("AnyDown")
|
||||
button:SetScript("OnEnter", Control_OnEnter)
|
||||
button:SetScript("OnLeave", Control_OnLeave)
|
||||
button:SetScript("OnClick", Keybinding_OnClick)
|
||||
button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
|
||||
button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
|
||||
button:SetPoint("BOTTOMLEFT")
|
||||
button:SetPoint("BOTTOMRIGHT")
|
||||
button:SetHeight(24)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
self.num = num
|
||||
|
||||
local text = button:GetFontString()
|
||||
text:SetPoint("LEFT", 7, 0)
|
||||
text:SetPoint("RIGHT", -7, 0)
|
||||
text:SetPoint("LEFT",button,"LEFT",7,0)
|
||||
text:SetPoint("RIGHT",button,"RIGHT",-7,0)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
|
||||
label:SetPoint("TOPLEFT")
|
||||
label:SetPoint("TOPRIGHT")
|
||||
button:SetScript("OnClick",Keybinding_OnClick)
|
||||
button:SetScript("OnKeyDown",Keybinding_OnKeyDown)
|
||||
button:SetScript("OnEnter",Control_OnEnter)
|
||||
button:SetScript("OnLeave",Control_OnLeave)
|
||||
button:SetScript("OnMouseDown",Keybinding_OnMouseDown)
|
||||
button:RegisterForClicks("AnyDown")
|
||||
button:EnableMouse()
|
||||
|
||||
button:SetHeight(24)
|
||||
button:SetWidth(200)
|
||||
button:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT",0,0)
|
||||
button:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
|
||||
frame:SetWidth(200)
|
||||
frame:SetHeight(44)
|
||||
|
||||
self.alignoffset = 30
|
||||
|
||||
self.button = button
|
||||
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontHighlight")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetHeight(18)
|
||||
self.label = label
|
||||
|
||||
local msgframe = CreateFrame("Frame", nil, UIParent)
|
||||
local msgframe = CreateFrame("Frame",nil,UIParent)
|
||||
msgframe:SetHeight(30)
|
||||
msgframe:SetBackdrop(ControlBackdrop)
|
||||
msgframe:SetBackdropColor(0,0,0)
|
||||
msgframe:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
msgframe:SetFrameLevel(1000)
|
||||
|
||||
local msg = msgframe:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel.")
|
||||
self.msgframe = msgframe
|
||||
local msg = msgframe:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
msg:SetText("Press a key to bind, ESC to clear the binding or click the button again to cancel")
|
||||
msgframe.msg = msg
|
||||
msg:SetPoint("TOPLEFT", 5, -5)
|
||||
msg:SetPoint("TOPLEFT",msgframe,"TOPLEFT",5,-5)
|
||||
msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
|
||||
msgframe:SetPoint("BOTTOM", button, "TOP")
|
||||
msgframe:SetPoint("BOTTOM",button,"TOP",0,0)
|
||||
msgframe:Hide()
|
||||
|
||||
local widget = {
|
||||
button = button,
|
||||
label = label,
|
||||
msgframe = msgframe,
|
||||
frame = frame,
|
||||
alignoffset = 30,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetLabel = SetLabel
|
||||
self.SetDisabled = SetDisabled
|
||||
self.SetKey = SetKey
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
button.obj = self
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
button.obj = widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Label Widget
|
||||
Displays text and optionally an icon.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Label", 21
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local max, select, pairs = math.max, select, pairs
|
||||
local max, select = math.max, select
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
@@ -16,16 +10,33 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GameFontHighlightSmall
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
--------------------------
|
||||
-- Label --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Label"
|
||||
local Version = 12
|
||||
|
||||
local function UpdateImageAnchor(self)
|
||||
if self.resizing then return end
|
||||
local frame = self.frame
|
||||
local width = frame.width or frame:GetWidth() or 0
|
||||
local function OnAcquire(self)
|
||||
self:SetHeight(18)
|
||||
self:SetWidth(200)
|
||||
self:SetText("")
|
||||
self:SetImage(nil)
|
||||
self:SetImageSize(16, 16)
|
||||
self:SetColor()
|
||||
self:SetFontObject()
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
local function UpdateImageAnchor(self)
|
||||
local width = self.frame.width or self.frame:GetWidth() or 0
|
||||
local image = self.image
|
||||
local label = self.label
|
||||
local frame = self.frame
|
||||
local height
|
||||
|
||||
label:ClearAllPoints()
|
||||
@@ -34,78 +45,56 @@ local function UpdateImageAnchor(self)
|
||||
if self.imageshown then
|
||||
local imagewidth = image:GetWidth()
|
||||
if (width - imagewidth) < 200 or (label:GetText() or "") == "" then
|
||||
-- image goes on top centered when less than 200 width for the text, or if there is no text
|
||||
image:SetPoint("TOP")
|
||||
label:SetPoint("TOP", image, "BOTTOM")
|
||||
label:SetPoint("LEFT")
|
||||
--image goes on top centered when less than 200 width for the text, or if there is no text
|
||||
image:SetPoint("TOP",frame,"TOP",0,0)
|
||||
label:SetPoint("TOP",image,"BOTTOM",0,0)
|
||||
label:SetPoint("LEFT",frame,"LEFT",0,0)
|
||||
label:SetWidth(width)
|
||||
height = image:GetHeight() + label:GetHeight()
|
||||
else
|
||||
-- image on the left
|
||||
image:SetPoint("TOPLEFT")
|
||||
label:SetPoint("TOPLEFT", image, "TOPRIGHT", 4, 0)
|
||||
label:SetWidth(width - imagewidth - 4)
|
||||
--image on the left
|
||||
image:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetPoint("TOPLEFT",image,"TOPRIGHT",4,0)
|
||||
label:SetWidth(width - imagewidth)
|
||||
height = max(image:GetHeight(), label:GetHeight())
|
||||
end
|
||||
else
|
||||
-- no image shown
|
||||
label:SetPoint("TOPLEFT")
|
||||
--no image shown
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetWidth(width)
|
||||
height = label:GetHeight()
|
||||
height = self.label:GetHeight()
|
||||
end
|
||||
|
||||
self.resizing = true
|
||||
frame:SetHeight(height)
|
||||
frame.height = height
|
||||
self.frame:SetHeight(height)
|
||||
self.frame.height = height
|
||||
self.resizing = nil
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
-- set the flag to stop constant size updates
|
||||
self.resizing = true
|
||||
-- height is set dynamically by the text and image size
|
||||
self:SetWidth(200)
|
||||
self:SetText()
|
||||
self:SetImage(nil)
|
||||
self:SetImageSize(16, 16)
|
||||
self:SetColor()
|
||||
self:SetFontObject()
|
||||
|
||||
-- reset the flag
|
||||
self.resizing = nil
|
||||
-- run the update explicitly
|
||||
local function SetText(self, text)
|
||||
self.label:SetText(text or "")
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
self.label:SetText(text)
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
|
||||
["SetColor"] = function(self, r, g, b)
|
||||
local function SetColor(self, r, g, b)
|
||||
if not (r and g and b) then
|
||||
r, g, b = 1, 1, 1
|
||||
end
|
||||
self.label:SetVertexColor(r, g, b)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetImage"] = function(self, path, ...)
|
||||
local function OnWidthSet(self, width)
|
||||
if self.resizing then return end
|
||||
UpdateImageAnchor(self)
|
||||
end
|
||||
|
||||
local function SetImage(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
self.imageshown = true
|
||||
local n = select("#", ...)
|
||||
local n = select('#', ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
else
|
||||
@@ -115,48 +104,55 @@ local methods = {
|
||||
self.imageshown = nil
|
||||
end
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetFont"] = function(self, font, height, flags)
|
||||
local function SetFont(self, font, height, flags)
|
||||
self.label:SetFont(font, height, flags)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetFontObject"] = function(self, font)
|
||||
self:SetFont((font or GameFontHighlightSmall):GetFont())
|
||||
end,
|
||||
local function SetFontObject(self, font)
|
||||
self.label:SetFontObject(font or GameFontHighlightSmall)
|
||||
end
|
||||
|
||||
["SetImageSize"] = function(self, width, height)
|
||||
local function SetImageSize(self, width, height)
|
||||
self.image:SetWidth(width)
|
||||
self.image:SetHeight(height)
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontHighlightSmall")
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetJustifyV("TOP")
|
||||
|
||||
local image = frame:CreateTexture(nil, "BACKGROUND")
|
||||
|
||||
-- create widget
|
||||
local widget = {
|
||||
label = label,
|
||||
image = image,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetText = SetText
|
||||
self.SetColor = SetColor
|
||||
self.frame = frame
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.SetImage = SetImage
|
||||
self.SetImageSize = SetImageSize
|
||||
self.SetFont = SetFont
|
||||
self.SetFontObject = SetFontObject
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(18)
|
||||
frame:SetWidth(200)
|
||||
local label = frame:CreateFontString(nil,"BACKGROUND","GameFontHighlightSmall")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetWidth(200)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetJustifyV("TOP")
|
||||
self.label = label
|
||||
|
||||
local image = frame:CreateTexture(nil,"BACKGROUND")
|
||||
self.image = image
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -1,308 +1,309 @@
|
||||
local Type, Version = "MultiLineEditBox", 24
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
|
||||
--[[
|
||||
--Multiline Editbox Widget, Originally by bam
|
||||
|
||||
--]]
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
local format, pairs, tostring = string.format, pairs, tostring
|
||||
|
||||
-- WoW APIs
|
||||
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
|
||||
local GetCursorInfo, ClearCursor, GetSpellName = GetCursorInfo, ClearCursor, GetSpellName
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
local _G = _G
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: ACCEPT, ChatFontNormal
|
||||
-- GLOBALS: ChatFontNormal, ACCEPT
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Layout(self)
|
||||
self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
|
||||
local Version = 11
|
||||
---------------------
|
||||
-- Common Elements --
|
||||
---------------------
|
||||
|
||||
if self.labelHeight == 0 then
|
||||
self.scrollBar:SetPoint("TOP", self.frame, "TOP", 0, -23)
|
||||
else
|
||||
self.scrollBar:SetPoint("TOP", self.label, "BOTTOM", 0, -19)
|
||||
end
|
||||
local FrameBackdrop = {
|
||||
bgFile="Interface\\DialogFrame\\UI-DialogBox-Background",
|
||||
edgeFile="Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||
tile = true, tileSize = 32, edgeSize = 32,
|
||||
insets = { left = 8, right = 8, top = 8, bottom = 8 }
|
||||
}
|
||||
|
||||
if self.disablebutton then
|
||||
self.scrollBar:SetPoint("BOTTOM", self.frame, "BOTTOM", 0, 21)
|
||||
self.scrollBG:SetPoint("BOTTOMLEFT", 0, 4)
|
||||
else
|
||||
self.scrollBar:SetPoint("BOTTOM", self.button, "TOP", 0, 18)
|
||||
self.scrollBG:SetPoint("BOTTOMLEFT", self.button, "TOPLEFT")
|
||||
end
|
||||
end
|
||||
local PaneBackdrop = {
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function OnClick(self) -- Button
|
||||
self = self.obj
|
||||
self.editBox:ClearFocus()
|
||||
if not self:Fire("OnEnterPressed", self.editBox:GetText()) then
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local ControlBackdrop = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 3, bottom = 3 }
|
||||
}
|
||||
|
||||
--------------------------
|
||||
-- Edit box --
|
||||
--------------------------
|
||||
--[[
|
||||
Events :
|
||||
OnTextChanged
|
||||
OnEnterPressed
|
||||
|
||||
]]
|
||||
do
|
||||
local Type = "MultiLineEditBox"
|
||||
|
||||
local MultiLineEditBox = {}
|
||||
|
||||
local function EditBox_OnEnterPressed(this)
|
||||
local self = this.obj
|
||||
local value = this:GetText()
|
||||
local cancel = self:Fire("OnEnterPressed",value)
|
||||
if not cancel then
|
||||
self.button:Disable()
|
||||
end
|
||||
end
|
||||
|
||||
local function OnCursorChanged(self, _, y, _, cursorHeight) -- EditBox
|
||||
self, y = self.obj.scrollFrame, -y
|
||||
local offset = self:GetVerticalScroll()
|
||||
if y < offset then
|
||||
self:SetVerticalScroll(y)
|
||||
else
|
||||
y = y + cursorHeight - self:GetHeight()
|
||||
if y > offset then
|
||||
self:SetVerticalScroll(y)
|
||||
end
|
||||
|
||||
local function Button_OnClick(this)
|
||||
local editbox = this.obj.editbox
|
||||
editbox:ClearFocus()
|
||||
EditBox_OnEnterPressed(editbox)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnEditFocusLost(self) -- EditBox
|
||||
self:HighlightText(0, 0)
|
||||
end
|
||||
|
||||
local function OnEnter(self) -- EditBox / ScrollFrame
|
||||
self = self.obj
|
||||
if not self.entered then
|
||||
self.entered = true
|
||||
self:Fire("OnEnter")
|
||||
end
|
||||
end
|
||||
|
||||
local function OnLeave(self) -- EditBox / ScrollFrame
|
||||
self = self.obj
|
||||
if self.entered then
|
||||
self.entered = nil
|
||||
self:Fire("OnLeave")
|
||||
end
|
||||
end
|
||||
|
||||
local function OnMouseUp(self) -- ScrollFrame
|
||||
self = self.obj.editBox
|
||||
self:SetFocus()
|
||||
self:SetCursorPosition(self:GetNumLetters())
|
||||
end
|
||||
|
||||
local function OnReceiveDrag(self) -- EditBox / ScrollFrame
|
||||
local function EditBox_OnReceiveDrag(this)
|
||||
local self = this.obj
|
||||
local type, id, info = GetCursorInfo()
|
||||
if type == "spell" then
|
||||
info = GetSpellInfo(id, info)
|
||||
elseif type ~= "item" then
|
||||
return
|
||||
end
|
||||
if type == "item" then
|
||||
self:SetText(info)
|
||||
self:Fire("OnEnterPressed",info)
|
||||
ClearCursor()
|
||||
self = self.obj
|
||||
local editBox = self.editBox
|
||||
if not editBox:HasFocus() then
|
||||
editBox:SetFocus()
|
||||
editBox:SetCursorPosition(editBox:GetNumLetters())
|
||||
elseif type == "spell" then
|
||||
local name, rank = GetSpellName(id, info)
|
||||
if rank and rank:match("%d") then
|
||||
name = name.."("..rank..")"
|
||||
end
|
||||
editBox:Insert(info)
|
||||
self.button:Enable()
|
||||
end
|
||||
|
||||
local function OnSizeChanged(self, width, height) -- ScrollFrame
|
||||
self.obj.editBox:SetWidth(width)
|
||||
end
|
||||
|
||||
local function OnTextChanged(self, userInput) -- EditBox
|
||||
if userInput then
|
||||
self = self.obj
|
||||
self:Fire("OnTextChanged", self.editBox:GetText())
|
||||
self.button:Enable()
|
||||
self:SetText(name)
|
||||
self:Fire("OnEnterPressed",name)
|
||||
ClearCursor()
|
||||
end
|
||||
--self.button:Disable()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
end
|
||||
|
||||
local function OnTextSet(self) -- EditBox
|
||||
self:HighlightText(0, 0)
|
||||
self:SetCursorPosition(self:GetNumLetters())
|
||||
self:SetCursorPosition(0)
|
||||
self.obj.button:Disable()
|
||||
end
|
||||
|
||||
local function OnVerticalScroll(self, offset) -- ScrollFrame
|
||||
local editBox = self.obj.editBox
|
||||
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self.editBox:SetText("")
|
||||
self:SetDisabled(false)
|
||||
function MultiLineEditBox:OnAcquire()
|
||||
self:SetWidth(200)
|
||||
self:DisableButton(false)
|
||||
self:SetNumLines()
|
||||
self.entered = nil
|
||||
self:SetMaxLetters(0)
|
||||
end,
|
||||
self:SetHeight(116)
|
||||
self:SetNumLines(4)
|
||||
self:SetDisabled(false)
|
||||
self:ShowButton(true)
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
function MultiLineEditBox:OnRelease()
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self:SetDisabled(false)
|
||||
end
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local editBox = self.editBox
|
||||
function MultiLineEditBox:SetDisabled(disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
editBox:ClearFocus()
|
||||
editBox:EnableMouse(false)
|
||||
editBox:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.label:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.scrollFrame:EnableMouse(false)
|
||||
self.editbox:EnableMouse(false)
|
||||
self.scrollframe:EnableMouse(false)
|
||||
self.editbox:ClearFocus()
|
||||
self.editbox:SetTextColor(0.5, 0.5, 0.5)
|
||||
self.label:SetTextColor(0.5,0.5,0.5)
|
||||
self.button:Disable()
|
||||
else
|
||||
editBox:EnableMouse(true)
|
||||
editBox:SetTextColor(1, 1, 1)
|
||||
self.label:SetTextColor(1, 0.82, 0)
|
||||
self.scrollFrame:EnableMouse(true)
|
||||
self.editbox:EnableMouse(true)
|
||||
self.scrollframe:EnableMouse(true)
|
||||
self.editbox:SetTextColor(1, 1, 1)
|
||||
self.label:SetTextColor(1,.82,0)
|
||||
self.button:Enable()
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:SetText(text)
|
||||
if self.labelHeight ~= 10 then
|
||||
self.labelHeight = 10
|
||||
self.label:Show()
|
||||
function MultiLineEditBox:SetText(text)
|
||||
text = text or ""
|
||||
local editbox = self.editbox
|
||||
local oldText = editbox:GetText()
|
||||
local dummy = format(" %s", text)
|
||||
self.lasttext = dummy -- prevents OnTextChanged from firing
|
||||
editbox:SetText(dummy)
|
||||
editbox:HighlightText(0, 1)
|
||||
self.lasttext = oldText
|
||||
editbox:Insert("")
|
||||
end
|
||||
elseif self.labelHeight ~= 0 then
|
||||
self.labelHeight = 0
|
||||
|
||||
function MultiLineEditBox:SetLabel(text)
|
||||
if (text or "") == "" then
|
||||
self.backdrop:SetPoint("TOPLEFT",self.frame,"TOPLEFT",0,0)
|
||||
self.label:Hide()
|
||||
end
|
||||
Layout(self)
|
||||
end,
|
||||
|
||||
["SetNumLines"] = function(self, value)
|
||||
if not value or value < 4 then
|
||||
value = 4
|
||||
end
|
||||
self.numlines = value
|
||||
Layout(self)
|
||||
end,
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
self.editBox:SetText(text)
|
||||
end,
|
||||
|
||||
["GetText"] = function(self)
|
||||
return self.editBox:GetText()
|
||||
end,
|
||||
|
||||
["SetMaxLetters"] = function (self, num)
|
||||
self.editBox:SetMaxLetters(num or 0)
|
||||
end,
|
||||
|
||||
["DisableButton"] = function(self, disabled)
|
||||
self.disablebutton = disabled
|
||||
if disabled then
|
||||
self.button:Hide()
|
||||
self.label:SetText("")
|
||||
else
|
||||
self.backdrop:SetPoint("TOPLEFT",self.frame,"TOPLEFT",0,-20)
|
||||
self.label:Show()
|
||||
self.label:SetText(text)
|
||||
end
|
||||
end
|
||||
|
||||
function MultiLineEditBox:SetNumLines(number)
|
||||
number = number or 4
|
||||
self:SetHeight(60 + (14*number))
|
||||
end
|
||||
|
||||
function MultiLineEditBox:GetText()
|
||||
return self.editbox:GetText()
|
||||
end
|
||||
|
||||
function MultiLineEditBox:ShowButton(show)
|
||||
if show then
|
||||
self.backdrop:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,22)
|
||||
self.button:Show()
|
||||
else
|
||||
self.backdrop:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,0)
|
||||
self.button:Hide()
|
||||
end
|
||||
Layout(self)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local backdrop = {
|
||||
bgFile = [[Interface\Tooltips\UI-Tooltip-Background]],
|
||||
edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], edgeSize = 16,
|
||||
insets = { left = 4, right = 3, top = 4, bottom = 3 }
|
||||
}
|
||||
|
||||
local function Constructor()
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
local backdrop = CreateFrame("Frame", nil, frame)
|
||||
local self = {}
|
||||
for k, v in pairs(MultiLineEditBox) do self[k] = v end
|
||||
self.type = Type
|
||||
self.frame = frame
|
||||
self.backdrop = backdrop
|
||||
frame.obj = self
|
||||
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
backdrop:SetBackdrop(ControlBackdrop)
|
||||
backdrop:SetBackdropColor(0, 0, 0)
|
||||
backdrop:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
|
||||
label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4)
|
||||
backdrop:SetPoint("TOPLEFT",frame,"TOPLEFT",0, -20)
|
||||
backdrop:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,22)
|
||||
|
||||
local scrollframe = CreateFrame("ScrollFrame", format("%s@%s@%s", Type, "ScrollFrame", tostring(self)), backdrop, "UIPanelScrollFrameTemplate")
|
||||
scrollframe:SetPoint("TOPLEFT", 5, -6)
|
||||
scrollframe:SetPoint("BOTTOMRIGHT", -28, 6)
|
||||
scrollframe.obj = self
|
||||
self.scrollframe = scrollframe
|
||||
|
||||
--local scrollchild = CreateFrame("Frame", nil, scrollframe)
|
||||
--scrollframe:SetScrollChild(scrollchild)
|
||||
--scrollchild:SetHeight(2)
|
||||
--scrollchild:SetWidth(2)
|
||||
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,-2)
|
||||
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,-2)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetText(ACCEPT)
|
||||
label:SetHeight(10)
|
||||
label:SetHeight(18)
|
||||
self.label = label
|
||||
|
||||
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate2")
|
||||
button:SetPoint("BOTTOMLEFT", 0, 4)
|
||||
button:SetHeight(22)
|
||||
button:SetWidth(label:GetStringWidth() + 24)
|
||||
local editbox = CreateFrame("EditBox", nil, scrollframe)
|
||||
self.editbox = editbox
|
||||
editbox.obj = self
|
||||
editbox:SetPoint("TOPLEFT")
|
||||
editbox:SetPoint("BOTTOMLEFT")
|
||||
editbox:SetHeight(50)
|
||||
editbox:SetWidth(50)
|
||||
editbox:SetMultiLine(true)
|
||||
-- editbox:SetMaxLetters(7500)
|
||||
editbox:SetTextInsets(5, 5, 3, 3)
|
||||
editbox:EnableMouse(true)
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:SetFontObject(ChatFontNormal)
|
||||
scrollframe:SetScrollChild(editbox)
|
||||
|
||||
local button = CreateFrame("Button",nil,scrollframe,"UIPanelButtonTemplate")
|
||||
button:SetWidth(80)
|
||||
button:SetHeight(20)
|
||||
button:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,2)
|
||||
button:SetText(ACCEPT)
|
||||
button:SetScript("OnClick", OnClick)
|
||||
button:SetScript("OnClick", Button_OnClick)
|
||||
button:SetFrameLevel(editbox:GetFrameLevel() + 1)
|
||||
button:Disable()
|
||||
button:Hide()
|
||||
self.button = button
|
||||
button.obj = self
|
||||
|
||||
local text = button:GetFontString()
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5)
|
||||
text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
|
||||
text:SetJustifyV("MIDDLE")
|
||||
scrollframe:EnableMouse(true)
|
||||
scrollframe:SetScript("OnMouseUp", function() editbox:SetFocus() end)
|
||||
scrollframe:SetScript("OnEnter", function(this) this.obj:Fire("OnEnter") end)
|
||||
scrollframe:SetScript("OnLeave", function(this) this.obj:Fire("OnLeave") end)
|
||||
|
||||
local scrollBG = CreateFrame("Frame", nil, frame)
|
||||
scrollBG:SetBackdrop(backdrop)
|
||||
scrollBG:SetBackdropColor(0, 0, 0)
|
||||
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
editbox:SetScript("OnEnter", function(this) this.obj:Fire("OnEnter") end)
|
||||
editbox:SetScript("OnLeave", function(this) this.obj:Fire("OnLeave") end)
|
||||
|
||||
local scrollFrame = CreateFrame("ScrollFrame", ("%s%dScrollFrame"):format(Type, widgetNum), frame, "UIPanelScrollFrameTemplate")
|
||||
|
||||
local scrollBar = _G[scrollFrame:GetName() .. "ScrollBar"]
|
||||
scrollBar:ClearAllPoints()
|
||||
scrollBar:SetPoint("TOP", label, "BOTTOM", 0, -19)
|
||||
scrollBar:SetPoint("BOTTOM", button, "TOP", 0, 18)
|
||||
scrollBar:SetPoint("RIGHT", frame, "RIGHT")
|
||||
|
||||
scrollBG:SetPoint("TOPRIGHT", scrollBar, "TOPLEFT", 0, 19)
|
||||
scrollBG:SetPoint("BOTTOMLEFT", button, "TOPLEFT")
|
||||
|
||||
scrollFrame:SetPoint("TOPLEFT", scrollBG, "TOPLEFT", 5, -6)
|
||||
scrollFrame:SetPoint("BOTTOMRIGHT", scrollBG, "BOTTOMRIGHT", -4, 4)
|
||||
scrollFrame:SetScript("OnEnter", OnEnter)
|
||||
scrollFrame:SetScript("OnLeave", OnLeave)
|
||||
scrollFrame:SetScript("OnMouseUp", OnMouseUp)
|
||||
scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
|
||||
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
|
||||
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
|
||||
|
||||
local editBox = CreateFrame("EditBox", nil, scrollFrame)
|
||||
editBox:SetAllPoints()
|
||||
editBox:SetFontObject(ChatFontNormal)
|
||||
editBox:SetMultiLine(true)
|
||||
editBox:EnableMouse(true)
|
||||
editBox:SetAutoFocus(false)
|
||||
editBox:SetCountInvisibleLetters(false)
|
||||
editBox:SetScript("OnCursorChanged", OnCursorChanged)
|
||||
editBox:SetScript("OnEditFocusLost", OnEditFocusLost)
|
||||
editBox:SetScript("OnEnter", OnEnter)
|
||||
editBox:SetScript("OnEscapePressed", editBox.ClearFocus)
|
||||
editBox:SetScript("OnLeave", OnLeave)
|
||||
editBox:SetScript("OnMouseDown", OnReceiveDrag)
|
||||
editBox:SetScript("OnReceiveDrag", OnReceiveDrag)
|
||||
editBox:SetScript("OnTextChanged", OnTextChanged)
|
||||
editBox:SetScript("OnTextSet", OnTextSet)
|
||||
|
||||
scrollFrame:SetScrollChild(editBox)
|
||||
|
||||
local widget = {
|
||||
button = button,
|
||||
editBox = editBox,
|
||||
frame = frame,
|
||||
label = label,
|
||||
labelHeight = 10,
|
||||
numlines = 4,
|
||||
scrollBar = scrollBar,
|
||||
scrollBG = scrollBG,
|
||||
scrollFrame = scrollFrame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
local function FixSize()
|
||||
--scrollchild:SetHeight(scrollframe:GetHeight())
|
||||
--scrollchild:SetWidth(scrollframe:GetWidth())
|
||||
editbox:SetWidth(scrollframe:GetWidth())
|
||||
end
|
||||
button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget
|
||||
scrollframe:SetScript("OnShow", FixSize)
|
||||
scrollframe:SetScript("OnSizeChanged", FixSize)
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
editbox:SetScript("OnEscapePressed", editbox.ClearFocus)
|
||||
editbox:SetScript("OnTextChanged", function(_, ...)
|
||||
scrollframe:UpdateScrollChildRect()
|
||||
local value = editbox:GetText()
|
||||
if value ~= self.lasttext then
|
||||
self:Fire("OnTextChanged", value)
|
||||
self.lasttext = value
|
||||
if not self.disabled then
|
||||
self.button:Enable()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
editbox:SetScript("OnReceiveDrag", EditBox_OnReceiveDrag)
|
||||
editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
|
||||
|
||||
do
|
||||
local cursorOffset, cursorHeight
|
||||
local idleTime
|
||||
local function FixScroll(_, elapsed)
|
||||
if cursorOffset and cursorHeight then
|
||||
idleTime = 0
|
||||
local height = scrollframe:GetHeight()
|
||||
local range = scrollframe:GetVerticalScrollRange()
|
||||
local scroll = scrollframe:GetVerticalScroll()
|
||||
local size = height + range
|
||||
cursorOffset = -cursorOffset
|
||||
while cursorOffset < scroll do
|
||||
scroll = scroll - (height / 2)
|
||||
if scroll < 0 then scroll = 0 end
|
||||
scrollframe:SetVerticalScroll(scroll)
|
||||
end
|
||||
while cursorOffset + cursorHeight > scroll + height and scroll < range do
|
||||
scroll = scroll + (height / 2)
|
||||
if scroll > range then scroll = range end
|
||||
scrollframe:SetVerticalScroll(scroll)
|
||||
end
|
||||
elseif not idleTime or idleTime > 2 then
|
||||
frame:SetScript("OnUpdate", nil)
|
||||
idleTime = nil
|
||||
else
|
||||
idleTime = idleTime + elapsed
|
||||
end
|
||||
cursorOffset = nil
|
||||
end
|
||||
editbox:SetScript("OnCursorChanged", function(_, x, y, w, h)
|
||||
cursorOffset, cursorHeight = y, h
|
||||
if not idleTime then
|
||||
frame:SetScript("OnUpdate", FixScroll)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,241 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, assert, type = pairs, assert, type
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
Acquire() - Called when the object is aquired, should set everything to a default hidden state
|
||||
Release() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
type - the type of the object, same as the name given to :RegisterWidget()
|
||||
|
||||
Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
|
||||
It will be cleared automatically when a widget is released
|
||||
Placing values directly into a widget object should be avoided
|
||||
|
||||
If the Widget can act as a container for other Widgets the following
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
|
||||
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Scroll Frame --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "ScrollFrame"
|
||||
local Version = 9
|
||||
|
||||
local function OnAcquire(self)
|
||||
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.status = nil
|
||||
-- do SetScroll after niling status, but before clearing localstatus
|
||||
-- so the scroll value isnt populated back into status, but not kept in localstatus either
|
||||
self:SetScroll(0)
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
self.scrollframe:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,0)
|
||||
self.scrollbar:Hide()
|
||||
self.scrollBarShown = nil
|
||||
self.content.height, self.content.width = nil, nil
|
||||
end
|
||||
|
||||
local function SetScroll(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
local viewheight = self.scrollframe:GetHeight()
|
||||
local height = self.content:GetHeight()
|
||||
local offset
|
||||
|
||||
if viewheight > height then
|
||||
offset = 0
|
||||
else
|
||||
offset = floor((height - viewheight) / 1000.0 * value)
|
||||
end
|
||||
self.content:ClearAllPoints()
|
||||
self.content:SetPoint("TOPLEFT", self.scrollframe, "TOPLEFT", 0, offset)
|
||||
self.content:SetPoint("TOPRIGHT", self.scrollframe, "TOPRIGHT", 0, offset)
|
||||
status.offset = offset
|
||||
status.scrollvalue = value
|
||||
end
|
||||
|
||||
local function MoveScroll(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
|
||||
|
||||
if height > viewheight then
|
||||
self.scrollbar:Hide()
|
||||
else
|
||||
self.scrollbar:Show()
|
||||
local diff = height - viewheight
|
||||
local delta = 1
|
||||
if value < 0 then
|
||||
delta = -1
|
||||
end
|
||||
self.scrollbar:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function FixScroll(self)
|
||||
if self.updateLock then return end
|
||||
self.updateLock = true
|
||||
local status = self.status or self.localstatus
|
||||
local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
|
||||
local offset = status.offset or 0
|
||||
local curvalue = self.scrollbar:GetValue()
|
||||
if viewheight < height then
|
||||
if self.scrollBarShown then
|
||||
self.scrollBarShown = nil
|
||||
self.scrollbar:Hide()
|
||||
self.scrollbar:SetValue(0)
|
||||
self.scrollframe:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT",0,0)
|
||||
self:DoLayout()
|
||||
end
|
||||
else
|
||||
if not self.scrollBarShown then
|
||||
self.scrollBarShown = true
|
||||
self.scrollbar:Show()
|
||||
self.scrollframe:SetPoint("BOTTOMRIGHT", self.frame,"BOTTOMRIGHT",-20,0)
|
||||
self:DoLayout()
|
||||
end
|
||||
local value = (offset / (viewheight - height) * 1000)
|
||||
if value > 1000 then value = 1000 end
|
||||
self.scrollbar:SetValue(value)
|
||||
self:SetScroll(value)
|
||||
if value < 1000 then
|
||||
self.content:ClearAllPoints()
|
||||
self.content:SetPoint("TOPLEFT", self.scrollframe, "TOPLEFT", 0, offset)
|
||||
self.content:SetPoint("TOPRIGHT", self.scrollframe, "TOPRIGHT", 0, offset)
|
||||
status.offset = offset
|
||||
end
|
||||
end
|
||||
self.updateLock = nil
|
||||
end
|
||||
|
||||
local function OnMouseWheel(this, value)
|
||||
this.obj:MoveScroll(value)
|
||||
end
|
||||
|
||||
local function OnScrollValueChanged(this, value)
|
||||
this.obj:SetScroll(value)
|
||||
end
|
||||
|
||||
local function FixScrollOnUpdate(this)
|
||||
this:SetScript("OnUpdate", nil)
|
||||
this.obj:FixScroll()
|
||||
end
|
||||
|
||||
local function OnSizeChanged(this)
|
||||
this:SetScript("OnUpdate", FixScrollOnUpdate)
|
||||
end
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
self.content:SetHeight(height or 0 + 20)
|
||||
self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
if not status.scrollvalue then
|
||||
status.scrollvalue = 0
|
||||
end
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
content.width = width
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
content.height = height
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.MoveScroll = MoveScroll
|
||||
self.FixScroll = FixScroll
|
||||
self.SetScroll = SetScroll
|
||||
self.LayoutFinished = LayoutFinished
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
|
||||
self.localstatus = {}
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
--Container Support
|
||||
local scrollframe = CreateFrame("ScrollFrame", nil, frame)
|
||||
scrollframe.obj = self
|
||||
scrollframe:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, 0)
|
||||
scrollframe:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 0, 0)
|
||||
scrollframe:EnableMouseWheel(true)
|
||||
scrollframe:SetScript("OnMouseWheel", OnMouseWheel)
|
||||
scrollframe:SetScript("OnSizeChanged", OnSizeChanged)
|
||||
self.scrollframe = scrollframe
|
||||
|
||||
local content = CreateFrame("Frame", nil, scrollframe)
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT", scrollframe, "TOPLEFT", 0, 0)
|
||||
content:SetPoint("TOPRIGHT", scrollframe, "TOPRIGHT", 0, 0)
|
||||
content:SetHeight(400)
|
||||
self.content = content
|
||||
scrollframe:SetScrollChild(content)
|
||||
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local name = ("AceConfigDialogScrollFrame%dScrollBar"):format(num)
|
||||
local scrollbar = CreateFrame("Slider", name, scrollframe, "UIPanelScrollBarTemplate")
|
||||
scrollbar.obj = self
|
||||
scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16)
|
||||
scrollbar:SetPoint("BOTTOMLEFT", scrollframe, "BOTTOMRIGHT", 4, 16)
|
||||
scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
|
||||
scrollbar:SetMinMaxValues(0, 1000)
|
||||
scrollbar:SetValueStep(1)
|
||||
scrollbar:SetValue(0)
|
||||
scrollbar:SetWidth(16)
|
||||
scrollbar:Hide()
|
||||
self.scrollbar = scrollbar
|
||||
|
||||
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetTexture(0, 0, 0, 0.4)
|
||||
|
||||
self.localstatus.scrollvalue = 0
|
||||
|
||||
--self:FixScroll()
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
--AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -0,0 +1,99 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
Acquire() - Called when the object is aquired, should set everything to a default hidden state
|
||||
Release() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
type - the type of the object, same as the name given to :RegisterWidget()
|
||||
|
||||
Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
|
||||
It will be cleared automatically when a widget is released
|
||||
Placing values directly into a widget object should be avoided
|
||||
|
||||
If the Widget can act as a container for other Widgets the following
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
|
||||
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Simple Group --
|
||||
--------------------------
|
||||
--[[
|
||||
This is a simple grouping container, no selection, no borders
|
||||
It will resize automatically to the height of the controls added to it
|
||||
]]
|
||||
|
||||
do
|
||||
local Type = "SimpleGroup"
|
||||
local Version = 5
|
||||
|
||||
local function OnAcquire(self)
|
||||
self:SetWidth(300)
|
||||
self:SetHeight(100)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight(height or 0)
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
content:SetWidth(width)
|
||||
content.width = width
|
||||
end
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
content:SetHeight(height)
|
||||
content.height = height
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.frame = frame
|
||||
self.LayoutFinished = LayoutFinished
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,frame)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,14 +1,8 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Slider Widget
|
||||
Graphical Slider, like, for Range values.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Slider", 20
|
||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
local tonumber, pairs = tonumber, pairs
|
||||
local tonumber = tonumber
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
@@ -18,161 +12,126 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GameFontHighlightSmall
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function UpdateText(self)
|
||||
local value = self.value or 0
|
||||
if self.ispercent then
|
||||
self.editbox:SetText(("%s%%"):format(floor(value * 1000 + 0.5) / 10))
|
||||
else
|
||||
self.editbox:SetText(floor(value * 100 + 0.5) / 100)
|
||||
end
|
||||
end
|
||||
--------------------------
|
||||
-- Slider --
|
||||
--------------------------
|
||||
do
|
||||
local Type = "Slider"
|
||||
local Version = 10
|
||||
|
||||
local function UpdateLabels(self)
|
||||
local min, max = (self.min or 0), (self.max or 100)
|
||||
if self.ispercent then
|
||||
self.lowtext:SetFormattedText("%s%%", (min * 100))
|
||||
self.hightext:SetFormattedText("%s%%", (max * 100))
|
||||
else
|
||||
self.lowtext:SetText(min)
|
||||
self.hightext:SetText(max)
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Frame_OnMouseDown(frame)
|
||||
frame.obj.slider:EnableMouseWheel(true)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function Slider_OnValueChanged(frame)
|
||||
local self = frame.obj
|
||||
if not frame.setup then
|
||||
local newvalue = frame:GetValue()
|
||||
if newvalue ~= self.value and not self.disabled then
|
||||
self.value = newvalue
|
||||
self:Fire("OnValueChanged", newvalue)
|
||||
end
|
||||
if self.value then
|
||||
UpdateText(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function Slider_OnMouseUp(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnMouseUp", self.value)
|
||||
end
|
||||
|
||||
local function Slider_OnMouseWheel(frame, v)
|
||||
local self = frame.obj
|
||||
if not self.disabled then
|
||||
local value = self.value
|
||||
if v > 0 then
|
||||
value = min(value + (self.step or 1), self.max)
|
||||
else
|
||||
value = max(value - (self.step or 1), self.min)
|
||||
end
|
||||
self.slider:SetValue(value)
|
||||
end
|
||||
end
|
||||
|
||||
local function EditBox_OnEscapePressed(frame)
|
||||
frame:ClearFocus()
|
||||
end
|
||||
|
||||
local function EditBox_OnEnterPressed(frame)
|
||||
local self = frame.obj
|
||||
local value = frame:GetText()
|
||||
if self.ispercent then
|
||||
value = value:gsub('%%', '')
|
||||
value = tonumber(value) / 100
|
||||
else
|
||||
value = tonumber(value)
|
||||
end
|
||||
|
||||
if value then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
self.slider:SetValue(value)
|
||||
self:Fire("OnMouseUp", value)
|
||||
end
|
||||
end
|
||||
|
||||
local function EditBox_OnEnter(frame)
|
||||
frame:SetBackdropBorderColor(0.5, 0.5, 0.5, 1)
|
||||
end
|
||||
|
||||
local function EditBox_OnLeave(frame)
|
||||
frame:SetBackdropBorderColor(0.3, 0.3, 0.3, 0.8)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
local function OnAcquire(self)
|
||||
self:SetWidth(200)
|
||||
self:SetHeight(44)
|
||||
self:SetDisabled(false)
|
||||
self:SetIsPercent(nil)
|
||||
self:SetSliderValues(0,100,1)
|
||||
self:SetValue(0)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.slider:EnableMouseWheel(false)
|
||||
end,
|
||||
self:SetDisabled(false)
|
||||
end
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
local function Control_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local function Control_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function UpdateText(self)
|
||||
local value = self.value or 0
|
||||
if self.ispercent then
|
||||
self.editbox:SetText(("%s%%"):format(floor(value*1000+0.5)/10))
|
||||
else
|
||||
self.editbox:SetText(floor(value*100+0.5)/100)
|
||||
end
|
||||
end
|
||||
|
||||
local function UpdateLabels(self)
|
||||
local min, max = (self.min or 0), (self.max or 100)
|
||||
if self.ispercent then
|
||||
self.lowtext:SetFormattedText("%s%%",(min * 100))
|
||||
self.hightext:SetFormattedText("%s%%",(max * 100))
|
||||
else
|
||||
self.lowtext:SetText(min)
|
||||
self.hightext:SetText(max)
|
||||
end
|
||||
end
|
||||
|
||||
local function Slider_OnValueChanged(this)
|
||||
local self = this.obj
|
||||
if not this.setup then
|
||||
local newvalue
|
||||
newvalue = this:GetValue()
|
||||
if newvalue ~= self.value and not self.disabled then
|
||||
self.value = newvalue
|
||||
self:Fire("OnValueChanged", newvalue)
|
||||
end
|
||||
if self.value then
|
||||
local value = self.value
|
||||
UpdateText(self)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function Slider_OnMouseUp(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnMouseUp",this:GetValue())
|
||||
end
|
||||
|
||||
local function Slider_OnMouseWheel(this, v)
|
||||
local self = this.obj
|
||||
if not self.disabled then
|
||||
local value = self.value
|
||||
if v > 0 then
|
||||
value = min(value + (self.step or 1),self.max)
|
||||
else
|
||||
value = max(value - (self.step or 1), self.min)
|
||||
end
|
||||
self.slider:SetValue(value)
|
||||
end
|
||||
end
|
||||
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.slider:EnableMouse(false)
|
||||
self.label:SetTextColor(.5, .5, .5)
|
||||
self.hightext:SetTextColor(.5, .5, .5)
|
||||
self.lowtext:SetTextColor(.5, .5, .5)
|
||||
--self.valuetext:SetTextColor(.5, .5, .5)
|
||||
self.editbox:SetTextColor(.5, .5, .5)
|
||||
self.label:SetTextColor(.5,.5,.5)
|
||||
self.hightext:SetTextColor(.5,.5,.5)
|
||||
self.lowtext:SetTextColor(.5,.5,.5)
|
||||
--self.valuetext:SetTextColor(.5,.5,.5)
|
||||
self.editbox:SetTextColor(.5,.5,.5)
|
||||
self.editbox:EnableMouse(false)
|
||||
self.editbox:ClearFocus()
|
||||
else
|
||||
self.slider:EnableMouse(true)
|
||||
self.label:SetTextColor(1, .82, 0)
|
||||
self.hightext:SetTextColor(1, 1, 1)
|
||||
self.lowtext:SetTextColor(1, 1, 1)
|
||||
--self.valuetext:SetTextColor(1, 1, 1)
|
||||
self.editbox:SetTextColor(1, 1, 1)
|
||||
self.label:SetTextColor(1,.82,0)
|
||||
self.hightext:SetTextColor(1,1,1)
|
||||
self.lowtext:SetTextColor(1,1,1)
|
||||
--self.valuetext:SetTextColor(1,1,1)
|
||||
self.editbox:SetTextColor(1,1,1)
|
||||
self.editbox:EnableMouse(true)
|
||||
end
|
||||
end,
|
||||
end
|
||||
|
||||
["SetValue"] = function(self, value)
|
||||
local function SetValue(self, value)
|
||||
self.slider.setup = true
|
||||
self.slider:SetValue(value)
|
||||
self.value = value
|
||||
UpdateText(self)
|
||||
self.slider.setup = nil
|
||||
end,
|
||||
end
|
||||
|
||||
["GetValue"] = function(self)
|
||||
return self.value
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
local function SetLabel(self, text)
|
||||
self.label:SetText(text)
|
||||
end,
|
||||
end
|
||||
|
||||
["SetSliderValues"] = function(self, min, max, step)
|
||||
local function SetSliderValues(self, min, max, step)
|
||||
local frame = self.slider
|
||||
frame.setup = true
|
||||
self.min = min
|
||||
@@ -185,97 +144,141 @@ local methods = {
|
||||
frame:SetValue(self.value)
|
||||
end
|
||||
frame.setup = nil
|
||||
end,
|
||||
end
|
||||
|
||||
["SetIsPercent"] = function(self, value)
|
||||
local function EditBox_OnEscapePressed(this)
|
||||
this:ClearFocus()
|
||||
end
|
||||
|
||||
local function EditBox_OnEnterPressed(this)
|
||||
local self = this.obj
|
||||
local value = this:GetText()
|
||||
if self.ispercent then
|
||||
value = value:gsub('%%','')
|
||||
value = tonumber(value) / 100
|
||||
else
|
||||
value = tonumber(value)
|
||||
end
|
||||
|
||||
if value then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
self:Fire("OnMouseUp",value)
|
||||
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)
|
||||
UpdateText(self)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local SliderBackdrop = {
|
||||
local function FrameOnMouseDown(this)
|
||||
this.obj.slider:EnableMouseWheel(true)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local SliderBackdrop = {
|
||||
bgFile = "Interface\\Buttons\\UI-SliderBar-Background",
|
||||
edgeFile = "Interface\\Buttons\\UI-SliderBar-Border",
|
||||
tile = true, tileSize = 8, edgeSize = 8,
|
||||
insets = { left = 3, right = 3, top = 6, bottom = 6 }
|
||||
}
|
||||
}
|
||||
|
||||
local ManualBackdrop = {
|
||||
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 function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
self.SetDisabled = SetDisabled
|
||||
self.SetValue = SetValue
|
||||
self.SetSliderValues = SetSliderValues
|
||||
self.SetLabel = SetLabel
|
||||
self.SetIsPercent = SetIsPercent
|
||||
|
||||
self.alignoffset = 25
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnMouseDown", Frame_OnMouseDown)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
label:SetPoint("TOPLEFT")
|
||||
label:SetPoint("TOPRIGHT")
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetHeight(15)
|
||||
|
||||
local slider = CreateFrame("Slider", nil, frame)
|
||||
frame:SetScript("OnMouseDown",FrameOnMouseDown)
|
||||
self.slider = CreateFrame("Slider",nil,frame)
|
||||
local slider = self.slider
|
||||
slider:SetScript("OnEnter",Control_OnEnter)
|
||||
slider:SetScript("OnLeave",Control_OnLeave)
|
||||
slider:SetScript("OnMouseUp", Slider_OnMouseUp)
|
||||
slider.obj = self
|
||||
slider:SetOrientation("HORIZONTAL")
|
||||
slider:SetHeight(15)
|
||||
slider:SetHitRectInsets(0, 0, -10, 0)
|
||||
slider:SetHitRectInsets(0,0,-10,0)
|
||||
slider:SetBackdrop(SliderBackdrop)
|
||||
slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
|
||||
slider:SetPoint("TOP", label, "BOTTOM")
|
||||
slider:SetPoint("LEFT", 3, 0)
|
||||
slider:SetPoint("RIGHT", -3, 0)
|
||||
slider:SetValue(0)
|
||||
slider:SetScript("OnValueChanged",Slider_OnValueChanged)
|
||||
slider:SetScript("OnEnter", Control_OnEnter)
|
||||
slider:SetScript("OnLeave", Control_OnLeave)
|
||||
slider:SetScript("OnMouseUp", Slider_OnMouseUp)
|
||||
--slider:EnableMouseWheel(true)
|
||||
slider:SetScript("OnMouseWheel", Slider_OnMouseWheel)
|
||||
|
||||
local lowtext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||
lowtext:SetPoint("TOPLEFT", slider, "BOTTOMLEFT", 2, 3)
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetHeight(15)
|
||||
self.label = label
|
||||
|
||||
local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||
hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
|
||||
self.lowtext = slider:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall")
|
||||
self.lowtext:SetPoint("TOPLEFT",slider,"BOTTOMLEFT",2,3)
|
||||
|
||||
local editbox = CreateFrame("EditBox", nil, frame)
|
||||
self.hightext = slider:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall")
|
||||
self.hightext:SetPoint("TOPRIGHT",slider,"BOTTOMRIGHT",-2,3)
|
||||
|
||||
|
||||
local editbox = CreateFrame("EditBox",nil,frame)
|
||||
editbox:SetAutoFocus(false)
|
||||
editbox:SetFontObject(GameFontHighlightSmall)
|
||||
editbox:SetPoint("TOP", slider, "BOTTOM")
|
||||
editbox:SetPoint("TOP",slider,"BOTTOM",0,0)
|
||||
editbox:SetHeight(14)
|
||||
editbox:SetWidth(70)
|
||||
editbox:SetJustifyH("CENTER")
|
||||
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)
|
||||
editbox:SetScript("OnEnter", EditBox_OnEnter)
|
||||
editbox:SetScript("OnLeave", EditBox_OnLeave)
|
||||
editbox:SetScript("OnEnterPressed", EditBox_OnEnterPressed)
|
||||
editbox:SetScript("OnEscapePressed", EditBox_OnEscapePressed)
|
||||
editbox:SetBackdropColor(0,0,0,0.5)
|
||||
editbox:SetBackdropBorderColor(0.3,0.3,0.30,0.80)
|
||||
self.editbox = editbox
|
||||
editbox.obj = self
|
||||
|
||||
local widget = {
|
||||
label = label,
|
||||
slider = slider,
|
||||
lowtext = lowtext,
|
||||
hightext = hightext,
|
||||
editbox = editbox,
|
||||
alignoffset = 25,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Horizontal")
|
||||
|
||||
frame:SetWidth(200)
|
||||
frame:SetHeight(44)
|
||||
slider:SetPoint("TOP",label,"BOTTOM",0,0)
|
||||
slider:SetPoint("LEFT",frame,"LEFT",3,0)
|
||||
slider:SetPoint("RIGHT",frame,"RIGHT",-3,0)
|
||||
|
||||
|
||||
slider:SetValue(self.value or 0)
|
||||
slider:SetScript("OnValueChanged",Slider_OnValueChanged)
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
slider.obj, editbox.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
|
||||
@@ -0,0 +1,389 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, ipairs, assert, type = pairs, ipairs, assert, type
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
local _G = _G
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: PanelTemplates_TabResize, PanelTemplates_SetDisabledTabState, PanelTemplates_SelectTab, PanelTemplates_DeselectTab
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
Acquire() - Called when the object is aquired, should set everything to a default hidden state
|
||||
Release() - Called when the object is Released, should remove any anchors and hide the Widget
|
||||
|
||||
And the following members
|
||||
frame - the frame or derivitive object that will be treated as the widget for size and anchoring purposes
|
||||
type - the type of the object, same as the name given to :RegisterWidget()
|
||||
|
||||
Widgets contain a table called userdata, this is a safe place to store data associated with the wigdet
|
||||
It will be cleared automatically when a widget is released
|
||||
Placing values directly into a widget object should be avoided
|
||||
|
||||
If the Widget can act as a container for other Widgets the following
|
||||
content - frame or derivitive that children will be anchored to
|
||||
|
||||
The Widget can supply the following Optional Members
|
||||
|
||||
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Tab Group --
|
||||
--------------------------
|
||||
|
||||
do
|
||||
local Type = "TabGroup"
|
||||
local Version = 25
|
||||
|
||||
local PaneBackdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local function OnAcquire(self)
|
||||
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
self.tablist = nil
|
||||
for _, tab in pairs(self.tabs) do
|
||||
tab:Hide()
|
||||
end
|
||||
self:SetTitle()
|
||||
end
|
||||
|
||||
local function Tab_SetText(self, text)
|
||||
self:_SetText(text)
|
||||
local width = self.obj.frame.width or self.obj.frame:GetWidth() or 0
|
||||
PanelTemplates_TabResize(self, 0, nil, width)
|
||||
end
|
||||
|
||||
local function UpdateTabLook(self)
|
||||
if self.disabled then
|
||||
PanelTemplates_SetDisabledTabState(self)
|
||||
elseif self.selected then
|
||||
PanelTemplates_SelectTab(self)
|
||||
else
|
||||
PanelTemplates_DeselectTab(self)
|
||||
end
|
||||
end
|
||||
|
||||
local function Tab_SetSelected(self, selected)
|
||||
self.selected = selected
|
||||
UpdateTabLook(self)
|
||||
end
|
||||
|
||||
local function Tab_OnClick(self)
|
||||
if not (self.selected or self.disabled) then
|
||||
PlaySound("igCharacterInfoTab")
|
||||
self.obj:SelectTab(self.value)
|
||||
end
|
||||
end
|
||||
|
||||
local function Tab_SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
UpdateTabLook(self)
|
||||
end
|
||||
|
||||
local function Tab_OnEnter(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnTabEnter", self.tabs[this.id].value, this)
|
||||
end
|
||||
|
||||
local function Tab_OnLeave(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnTabLeave", self.tabs[this.id].value, this)
|
||||
end
|
||||
|
||||
local function Tab_OnShow(this)
|
||||
_G[this:GetName().."HighlightTexture"]:SetWidth(this:GetTextWidth() + 30)
|
||||
end
|
||||
|
||||
local function CreateTab(self, id)
|
||||
local tabname = "AceGUITabGroup"..self.num.."Tab"..id
|
||||
local tab = CreateFrame("Button",tabname,self.border,"OptionsFrameTabButtonTemplate")
|
||||
tab.obj = self
|
||||
tab.id = id
|
||||
|
||||
tab.text = _G[tabname .. "Text"]
|
||||
tab.text:ClearAllPoints()
|
||||
tab.text:SetPoint("LEFT", tab, "LEFT", 14, -3)
|
||||
tab.text:SetPoint("RIGHT", tab, "RIGHT", -12, -3)
|
||||
|
||||
tab:SetScript("OnClick",Tab_OnClick)
|
||||
tab:SetScript("OnEnter",Tab_OnEnter)
|
||||
tab:SetScript("OnLeave",Tab_OnLeave)
|
||||
tab:SetScript("OnShow", Tab_OnShow)
|
||||
|
||||
tab._SetText = tab.SetText
|
||||
tab.SetText = Tab_SetText
|
||||
tab.SetSelected = Tab_SetSelected
|
||||
tab.SetDisabled = Tab_SetDisabled
|
||||
|
||||
return tab
|
||||
end
|
||||
|
||||
local function SetTitle(self, text)
|
||||
self.titletext:SetText(text or "")
|
||||
if text and text ~= "" then
|
||||
self.alignoffset = 25
|
||||
else
|
||||
self.alignoffset = 18
|
||||
end
|
||||
self:BuildTabs()
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
end
|
||||
|
||||
local function SelectTab(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
|
||||
local found
|
||||
for i, v in ipairs(self.tabs) do
|
||||
if v.value == value then
|
||||
v:SetSelected(true)
|
||||
found = true
|
||||
else
|
||||
v:SetSelected(false)
|
||||
end
|
||||
end
|
||||
status.selected = value
|
||||
if found then
|
||||
self:Fire("OnGroupSelected",value)
|
||||
end
|
||||
end
|
||||
|
||||
local function SetTabs(self, tabs)
|
||||
self.tablist = tabs
|
||||
self:BuildTabs()
|
||||
end
|
||||
|
||||
|
||||
local widths = {}
|
||||
local rowwidths = {}
|
||||
local rowends = {}
|
||||
local function BuildTabs(self)
|
||||
local hastitle = (self.titletext:GetText() and self.titletext:GetText() ~= "")
|
||||
local status = self.status or self.localstatus
|
||||
local tablist = self.tablist
|
||||
local tabs = self.tabs
|
||||
|
||||
if not tablist then return end
|
||||
|
||||
local width = self.frame.width or self.frame:GetWidth() or 0
|
||||
|
||||
for i = #widths, 1, -1 do
|
||||
widths[i] = nil
|
||||
end
|
||||
for i = #rowwidths, 1, -1 do
|
||||
rowwidths[i] = nil
|
||||
end
|
||||
for i = #rowends, 1, -1 do
|
||||
rowends[i] = nil
|
||||
end
|
||||
|
||||
--Place Text into tabs and get thier initial width
|
||||
for i, v in ipairs(tablist) do
|
||||
local tab = tabs[i]
|
||||
if not tab then
|
||||
tab = self:CreateTab(i)
|
||||
tabs[i] = tab
|
||||
end
|
||||
|
||||
tab:Show()
|
||||
tab:SetText(v.text)
|
||||
tab:SetDisabled(v.disabled)
|
||||
tab.value = v.value
|
||||
|
||||
widths[i] = tab:GetWidth() - 6 --tabs are anchored 10 pixels from the right side of the previous one to reduce spacing, but add a fixed 4px padding for the text
|
||||
end
|
||||
|
||||
for i = (#tablist)+1, #tabs, 1 do
|
||||
tabs[i]:Hide()
|
||||
end
|
||||
|
||||
--First pass, find the minimum number of rows needed to hold all tabs and the initial tab layout
|
||||
local numtabs = #tablist
|
||||
local numrows = 1
|
||||
local usedwidth = 0
|
||||
|
||||
for i = 1, #tablist do
|
||||
--If this is not the first tab of a row and there isn't room for it
|
||||
if usedwidth ~= 0 and (width - usedwidth - widths[i]) < 0 then
|
||||
rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
|
||||
rowends[numrows] = i - 1
|
||||
numrows = numrows + 1
|
||||
usedwidth = 0
|
||||
end
|
||||
usedwidth = usedwidth + widths[i]
|
||||
end
|
||||
rowwidths[numrows] = usedwidth + 10 --first tab in each row takes up an extra 10px
|
||||
rowends[numrows] = #tablist
|
||||
|
||||
--Fix for single tabs being left on the last row, move a tab from the row above if applicable
|
||||
if numrows > 1 then
|
||||
--if the last row has only one tab
|
||||
if rowends[numrows-1] == numtabs-1 then
|
||||
--if there are more than 2 tabs in the 2nd last row
|
||||
if (numrows == 2 and rowends[numrows-1] > 2) or (rowends[numrows] - rowends[numrows-1] > 2) then
|
||||
--move 1 tab from the second last row to the last, if there is enough space
|
||||
if (rowwidths[numrows] + widths[numtabs-1]) <= width then
|
||||
rowends[numrows-1] = rowends[numrows-1] - 1
|
||||
rowwidths[numrows] = rowwidths[numrows] + widths[numtabs-1]
|
||||
rowwidths[numrows-1] = rowwidths[numrows-1] - widths[numtabs-1]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--anchor the rows as defined and resize tabs to fill thier row
|
||||
local starttab = 1
|
||||
for row, endtab in ipairs(rowends) do
|
||||
local first = true
|
||||
for tabno = starttab, endtab do
|
||||
local tab = tabs[tabno]
|
||||
tab:ClearAllPoints()
|
||||
if first then
|
||||
tab:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, -(hastitle and 14 or 7)-(row-1)*20 )
|
||||
first = false
|
||||
else
|
||||
tab:SetPoint("LEFT", tabs[tabno-1], "RIGHT", -10, 0)
|
||||
end
|
||||
end
|
||||
|
||||
-- equal padding for each tab to fill the available width,
|
||||
-- if the used space is above 75% already
|
||||
local padding = 0
|
||||
if not (numrows == 1 and rowwidths[1] < width*0.75) then
|
||||
padding = (width - rowwidths[row]) / (endtab - starttab+1)
|
||||
end
|
||||
|
||||
for i = starttab, endtab do
|
||||
PanelTemplates_TabResize(tabs[i], padding + 4, nil, width)
|
||||
end
|
||||
starttab = endtab + 1
|
||||
end
|
||||
|
||||
self.borderoffset = (hastitle and 17 or 10)+((numrows)*20)
|
||||
self.border:SetPoint("TOPLEFT",self.frame,"TOPLEFT",1,-self.borderoffset)
|
||||
end
|
||||
|
||||
local function BuildTabsOnUpdate(this)
|
||||
BuildTabs(this.obj)
|
||||
this:SetScript("OnUpdate", nil)
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 60
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
BuildTabs(self)
|
||||
self.frame:SetScript("OnUpdate", BuildTabsOnUpdate)
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - (self.borderoffset + 23)
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + (self.borderoffset + 23))
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
|
||||
self.num = AceGUI:GetNextWidgetNum(Type)
|
||||
|
||||
self.localstatus = {}
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetTitle = SetTitle
|
||||
self.CreateTab = CreateTab
|
||||
self.SelectTab = SelectTab
|
||||
self.BuildTabs = BuildTabs
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.SetTabs = SetTabs
|
||||
self.LayoutFinished = LayoutFinished
|
||||
self.frame = frame
|
||||
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
|
||||
frame.obj = self
|
||||
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
self.alignoffset = 18
|
||||
|
||||
local titletext = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT",frame,"TOPLEFT",14,0)
|
||||
titletext:SetPoint("TOPRIGHT",frame,"TOPRIGHT",-14,0)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
titletext:SetText("")
|
||||
|
||||
self.titletext = titletext
|
||||
|
||||
local border = CreateFrame("Frame",nil,frame)
|
||||
self.border = border
|
||||
self.borderoffset = 27
|
||||
border:SetPoint("TOPLEFT",frame,"TOPLEFT",1,-27)
|
||||
border:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-1,3)
|
||||
|
||||
border:SetBackdrop(PaneBackdrop)
|
||||
border:SetBackdropColor(0.1,0.1,0.1,0.5)
|
||||
border:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
|
||||
self.tabs = {}
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,border)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",border,"TOPLEFT",10,-7)
|
||||
content:SetPoint("BOTTOMRIGHT",border,"BOTTOMRIGHT",-10,7)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -0,0 +1,746 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
|
||||
local math_min, math_max, floor = math.min, math.max, floor
|
||||
local select, tremove, unpack = select, table.remove, unpack
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GameTooltip, FONT_COLOR_CODE_CLOSE
|
||||
|
||||
-- Recycling functions
|
||||
local new, del
|
||||
do
|
||||
local pool = setmetatable({},{__mode='k'})
|
||||
function new()
|
||||
local t = next(pool)
|
||||
if t then
|
||||
pool[t] = nil
|
||||
return t
|
||||
else
|
||||
return {}
|
||||
end
|
||||
end
|
||||
function del(t)
|
||||
for k in pairs(t) do
|
||||
t[k] = nil
|
||||
end
|
||||
pool[t] = true
|
||||
end
|
||||
end
|
||||
|
||||
--------------
|
||||
-- TreeView --
|
||||
--------------
|
||||
|
||||
do
|
||||
local Type = "TreeGroup"
|
||||
local Version = 23
|
||||
|
||||
local DEFAULT_TREE_WIDTH = 175
|
||||
local DEFAULT_TREE_SIZABLE = true
|
||||
|
||||
local PaneBackdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
|
||||
tile = true, tileSize = 16, edgeSize = 16,
|
||||
insets = { left = 3, right = 3, top = 5, bottom = 3 }
|
||||
}
|
||||
|
||||
local DraggerBackdrop = {
|
||||
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
|
||||
edgeFile = nil,
|
||||
tile = true, tileSize = 16, edgeSize = 0,
|
||||
insets = { left = 3, right = 3, top = 7, bottom = 7 }
|
||||
}
|
||||
|
||||
local function OnAcquire(self)
|
||||
self:SetTreeWidth(DEFAULT_TREE_WIDTH,DEFAULT_TREE_SIZABLE)
|
||||
self:EnableButtonTooltips(true)
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
self.status = nil
|
||||
for k, v in pairs(self.localstatus) do
|
||||
if k == "groups" then
|
||||
for k2 in pairs(v) do
|
||||
v[k2] = nil
|
||||
end
|
||||
else
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
end
|
||||
self.localstatus.scrollvalue = 0
|
||||
self.localstatus.treewidth = DEFAULT_TREE_WIDTH
|
||||
self.localstatus.treesizable = DEFAULT_TREE_SIZABLE
|
||||
end
|
||||
|
||||
local function GetButtonParents(line)
|
||||
local parent = line.parent
|
||||
if parent and parent.value then
|
||||
return parent.value, GetButtonParents(parent)
|
||||
end
|
||||
end
|
||||
|
||||
local function GetButtonUniqueValue(line)
|
||||
local parent = line.parent
|
||||
if parent and parent.value then
|
||||
return GetButtonUniqueValue(parent).."\001"..line.value
|
||||
else
|
||||
return line.value
|
||||
end
|
||||
end
|
||||
|
||||
local function ButtonOnClick(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnClick",this.uniquevalue, this.selected)
|
||||
if not this.selected then
|
||||
self:SetSelected(this.uniquevalue)
|
||||
this.selected = true
|
||||
this:LockHighlight()
|
||||
self:RefreshTree()
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function ExpandOnClick(this)
|
||||
local button = this.button
|
||||
local self = button.obj
|
||||
local status = (self.status or self.localstatus).groups
|
||||
status[button.uniquevalue] = not status[button.uniquevalue]
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
local function ButtonOnDoubleClick(button)
|
||||
local self = button.obj
|
||||
local status = self.status or self.localstatus
|
||||
local status = (self.status or self.localstatus).groups
|
||||
status[button.uniquevalue] = not status[button.uniquevalue]
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
local function EnableButtonTooltips(self, enable)
|
||||
self.enabletooltips = enable
|
||||
end
|
||||
|
||||
local function Button_OnEnter(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnButtonEnter", this.uniquevalue, this)
|
||||
|
||||
if self.enabletooltips then
|
||||
GameTooltip:SetOwner(this, "ANCHOR_NONE")
|
||||
GameTooltip:SetPoint("LEFT",this,"RIGHT")
|
||||
GameTooltip:SetText(this.text:GetText() or "", 1, .82, 0, 1)
|
||||
|
||||
GameTooltip:Show()
|
||||
end
|
||||
end
|
||||
|
||||
local function Button_OnLeave(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnButtonLeave", this.uniquevalue, this)
|
||||
|
||||
if self.enabletooltips then
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local buttoncount = 1
|
||||
local function CreateButton(self)
|
||||
local button = CreateFrame("Button",("AceGUI30TreeButton%d"):format(buttoncount),self.treeframe, "OptionsListButtonTemplate")
|
||||
buttoncount = buttoncount + 1
|
||||
button.obj = self
|
||||
|
||||
local icon = button:CreateTexture(nil, "OVERLAY")
|
||||
icon:SetWidth(14)
|
||||
icon:SetHeight(14)
|
||||
button.icon = icon
|
||||
|
||||
button:SetScript("OnClick",ButtonOnClick)
|
||||
button:SetScript("OnDoubleClick", ButtonOnDoubleClick)
|
||||
button:SetScript("OnEnter",Button_OnEnter)
|
||||
button:SetScript("OnLeave",Button_OnLeave)
|
||||
|
||||
button.toggle.button = button
|
||||
button.toggle:SetScript("OnClick",ExpandOnClick)
|
||||
|
||||
return button
|
||||
end
|
||||
|
||||
local function UpdateButton(button, treeline, selected, canExpand, isExpanded)
|
||||
local self = button.obj
|
||||
local toggle = button.toggle
|
||||
local frame = self.frame
|
||||
local text = treeline.text or ""
|
||||
local icon = treeline.icon
|
||||
local iconCoords = treeline.iconCoords
|
||||
local level = treeline.level
|
||||
local value = treeline.value
|
||||
local uniquevalue = treeline.uniquevalue
|
||||
local disabled = treeline.disabled
|
||||
|
||||
button.treeline = treeline
|
||||
button.value = value
|
||||
button.uniquevalue = uniquevalue
|
||||
if selected then
|
||||
button:LockHighlight()
|
||||
button.selected = true
|
||||
else
|
||||
button:UnlockHighlight()
|
||||
button.selected = false
|
||||
end
|
||||
local normalTexture = button:GetNormalTexture()
|
||||
local line = button.line
|
||||
button.level = level
|
||||
if ( level == 1 ) then
|
||||
button:SetNormalFontObject("GameFontNormal")
|
||||
button:SetHighlightFontObject("GameFontHighlight")
|
||||
button.text:SetPoint("LEFT", (icon and 16 or 0) + 8, 2)
|
||||
else
|
||||
button:SetNormalFontObject("GameFontHighlightSmall")
|
||||
button:SetHighlightFontObject("GameFontHighlightSmall")
|
||||
button.text:SetPoint("LEFT", (icon and 16 or 0) + 8 * level, 2)
|
||||
end
|
||||
|
||||
if disabled then
|
||||
button:EnableMouse(false)
|
||||
button.text:SetText("|cff808080"..text..FONT_COLOR_CODE_CLOSE)
|
||||
else
|
||||
button.text:SetText(text)
|
||||
button:EnableMouse(true)
|
||||
end
|
||||
|
||||
if icon then
|
||||
button.icon:SetTexture(icon)
|
||||
button.icon:SetPoint("LEFT", button, "LEFT", 8 * level, (level == 1) and 0 or 1)
|
||||
else
|
||||
button.icon:SetTexture(nil)
|
||||
end
|
||||
|
||||
if iconCoords then
|
||||
button.icon:SetTexCoord(unpack(iconCoords))
|
||||
else
|
||||
button.icon:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
|
||||
if canExpand then
|
||||
if not isExpanded then
|
||||
toggle:SetNormalTexture("Interface\\Buttons\\UI-PlusButton-UP")
|
||||
toggle:SetPushedTexture("Interface\\Buttons\\UI-PlusButton-DOWN")
|
||||
else
|
||||
toggle:SetNormalTexture("Interface\\Buttons\\UI-MinusButton-UP")
|
||||
toggle:SetPushedTexture("Interface\\Buttons\\UI-MinusButton-DOWN")
|
||||
end
|
||||
toggle:Show()
|
||||
else
|
||||
toggle:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function OnScrollValueChanged(this, value)
|
||||
if this.obj.noupdate then return end
|
||||
local self = this.obj
|
||||
local status = self.status or self.localstatus
|
||||
status.scrollvalue = value
|
||||
self:RefreshTree()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
if not status.groups then
|
||||
status.groups = {}
|
||||
end
|
||||
if not status.scrollvalue then
|
||||
status.scrollvalue = 0
|
||||
end
|
||||
if not status.treewidth then
|
||||
status.treewidth = DEFAULT_TREE_WIDTH
|
||||
end
|
||||
if not status.treesizable then
|
||||
status.treesizable = DEFAULT_TREE_SIZABLE
|
||||
end
|
||||
self:SetTreeWidth(status.treewidth,status.treesizable)
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
--sets the tree to be displayed
|
||||
--[[
|
||||
example tree
|
||||
|
||||
Alpha
|
||||
Bravo
|
||||
-Charlie
|
||||
-Delta
|
||||
-Echo
|
||||
Foxtrot
|
||||
|
||||
tree = {
|
||||
{
|
||||
value = "A",
|
||||
text = "Alpha"
|
||||
},
|
||||
{
|
||||
value = "B",
|
||||
text = "Bravo",
|
||||
children = {
|
||||
{
|
||||
value = "C",
|
||||
text = "Charlie"
|
||||
},
|
||||
{
|
||||
value = "D",
|
||||
text = "Delta"
|
||||
children = {
|
||||
{
|
||||
value = "E",
|
||||
text = "Echo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
value = "F",
|
||||
text = "Foxtrot"
|
||||
},
|
||||
}
|
||||
]]
|
||||
local function SetTree(self, tree, filter)
|
||||
self.filter = filter
|
||||
if tree then
|
||||
assert(type(tree) == "table")
|
||||
end
|
||||
self.tree = tree
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
local function ShouldDisplayLevel(tree)
|
||||
local result = false
|
||||
for k, v in ipairs(tree) do
|
||||
if v.children == nil and v.visible ~= false then
|
||||
result = true
|
||||
elseif v.children then
|
||||
result = result or ShouldDisplayLevel(v.children)
|
||||
end
|
||||
if result then return result end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function addLine(self, v, tree, level, parent)
|
||||
local line = new()
|
||||
line.value = v.value
|
||||
line.text = v.text
|
||||
line.icon = v.icon
|
||||
line.iconCoords = v.iconCoords
|
||||
line.disabled = v.disabled
|
||||
line.tree = tree
|
||||
line.level = level
|
||||
line.parent = parent
|
||||
line.visible = v.visible
|
||||
line.uniquevalue = GetButtonUniqueValue(line)
|
||||
if v.children then
|
||||
line.hasChildren = true
|
||||
else
|
||||
line.hasChildren = nil
|
||||
end
|
||||
self.lines[#self.lines+1] = line
|
||||
return line
|
||||
end
|
||||
|
||||
local function BuildLevel(self, tree, level, parent)
|
||||
local groups = (self.status or self.localstatus).groups
|
||||
local hasChildren = self.hasChildren
|
||||
|
||||
for i, v in ipairs(tree) do
|
||||
if v.children then
|
||||
if not self.filter or ShouldDisplayLevel(v.children) then
|
||||
local line = addLine(self, v, tree, level, parent)
|
||||
if groups[line.uniquevalue] then
|
||||
self:BuildLevel(v.children, level+1, line)
|
||||
end
|
||||
end
|
||||
elseif v.visible ~= false or not self.filter then
|
||||
addLine(self, v, tree, level, parent)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--fire an update after one frame to catch the treeframes height
|
||||
local function FirstFrameUpdate(this)
|
||||
local self = this.obj
|
||||
this:SetScript("OnUpdate",nil)
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
local function ResizeUpdate(this)
|
||||
this.obj:RefreshTree()
|
||||
end
|
||||
|
||||
local function RefreshTree(self)
|
||||
local buttons = self.buttons
|
||||
local lines = self.lines
|
||||
|
||||
for i, v in ipairs(buttons) do
|
||||
v:Hide()
|
||||
end
|
||||
while lines[1] do
|
||||
local t = tremove(lines)
|
||||
for k in pairs(t) do
|
||||
t[k] = nil
|
||||
end
|
||||
del(t)
|
||||
end
|
||||
|
||||
if not self.tree then return end
|
||||
--Build the list of visible entries from the tree and status tables
|
||||
local status = self.status or self.localstatus
|
||||
local groupstatus = status.groups
|
||||
local tree = self.tree
|
||||
|
||||
local treeframe = self.treeframe
|
||||
|
||||
self:BuildLevel(tree, 1)
|
||||
|
||||
local numlines = #lines
|
||||
|
||||
local maxlines = (floor(((self.treeframe:GetHeight()or 0) - 20 ) / 18))
|
||||
|
||||
local first, last
|
||||
|
||||
if numlines <= maxlines then
|
||||
--the whole tree fits in the frame
|
||||
status.scrollvalue = 0
|
||||
self:ShowScroll(false)
|
||||
first, last = 1, numlines
|
||||
else
|
||||
self:ShowScroll(true)
|
||||
--scrolling will be needed
|
||||
self.noupdate = true
|
||||
self.scrollbar:SetMinMaxValues(0, numlines - maxlines)
|
||||
--check if we are scrolled down too far
|
||||
if numlines - status.scrollvalue < maxlines then
|
||||
status.scrollvalue = numlines - maxlines
|
||||
self.scrollbar:SetValue(status.scrollvalue)
|
||||
end
|
||||
self.noupdate = nil
|
||||
first, last = status.scrollvalue+1, status.scrollvalue + maxlines
|
||||
end
|
||||
|
||||
local buttonnum = 1
|
||||
for i = first, last do
|
||||
local line = lines[i]
|
||||
local button = buttons[buttonnum]
|
||||
if not button then
|
||||
button = self:CreateButton()
|
||||
|
||||
buttons[buttonnum] = button
|
||||
button:SetParent(treeframe)
|
||||
button:SetFrameLevel(treeframe:GetFrameLevel()+1)
|
||||
button:ClearAllPoints()
|
||||
if i == 1 then
|
||||
if self.showscroll then
|
||||
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
|
||||
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
|
||||
else
|
||||
button:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
|
||||
button:SetPoint("TOPLEFT", self.treeframe, "TOPLEFT", 0, -10)
|
||||
end
|
||||
else
|
||||
button:SetPoint("TOPRIGHT", buttons[buttonnum-1], "BOTTOMRIGHT",0,0)
|
||||
button:SetPoint("TOPLEFT", buttons[buttonnum-1], "BOTTOMLEFT",0,0)
|
||||
end
|
||||
end
|
||||
|
||||
UpdateButton(button, line, status.selected == line.uniquevalue, line.hasChildren, groupstatus[line.uniquevalue] )
|
||||
button:Show()
|
||||
buttonnum = buttonnum + 1
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
local function SetSelected(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
if status.selected ~= value then
|
||||
status.selected = value
|
||||
self:Fire("OnGroupSelected", value)
|
||||
end
|
||||
end
|
||||
|
||||
local function BuildUniqueValue(...)
|
||||
local n = select('#', ...)
|
||||
if n == 1 then
|
||||
return ...
|
||||
else
|
||||
return (...).."\001"..BuildUniqueValue(select(2,...))
|
||||
end
|
||||
end
|
||||
|
||||
local function Select(self, uniquevalue, ...)
|
||||
self.filter = false
|
||||
local status = self.status or self.localstatus
|
||||
local groups = status.groups
|
||||
for i = 1, select('#', ...) do
|
||||
groups[BuildUniqueValue(select(i, ...))] = true
|
||||
end
|
||||
status.selected = uniquevalue
|
||||
self:RefreshTree()
|
||||
self:Fire("OnGroupSelected", uniquevalue)
|
||||
end
|
||||
|
||||
local function SelectByPath(self, ...)
|
||||
self:Select(BuildUniqueValue(...), ...)
|
||||
end
|
||||
|
||||
--Selects a tree node by UniqueValue
|
||||
local function SelectByValue(self, uniquevalue)
|
||||
self:Select(uniquevalue, ("\001"):split(uniquevalue))
|
||||
end
|
||||
|
||||
|
||||
local function ShowScroll(self, show)
|
||||
self.showscroll = show
|
||||
if show then
|
||||
self.scrollbar:Show()
|
||||
if self.buttons[1] then
|
||||
self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",-22,-10)
|
||||
end
|
||||
else
|
||||
self.scrollbar:Hide()
|
||||
if self.buttons[1] then
|
||||
self.buttons[1]:SetPoint("TOPRIGHT", self.treeframe,"TOPRIGHT",0,-10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local treeframe = self.treeframe
|
||||
local status = self.status or self.localstatus
|
||||
status.fullwidth = width
|
||||
|
||||
local contentwidth = width - status.treewidth - 20
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
|
||||
local maxtreewidth = math_min(400, width - 50)
|
||||
|
||||
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
|
||||
self:SetTreeWidth(maxtreewidth, status.treesizable)
|
||||
end
|
||||
treeframe:SetMaxResize(maxtreewidth,1600)
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 20
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
|
||||
local function TreeOnMouseWheel(this, delta)
|
||||
local self = this.obj
|
||||
if self.showscroll then
|
||||
local scrollbar = self.scrollbar
|
||||
local min, max = scrollbar:GetMinMaxValues()
|
||||
local value = scrollbar:GetValue()
|
||||
local newvalue = math_min(max,math_max(min,value - delta))
|
||||
if value ~= newvalue then
|
||||
scrollbar:SetValue(newvalue)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function SetTreeWidth(self, treewidth, resizable)
|
||||
if not resizable then
|
||||
if type(treewidth) == 'number' then
|
||||
resizable = false
|
||||
elseif type(treewidth) == 'boolean' then
|
||||
resizable = treewidth
|
||||
treewidth = DEFAULT_TREE_WIDTH
|
||||
else
|
||||
resizable = false
|
||||
treewidth = DEFAULT_TREE_WIDTH
|
||||
end
|
||||
end
|
||||
self.treeframe:SetWidth(treewidth)
|
||||
self.dragger:EnableMouse(resizable)
|
||||
|
||||
local status = self.status or self.localstatus
|
||||
status.treewidth = treewidth
|
||||
status.treesizable = resizable
|
||||
|
||||
-- recalculate the content width
|
||||
if status.fullwidth then
|
||||
self:OnWidthSet(status.fullwidth)
|
||||
end
|
||||
end
|
||||
|
||||
local function draggerLeave(this)
|
||||
this:SetBackdropColor(1, 1, 1, 0)
|
||||
end
|
||||
|
||||
local function draggerEnter(this)
|
||||
this:SetBackdropColor(1, 1, 1, 0.8)
|
||||
end
|
||||
|
||||
local function draggerDown(this)
|
||||
local treeframe = this:GetParent()
|
||||
treeframe:StartSizing("RIGHT")
|
||||
end
|
||||
|
||||
local function draggerUp(this)
|
||||
local treeframe = this:GetParent()
|
||||
local self = treeframe.obj
|
||||
local frame = treeframe:GetParent()
|
||||
treeframe:StopMovingOrSizing()
|
||||
--treeframe:SetScript("OnUpdate", nil)
|
||||
treeframe:SetUserPlaced(false)
|
||||
--Without this :GetHeight will get stuck on the current height, causing the tree contents to not resize
|
||||
treeframe:SetHeight(0)
|
||||
treeframe:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
treeframe:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
|
||||
|
||||
local status = self.status or self.localstatus
|
||||
status.treewidth = treeframe:GetWidth()
|
||||
|
||||
treeframe.obj:Fire("OnTreeResize",treeframe:GetWidth())
|
||||
-- recalculate the content width
|
||||
treeframe.obj:OnWidthSet(status.fullwidth)
|
||||
-- update the layout of the content
|
||||
treeframe.obj:DoLayout()
|
||||
end
|
||||
|
||||
local function LayoutFinished(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + 20)
|
||||
end
|
||||
|
||||
local createdcount = 0
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = Type
|
||||
self.lines = {}
|
||||
self.levels = {}
|
||||
self.buttons = {}
|
||||
self.hasChildren = {}
|
||||
self.localstatus = {}
|
||||
self.localstatus.groups = {}
|
||||
self.filter = false
|
||||
|
||||
local treeframe = CreateFrame("Frame",nil,frame)
|
||||
treeframe.obj = self
|
||||
treeframe:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
treeframe:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
|
||||
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
||||
treeframe:SetScript("OnUpdate",FirstFrameUpdate)
|
||||
treeframe:SetScript("OnSizeChanged",ResizeUpdate)
|
||||
|
||||
treeframe:EnableMouseWheel(true)
|
||||
treeframe:SetScript("OnMouseWheel", TreeOnMouseWheel)
|
||||
treeframe:SetBackdrop(PaneBackdrop)
|
||||
treeframe:SetBackdropColor(0.1,0.1,0.1,0.5)
|
||||
treeframe:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
|
||||
treeframe:SetResizable(true)
|
||||
treeframe:SetMinResize(100, 1)
|
||||
treeframe:SetMaxResize(400,1600)
|
||||
local dragger = CreateFrame("Frame", nil, treeframe)
|
||||
dragger:SetWidth(8)
|
||||
dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
|
||||
dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
|
||||
dragger:SetBackdrop(DraggerBackdrop)
|
||||
dragger:SetBackdropColor(1, 1, 1, 0)
|
||||
dragger:SetScript("OnMouseDown", draggerDown)
|
||||
dragger:SetScript("OnMouseUp", draggerUp)
|
||||
dragger:SetScript("OnEnter", draggerEnter)
|
||||
dragger:SetScript("OnLeave", draggerLeave)
|
||||
|
||||
self.dragger = dragger
|
||||
self.treeframe = treeframe
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.SetTree = SetTree
|
||||
self.SetTreeWidth = SetTreeWidth
|
||||
self.RefreshTree = RefreshTree
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.BuildLevel = BuildLevel
|
||||
self.CreateButton = CreateButton
|
||||
self.SetSelected = SetSelected
|
||||
self.ShowScroll = ShowScroll
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.Select = Select
|
||||
self.SelectByValue = SelectByValue
|
||||
self.SelectByPath = SelectByPath
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
self.EnableButtonTooltips = EnableButtonTooltips
|
||||
--self.Filter = Filter
|
||||
self.LayoutFinished = LayoutFinished
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
createdcount = createdcount + 1
|
||||
local scrollbar = CreateFrame("Slider",("AceConfigDialogTreeGroup%dScrollBar"):format(createdcount),treeframe,"UIPanelScrollBarTemplate")
|
||||
self.scrollbar = scrollbar
|
||||
local scrollbg = scrollbar:CreateTexture(nil,"BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetTexture(0,0,0,0.4)
|
||||
scrollbar.obj = self
|
||||
self.noupdate = true
|
||||
scrollbar:SetPoint("TOPRIGHT",treeframe,"TOPRIGHT",-10,-26)
|
||||
scrollbar:SetPoint("BOTTOMRIGHT",treeframe,"BOTTOMRIGHT",-10,26)
|
||||
scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
|
||||
scrollbar:SetMinMaxValues(0,0)
|
||||
self.localstatus.scrollvalue = 0
|
||||
scrollbar:SetValueStep(1)
|
||||
scrollbar:SetValue(0)
|
||||
scrollbar:SetWidth(16)
|
||||
self.noupdate = nil
|
||||
|
||||
local border = CreateFrame("Frame",nil,frame)
|
||||
self.border = border
|
||||
border:SetPoint("TOPLEFT",treeframe,"TOPRIGHT", 0,0)
|
||||
border:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
|
||||
border:SetBackdrop(PaneBackdrop)
|
||||
border:SetBackdropColor(0.1,0.1,0.1,0.5)
|
||||
border:SetBackdropBorderColor(0.4,0.4,0.4)
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,border)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",border,"TOPLEFT",10,-10)
|
||||
content:SetPoint("BOTTOMRIGHT",border,"BOTTOMRIGHT",-10,10)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
--AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -0,0 +1,331 @@
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, assert, type = pairs, assert, type
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GameFontNormal
|
||||
|
||||
----------------
|
||||
-- Main Frame --
|
||||
----------------
|
||||
--[[
|
||||
Events :
|
||||
OnClose
|
||||
|
||||
]]
|
||||
do
|
||||
local Type = "Window"
|
||||
local Version = 4
|
||||
|
||||
local function frameOnClose(this)
|
||||
this.obj:Fire("OnClose")
|
||||
end
|
||||
|
||||
local function closeOnClick(this)
|
||||
PlaySound("gsTitleOptionExit")
|
||||
this.obj:Hide()
|
||||
end
|
||||
|
||||
local function frameOnMouseDown(this)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function titleOnMouseDown(this)
|
||||
this:GetParent():StartMoving()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function frameOnMouseUp(this)
|
||||
local frame = this:GetParent()
|
||||
frame:StopMovingOrSizing()
|
||||
local self = frame.obj
|
||||
local status = self.status or self.localstatus
|
||||
status.width = frame:GetWidth()
|
||||
status.height = frame:GetHeight()
|
||||
status.top = frame:GetTop()
|
||||
status.left = frame:GetLeft()
|
||||
end
|
||||
|
||||
local function sizerseOnMouseDown(this)
|
||||
this:GetParent():StartSizing("BOTTOMRIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function sizersOnMouseDown(this)
|
||||
this:GetParent():StartSizing("BOTTOM")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function sizereOnMouseDown(this)
|
||||
this:GetParent():StartSizing("RIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function sizerOnMouseUp(this)
|
||||
this:GetParent():StopMovingOrSizing()
|
||||
end
|
||||
|
||||
local function SetTitle(self,title)
|
||||
self.titletext:SetText(title)
|
||||
end
|
||||
|
||||
local function SetStatusText(self,text)
|
||||
-- self.statustext:SetText(text)
|
||||
end
|
||||
|
||||
local function Hide(self)
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
local function Show(self)
|
||||
self.frame:Show()
|
||||
end
|
||||
|
||||
local function OnAcquire(self)
|
||||
self.frame:SetParent(UIParent)
|
||||
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
self:ApplyStatus()
|
||||
self:EnableResize(true)
|
||||
self:Show()
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- called to set an external table to store status in
|
||||
local function SetStatusTable(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
self:ApplyStatus()
|
||||
end
|
||||
|
||||
local function ApplyStatus(self)
|
||||
local status = self.status or self.localstatus
|
||||
local frame = self.frame
|
||||
self:SetWidth(status.width or 700)
|
||||
self:SetHeight(status.height or 500)
|
||||
if status.top and status.left then
|
||||
frame:SetPoint("TOP",UIParent,"BOTTOM",0,status.top)
|
||||
frame:SetPoint("LEFT",UIParent,"LEFT",status.left,0)
|
||||
else
|
||||
frame:SetPoint("CENTER",UIParent,"CENTER")
|
||||
end
|
||||
end
|
||||
|
||||
local function OnWidthSet(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 34
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end
|
||||
|
||||
|
||||
local function OnHeightSet(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 57
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
|
||||
local function EnableResize(self, state)
|
||||
local func = state and "Show" or "Hide"
|
||||
self.sizer_se[func](self.sizer_se)
|
||||
self.sizer_s[func](self.sizer_s)
|
||||
self.sizer_e[func](self.sizer_e)
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
local self = {}
|
||||
self.type = "Window"
|
||||
|
||||
self.Hide = Hide
|
||||
self.Show = Show
|
||||
self.SetTitle = SetTitle
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
self.SetStatusText = SetStatusText
|
||||
self.SetStatusTable = SetStatusTable
|
||||
self.ApplyStatus = ApplyStatus
|
||||
self.OnWidthSet = OnWidthSet
|
||||
self.OnHeightSet = OnHeightSet
|
||||
self.EnableResize = EnableResize
|
||||
|
||||
self.localstatus = {}
|
||||
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
frame:SetWidth(700)
|
||||
frame:SetHeight(500)
|
||||
frame:SetPoint("CENTER",UIParent,"CENTER",0,0)
|
||||
frame:EnableMouse()
|
||||
frame:SetMovable(true)
|
||||
frame:SetResizable(true)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
frame:SetScript("OnMouseDown", frameOnMouseDown)
|
||||
|
||||
frame:SetScript("OnHide",frameOnClose)
|
||||
frame:SetMinResize(240,240)
|
||||
frame:SetToplevel(true)
|
||||
|
||||
local titlebg = frame:CreateTexture(nil, "BACKGROUND")
|
||||
titlebg:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Title-Background]])
|
||||
titlebg:SetPoint("TOPLEFT", 9, -6)
|
||||
titlebg:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", -28, -24)
|
||||
|
||||
local dialogbg = frame:CreateTexture(nil, "BACKGROUND")
|
||||
dialogbg:SetTexture([[Interface\Tooltips\UI-Tooltip-Background]])
|
||||
dialogbg:SetPoint("TOPLEFT", 8, -24)
|
||||
dialogbg:SetPoint("BOTTOMRIGHT", -6, 8)
|
||||
dialogbg:SetVertexColor(0, 0, 0, .75)
|
||||
|
||||
local topleft = frame:CreateTexture(nil, "BORDER")
|
||||
topleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
topleft:SetWidth(64)
|
||||
topleft:SetHeight(64)
|
||||
topleft:SetPoint("TOPLEFT")
|
||||
topleft:SetTexCoord(0.501953125, 0.625, 0, 1)
|
||||
|
||||
local topright = frame:CreateTexture(nil, "BORDER")
|
||||
topright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
topright:SetWidth(64)
|
||||
topright:SetHeight(64)
|
||||
topright:SetPoint("TOPRIGHT")
|
||||
topright:SetTexCoord(0.625, 0.75, 0, 1)
|
||||
|
||||
local top = frame:CreateTexture(nil, "BORDER")
|
||||
top:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
top:SetHeight(64)
|
||||
top:SetPoint("TOPLEFT", topleft, "TOPRIGHT")
|
||||
top:SetPoint("TOPRIGHT", topright, "TOPLEFT")
|
||||
top:SetTexCoord(0.25, 0.369140625, 0, 1)
|
||||
|
||||
local bottomleft = frame:CreateTexture(nil, "BORDER")
|
||||
bottomleft:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
bottomleft:SetWidth(64)
|
||||
bottomleft:SetHeight(64)
|
||||
bottomleft:SetPoint("BOTTOMLEFT")
|
||||
bottomleft:SetTexCoord(0.751953125, 0.875, 0, 1)
|
||||
|
||||
local bottomright = frame:CreateTexture(nil, "BORDER")
|
||||
bottomright:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
bottomright:SetWidth(64)
|
||||
bottomright:SetHeight(64)
|
||||
bottomright:SetPoint("BOTTOMRIGHT")
|
||||
bottomright:SetTexCoord(0.875, 1, 0, 1)
|
||||
|
||||
local bottom = frame:CreateTexture(nil, "BORDER")
|
||||
bottom:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
bottom:SetHeight(64)
|
||||
bottom:SetPoint("BOTTOMLEFT", bottomleft, "BOTTOMRIGHT")
|
||||
bottom:SetPoint("BOTTOMRIGHT", bottomright, "BOTTOMLEFT")
|
||||
bottom:SetTexCoord(0.376953125, 0.498046875, 0, 1)
|
||||
|
||||
local left = frame:CreateTexture(nil, "BORDER")
|
||||
left:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
left:SetWidth(64)
|
||||
left:SetPoint("TOPLEFT", topleft, "BOTTOMLEFT")
|
||||
left:SetPoint("BOTTOMLEFT", bottomleft, "TOPLEFT")
|
||||
left:SetTexCoord(0.001953125, 0.125, 0, 1)
|
||||
|
||||
local right = frame:CreateTexture(nil, "BORDER")
|
||||
right:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-Border]])
|
||||
right:SetWidth(64)
|
||||
right:SetPoint("TOPRIGHT", topright, "BOTTOMRIGHT")
|
||||
right:SetPoint("BOTTOMRIGHT", bottomright, "TOPRIGHT")
|
||||
right:SetTexCoord(0.1171875, 0.2421875, 0, 1)
|
||||
|
||||
local close = CreateFrame("Button", nil, frame, "UIPanelCloseButton")
|
||||
close:SetPoint("TOPRIGHT", 2, 1)
|
||||
close:SetScript("OnClick", closeOnClick)
|
||||
self.closebutton = close
|
||||
close.obj = self
|
||||
|
||||
local titletext = frame:CreateFontString(nil, "ARTWORK")
|
||||
titletext:SetFontObject(GameFontNormal)
|
||||
titletext:SetPoint("TOPLEFT", 12, -8)
|
||||
titletext:SetPoint("TOPRIGHT", -32, -8)
|
||||
self.titletext = titletext
|
||||
|
||||
local title = CreateFrame("Button", nil, frame)
|
||||
title:SetPoint("TOPLEFT", titlebg)
|
||||
title:SetPoint("BOTTOMRIGHT", titlebg)
|
||||
title:EnableMouse()
|
||||
title:SetScript("OnMouseDown",titleOnMouseDown)
|
||||
title:SetScript("OnMouseUp", frameOnMouseUp)
|
||||
self.title = title
|
||||
|
||||
local sizer_se = CreateFrame("Frame",nil,frame)
|
||||
sizer_se:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,0)
|
||||
sizer_se:SetWidth(25)
|
||||
sizer_se:SetHeight(25)
|
||||
sizer_se:EnableMouse()
|
||||
sizer_se:SetScript("OnMouseDown",sizerseOnMouseDown)
|
||||
sizer_se:SetScript("OnMouseUp", sizerOnMouseUp)
|
||||
self.sizer_se = sizer_se
|
||||
|
||||
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
|
||||
self.line1 = line1
|
||||
line1:SetWidth(14)
|
||||
line1:SetHeight(14)
|
||||
line1:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||
line1:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
local x = 0.1 * 14/17
|
||||
line1:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||
|
||||
local line2 = sizer_se:CreateTexture(nil, "BACKGROUND")
|
||||
self.line2 = line2
|
||||
line2:SetWidth(8)
|
||||
line2:SetHeight(8)
|
||||
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||
line2:SetTexture("Interface\\Tooltips\\UI-Tooltip-Border")
|
||||
local x = 0.1 * 8/17
|
||||
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||
|
||||
local sizer_s = CreateFrame("Frame",nil,frame)
|
||||
sizer_s:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-25,0)
|
||||
sizer_s:SetPoint("BOTTOMLEFT",frame,"BOTTOMLEFT",0,0)
|
||||
sizer_s:SetHeight(25)
|
||||
sizer_s:EnableMouse()
|
||||
sizer_s:SetScript("OnMouseDown",sizersOnMouseDown)
|
||||
sizer_s:SetScript("OnMouseUp", sizerOnMouseUp)
|
||||
self.sizer_s = sizer_s
|
||||
|
||||
local sizer_e = CreateFrame("Frame",nil,frame)
|
||||
sizer_e:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",0,25)
|
||||
sizer_e:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
|
||||
sizer_e:SetWidth(25)
|
||||
sizer_e:EnableMouse()
|
||||
sizer_e:SetScript("OnMouseDown",sizereOnMouseDown)
|
||||
sizer_e:SetScript("OnMouseUp", sizerOnMouseUp)
|
||||
self.sizer_e = sizer_e
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame",nil,frame)
|
||||
self.content = content
|
||||
content.obj = self
|
||||
content:SetPoint("TOPLEFT",frame,"TOPLEFT",12,-32)
|
||||
content:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-12,13)
|
||||
|
||||
AceGUI:RegisterAsContainer(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
end
|
||||
@@ -1,5 +1,5 @@
|
||||
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 6
|
||||
--[[ $Id: CallbackHandler-1.0.lua 895 2009-12-06 16:28:55Z nevcairiel $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 5
|
||||
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not CallbackHandler then return end -- No upgrade needed
|
||||
@@ -147,9 +147,9 @@ function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAll
|
||||
regfunc = function(...) self[method](self,...) end
|
||||
end
|
||||
else
|
||||
-- function ref with self=object or self="addonId" or self=thread
|
||||
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
|
||||
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
|
||||
-- function ref with self=object or self="addonId"
|
||||
if type(self)~="table" and type(self)~="string" then
|
||||
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string expected.", 2)
|
||||
end
|
||||
|
||||
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
Name: LibBabble-Inventory-3.0
|
||||
Revision: $Rev: 104 $
|
||||
Revision: $Rev: 101 $
|
||||
Maintainers: ckknight, nevcairiel, Ackis
|
||||
Website: http://www.wowace.com/projects/libbabble-inventory-3-0/
|
||||
Dependencies: None
|
||||
@@ -8,7 +8,7 @@ License: MIT
|
||||
]]
|
||||
|
||||
local MAJOR_VERSION = "LibBabble-Inventory-3.0"
|
||||
local MINOR_VERSION = 90000 + tonumber(("$Rev: 104 $"):match("%d+"))
|
||||
local MINOR_VERSION = 90000 + tonumber(("$Rev: 101 $"):match("%d+"))
|
||||
|
||||
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
||||
local lib = LibStub("LibBabble-3.0"):New(MAJOR_VERSION, MINOR_VERSION)
|
||||
@@ -166,7 +166,7 @@ if GAME_LOCALE == "enUS" then
|
||||
lib:SetCurrentTranslations(true)
|
||||
elseif GAME_LOCALE == "deDE" then
|
||||
lib:SetCurrentTranslations {
|
||||
Alchemy = "Alchimie",
|
||||
Alchemy = "Alchemie",
|
||||
["Ammo Pouch"] = "Munitionsbeutel",
|
||||
Armor = "Rüstung",
|
||||
["Armor Enchantment"] = "Rüstungsverzauberung",
|
||||
@@ -210,7 +210,7 @@ elseif GAME_LOCALE == "deDE" then
|
||||
["Fist Weapons"] = "Faustwaffen",
|
||||
Flask = "Fläschchen",
|
||||
Food = "Essen",
|
||||
["Food & Drink"] = "Speis & Trank",
|
||||
["Food & Drink"] = "Essen & Trinken",
|
||||
Gem = "Edelstein",
|
||||
["Gem Bag"] = "Edelsteintasche",
|
||||
Glyph = "Glyphe",
|
||||
@@ -314,7 +314,7 @@ elseif GAME_LOCALE == "frFR" then
|
||||
Alchemy = "Alchimie",
|
||||
["Ammo Pouch"] = "Giberne",
|
||||
Armor = "Armure",
|
||||
["Armor Enchantment"] = "Enchantement d'armure",
|
||||
["Armor Enchantment"] = "Enchantements d'armure",
|
||||
Arrow = "Flèche",
|
||||
Axe = "Hache",
|
||||
Back = "Dos",
|
||||
@@ -336,15 +336,15 @@ elseif GAME_LOCALE == "frFR" then
|
||||
Dagger = "Dague",
|
||||
Daggers = "Dagues",
|
||||
["Death Knight"] = "Chevalier de la mort",
|
||||
Devices = "Appareils",
|
||||
Devices = "Élémentaire",
|
||||
Drink = "Breuvage",
|
||||
Druid = "Druide",
|
||||
Elemental = "Élémentaire",
|
||||
Elixir = "Élixir",
|
||||
Enchanting = "Enchantement",
|
||||
["Enchanting Bag"] = "Sac d'enchanteur",
|
||||
["Enchanting Bag"] = "Sac d'enchantement",
|
||||
Engineering = "Ingénierie",
|
||||
["Engineering Bag"] = "Sac d'ingénieur",
|
||||
["Engineering Bag"] = "Sac d'ingéniérie",
|
||||
Explosives = "Explosifs",
|
||||
Feet = "Pieds",
|
||||
["First Aid"] = "Secourisme",
|
||||
@@ -378,7 +378,7 @@ elseif GAME_LOCALE == "frFR" then
|
||||
Key = "Clé",
|
||||
Leather = "Cuir",
|
||||
Leatherworking = "Travail du cuir",
|
||||
["Leatherworking Bag"] = "Sac de travail du cuir",
|
||||
["Leatherworking Bag"] = "Sac de travailleur du cuir",
|
||||
Legs = "Jambes",
|
||||
Libram = "Libram",
|
||||
Librams = "Librams",
|
||||
@@ -450,14 +450,14 @@ elseif GAME_LOCALE == "frFR" then
|
||||
Warlock = "Démoniste",
|
||||
Warrior = "Guerrier",
|
||||
Weapon = "Arme",
|
||||
["Weapon Enchantment"] = "Enchantement d'arme",
|
||||
["Weapon Enchantment"] = "Enchantements d'arme",
|
||||
Wrist = "Poignets",
|
||||
Yellow = "Jaune",
|
||||
}
|
||||
elseif GAME_LOCALE == "koKR" then
|
||||
lib:SetCurrentTranslations {
|
||||
Alchemy = "연금술",
|
||||
["Ammo Pouch"] = "탄환 주머니", -- Needs review
|
||||
["Ammo Pouch"] = "탄약 주머니",
|
||||
Armor = "방어구",
|
||||
["Armor Enchantment"] = "방어구 마부",
|
||||
Arrow = "화살",
|
||||
@@ -473,24 +473,24 @@ elseif GAME_LOCALE == "koKR" then
|
||||
Bullet = "탄환",
|
||||
Chest = "가슴",
|
||||
Cloth = "천",
|
||||
Consumable = "소비 용품", -- Needs review
|
||||
Container = "가방", -- Needs review
|
||||
Consumable = "소비용품",
|
||||
Container = "보관함",
|
||||
Cooking = "요리",
|
||||
Crossbow = "석궁",
|
||||
Crossbows = "석궁류",
|
||||
Dagger = "단검",
|
||||
Daggers = "단검류",
|
||||
["Death Knight"] = "죽음의 기사",
|
||||
Devices = "장치", -- Needs review
|
||||
Devices = "기계 장치",
|
||||
Drink = "음료",
|
||||
Druid = "드루이드",
|
||||
Elemental = "원소",
|
||||
Elixir = "영약", -- Needs review
|
||||
Elixir = "비약",
|
||||
Enchanting = "마법부여",
|
||||
["Enchanting Bag"] = "마법부여 가방",
|
||||
Engineering = "기계공학",
|
||||
["Engineering Bag"] = "기계공학 가방",
|
||||
Explosives = "폭탄", -- Needs review
|
||||
Explosives = "폭발물",
|
||||
Feet = "발",
|
||||
["First Aid"] = "응급치료",
|
||||
Fishing = "낚시",
|
||||
@@ -498,7 +498,7 @@ elseif GAME_LOCALE == "koKR" then
|
||||
["Fishing Poles"] = "낚싯대",
|
||||
["Fist Weapon"] = "장착 무기",
|
||||
["Fist Weapons"] = "장착 무기류",
|
||||
Flask = "비약", -- Needs review
|
||||
Flask = "영약",
|
||||
Food = "음식",
|
||||
["Food & Drink"] = "음식과 음료",
|
||||
Gem = "보석",
|
||||
@@ -516,7 +516,7 @@ elseif GAME_LOCALE == "koKR" then
|
||||
Hunter = "사냥꾼",
|
||||
Idol = "우상",
|
||||
Idols = "우상",
|
||||
["Inscription Bag"] = "주문각인 가방", -- Needs review
|
||||
["Inscription Bag"] = "주문각인사의 가방",
|
||||
["Item Enhancement"] = "아이템 강화",
|
||||
Jewelcrafting = "보석세공",
|
||||
Junk = "잡동사니",
|
||||
@@ -583,7 +583,7 @@ elseif GAME_LOCALE == "koKR" then
|
||||
Thrown = "투척 무기",
|
||||
Totem = "토템",
|
||||
Totems = "토템",
|
||||
["Trade Goods"] = "직업 용품", -- Needs review
|
||||
["Trade Goods"] = "직업용품",
|
||||
Trinket = "장신구",
|
||||
["Two-Hand"] = "양손",
|
||||
["Two-Handed Axes"] = "양손 도끼류",
|
||||
@@ -602,7 +602,7 @@ elseif GAME_LOCALE == "koKR" then
|
||||
elseif GAME_LOCALE == "esES" then
|
||||
lib:SetCurrentTranslations {
|
||||
Alchemy = "Alquimia",
|
||||
["Ammo Pouch"] = "Bolsa de munición",
|
||||
["Ammo Pouch"] = "Bolsa de Munición",
|
||||
Armor = "Armadura",
|
||||
["Armor Enchantment"] = "Encantamiento de Armadura",
|
||||
Arrow = "Flecha",
|
||||
@@ -632,9 +632,9 @@ elseif GAME_LOCALE == "esES" then
|
||||
Elemental = "Elemental",
|
||||
Elixir = "Elixir",
|
||||
Enchanting = "Encantamiento",
|
||||
["Enchanting Bag"] = "Bolsa de encantamiento",
|
||||
["Enchanting Bag"] = "Bolsa de Encantamiento",
|
||||
Engineering = "Ingeniería",
|
||||
["Engineering Bag"] = "Bolsa de ingeniería",
|
||||
["Engineering Bag"] = "Bolsa de Ingeniería",
|
||||
Explosives = "Explosivos",
|
||||
Feet = "Pies",
|
||||
["First Aid"] = "Primeros auxilios",
|
||||
@@ -647,7 +647,7 @@ elseif GAME_LOCALE == "esES" then
|
||||
Food = "Comida",
|
||||
["Food & Drink"] = "Comida y bebida",
|
||||
Gem = "Gema",
|
||||
["Gem Bag"] = "Bolsa de gemas",
|
||||
["Gem Bag"] = "Bolsa de Gemas",
|
||||
Glyph = "Glifo",
|
||||
Green = "Verde",
|
||||
Gun = "Pistola",
|
||||
@@ -656,19 +656,19 @@ elseif GAME_LOCALE == "esES" then
|
||||
Head = "Cabeza",
|
||||
["Held in Off-Hand"] = "Sostener con la mano izquierda",
|
||||
Herb = "Herbalísmo",
|
||||
["Herb Bag"] = "Bolsa de hierbas",
|
||||
["Herb Bag"] = "Bolsa de Hierbas",
|
||||
Holiday = "Festivo",
|
||||
Hunter = "Cazador",
|
||||
Idol = "Ídolo",
|
||||
Idols = "Ídolos",
|
||||
["Inscription Bag"] = "Bolsa de inscripción",
|
||||
["Inscription Bag"] = "Bolsa de Inscripción",
|
||||
["Item Enhancement"] = "Mejora de Objeto",
|
||||
Jewelcrafting = "Joyería",
|
||||
Junk = "Basura",
|
||||
Key = "Llave",
|
||||
Leather = "Cuero",
|
||||
Leatherworking = "Peletería",
|
||||
["Leatherworking Bag"] = "Bolsa de peletería",
|
||||
["Leatherworking Bag"] = "Bolsa de Peletería",
|
||||
Legs = "Piernas",
|
||||
Libram = "Tratado",
|
||||
Librams = "Tratados",
|
||||
@@ -680,8 +680,8 @@ elseif GAME_LOCALE == "esES" then
|
||||
Meat = "Carne",
|
||||
Meta = "Meta",
|
||||
["Metal & Stone"] = "Metal y Piedra",
|
||||
["Mining Bag"] = "Bolsa de minería",
|
||||
Miscellaneous = "Misceláneas",
|
||||
["Mining Bag"] = "Bolsa de Minería",
|
||||
Miscellaneous = "Miscelánea",
|
||||
Mount = "Montura",
|
||||
Neck = "Cuello",
|
||||
["Off Hand"] = "Mano Izquierda",
|
||||
@@ -719,7 +719,7 @@ elseif GAME_LOCALE == "esES" then
|
||||
Shoulder = "Hombros",
|
||||
Sigils = "Sigilos",
|
||||
Simple = "Simple",
|
||||
["Soul Bag"] = "Bolsa de almas",
|
||||
["Soul Bag"] = "Bolsa de Almas",
|
||||
Staff = "Bastón",
|
||||
Staves = "Bastones",
|
||||
Sword = "Espada",
|
||||
@@ -777,9 +777,9 @@ elseif GAME_LOCALE == "esMX" then
|
||||
Elemental = "Elemental",
|
||||
Elixir = "Elixir",
|
||||
Enchanting = "Encantamiento",
|
||||
["Enchanting Bag"] = "Bolsa de encantamiento",
|
||||
["Enchanting Bag"] = "Bolsa de Encantamiento",
|
||||
Engineering = "Ingeniería",
|
||||
["Engineering Bag"] = "Bolsa de ingeniería",
|
||||
["Engineering Bag"] = "Bolsa de Ingeniería",
|
||||
Explosives = "Explosivos",
|
||||
Feet = "Pies",
|
||||
["First Aid"] = "Primeros auxilios",
|
||||
@@ -801,12 +801,12 @@ elseif GAME_LOCALE == "esMX" then
|
||||
Head = "Cabeza",
|
||||
["Held in Off-Hand"] = "Sostener con la mano izquierda",
|
||||
Herb = "Herbalísmo",
|
||||
["Herb Bag"] = "Bolsa de hierbas",
|
||||
["Herb Bag"] = "Bolsa de Hierbas",
|
||||
Holiday = "Festivo",
|
||||
Hunter = "Cazador",
|
||||
Idol = "Ãdolo",
|
||||
Idols = "Ãdolos",
|
||||
["Inscription Bag"] = "Bolsa de inscripción",
|
||||
["Inscription Bag"] = "Bolsa de Inscripción",
|
||||
["Item Enhancement"] = "Mejora de Objeto",
|
||||
Jewelcrafting = "Joyería",
|
||||
Junk = "Basura",
|
||||
@@ -894,8 +894,8 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Alchemy = "Алхимия",
|
||||
["Ammo Pouch"] = "Подсумок",
|
||||
Armor = "Доспехи",
|
||||
["Armor Enchantment"] = "Чары для оружия",
|
||||
Arrow = "Стрелы",
|
||||
["Armor Enchantment"] = "Чары для доспехов",
|
||||
Arrow = "Стрела",
|
||||
Axe = "Топор",
|
||||
Back = "Спина",
|
||||
Bag = "Сумка",
|
||||
@@ -905,10 +905,10 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Book = "Книга",
|
||||
Bow = "Лук",
|
||||
Bows = "Луки",
|
||||
Bullet = "Пули",
|
||||
Bullet = "Пуля",
|
||||
Chest = "Грудь",
|
||||
Cloth = "Ткань",
|
||||
Consumable = "Расходуемые",
|
||||
Consumable = "Потребляемые",
|
||||
Container = "Сумки",
|
||||
Cooking = "Кулинария",
|
||||
Crossbow = "Арбалет",
|
||||
@@ -924,7 +924,7 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Enchanting = "Наложение чар",
|
||||
["Enchanting Bag"] = "Сумка зачаровывателя",
|
||||
Engineering = "Механика",
|
||||
["Engineering Bag"] = "Сумка инженера",
|
||||
["Engineering Bag"] = "Сумка механика",
|
||||
Explosives = "Взрывчатка",
|
||||
Feet = "Ступни",
|
||||
["First Aid"] = "Первая помощь",
|
||||
@@ -970,7 +970,7 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Meat = "Мясо",
|
||||
Meta = "Особый",
|
||||
["Metal & Stone"] = "Металл и камень",
|
||||
["Mining Bag"] = "Сумка шахтера",
|
||||
["Mining Bag"] = "Шахтерская сумка",
|
||||
Miscellaneous = "Разное",
|
||||
Mount = "Верховые животные",
|
||||
Neck = "Шея",
|
||||
@@ -983,7 +983,7 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Other = "Другое",
|
||||
Paladin = "Паладин",
|
||||
Parts = "Детали",
|
||||
Pet = "Питомцы",
|
||||
Pet = "Питомец",
|
||||
Plate = "Латы",
|
||||
Polearm = "Древковое",
|
||||
Polearms = "Древковое",
|
||||
@@ -993,9 +993,9 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Projectile = "Боеприпасы",
|
||||
Purple = "Фиолетовый",
|
||||
Quest = "Задания",
|
||||
Quiver = "Амуниция",
|
||||
Quiver = "Колчан",
|
||||
Ranged = "Для оружия дальнего боя",
|
||||
Reagent = "Реагенты",
|
||||
Reagent = "Реагент",
|
||||
Recipe = "Рецепты",
|
||||
Red = "Красный",
|
||||
Relic = "Реликвия",
|
||||
@@ -1030,7 +1030,7 @@ elseif GAME_LOCALE == "ruRU" then
|
||||
Warlock = "Чернокнижник",
|
||||
Warrior = "Воин",
|
||||
Weapon = "Оружие",
|
||||
["Weapon Enchantment"] = "Чары для доспехов",
|
||||
["Weapon Enchantment"] = "Чары для оружия\009",
|
||||
Wrist = "Запястья",
|
||||
Yellow = "Желтый",
|
||||
}
|
||||
@@ -1182,7 +1182,7 @@ elseif GAME_LOCALE == "zhCN" then
|
||||
elseif GAME_LOCALE == "zhTW" then
|
||||
lib:SetCurrentTranslations {
|
||||
Alchemy = "鍊金術",
|
||||
["Ammo Pouch"] = "彈藥包",
|
||||
["Ammo Pouch"] = "彈藥袋",
|
||||
Armor = "護甲",
|
||||
["Armor Enchantment"] = "護甲附魔",
|
||||
Arrow = "箭",
|
||||
@@ -1197,7 +1197,7 @@ elseif GAME_LOCALE == "zhTW" then
|
||||
Bows = "弓",
|
||||
Bullet = "子彈",
|
||||
Chest = "胸部",
|
||||
Cloth = "布料",
|
||||
Cloth = "布甲",
|
||||
Consumable = "消耗品",
|
||||
Container = "容器",
|
||||
Cooking = "烹飪",
|
||||
@@ -1215,7 +1215,7 @@ elseif GAME_LOCALE == "zhTW" then
|
||||
["Enchanting Bag"] = "附魔包",
|
||||
Engineering = "工程學",
|
||||
["Engineering Bag"] = "工程包",
|
||||
Explosives = "爆炸物",
|
||||
Explosives = "爆裂物",
|
||||
Feet = "腳",
|
||||
["First Aid"] = "急救",
|
||||
Fishing = "釣魚",
|
||||
@@ -1227,7 +1227,7 @@ elseif GAME_LOCALE == "zhTW" then
|
||||
Food = "食物",
|
||||
["Food & Drink"] = "食物和飲料",
|
||||
Gem = "寶石",
|
||||
["Gem Bag"] = "寶石包",
|
||||
["Gem Bag"] = "寶石背包",
|
||||
Glyph = "雕紋",
|
||||
Green = "綠色",
|
||||
Gun = "槍械",
|
||||
@@ -1246,7 +1246,7 @@ elseif GAME_LOCALE == "zhTW" then
|
||||
Jewelcrafting = "珠寶設計",
|
||||
Junk = "垃圾",
|
||||
Key = "鑰匙",
|
||||
Leather = "皮革",
|
||||
Leather = "皮甲",
|
||||
Leatherworking = "製皮",
|
||||
["Leatherworking Bag"] = "製皮包",
|
||||
Legs = "腿部",
|
||||
@@ -1259,10 +1259,10 @@ elseif GAME_LOCALE == "zhTW" then
|
||||
Materials = "原料",
|
||||
Meat = "肉類",
|
||||
Meta = "變換",
|
||||
["Metal & Stone"] = "金屬與石頭",
|
||||
["Metal & Stone"] = "金屬和石頭",
|
||||
["Mining Bag"] = "礦石包",
|
||||
Miscellaneous = "其他",
|
||||
Mount = "座騎",
|
||||
Mount = "坐騎",
|
||||
Neck = "頸部",
|
||||
["Off Hand"] = "副手",
|
||||
["One-Hand"] = "單手",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
## Interface: 40000
|
||||
## Interface: 30300
|
||||
## LoadOnDemand: 1
|
||||
## Title: Lib: Babble-Inventory-3.0
|
||||
## Notes: A library to help with localization of item types and subtypes.
|
||||
@@ -7,7 +7,7 @@
|
||||
## X-eMail: ckknight@gmail.com
|
||||
## X-Category: Library
|
||||
## X-License: MIT
|
||||
## X-Curse-Packaged-Version: r106
|
||||
## X-Curse-Packaged-Version: r101
|
||||
## X-Curse-Project-Name: LibBabble-Inventory-3.0
|
||||
## X-Curse-Project-ID: libbabble-inventory-3-0
|
||||
## X-Curse-Repository-ID: wow/libbabble-inventory-3-0/mainline
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
-- LibStub is a simple versioning stub meant for use in Libraries. http://www.wowace.com/wiki/LibStub for more info
|
||||
-- LibStub is hereby placed in the Public Domain Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel, joshborke
|
||||
local LIBSTUB_MAJOR, LIBSTUB_MINOR = "LibStub", 2 -- NEVER MAKE THIS AN SVN REVISION! IT NEEDS TO BE USABLE IN ALL REPOS!
|
||||
local LibStub = _G[LIBSTUB_MAJOR]
|
||||
|
||||
if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
||||
LibStub = LibStub or {libs = {}, minors = {} }
|
||||
_G[LIBSTUB_MAJOR] = LibStub
|
||||
LibStub.minor = LIBSTUB_MINOR
|
||||
|
||||
function LibStub:NewLibrary(major, minor)
|
||||
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
|
||||
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
|
||||
|
||||
local oldminor = self.minors[major]
|
||||
if oldminor and oldminor >= minor then return nil end
|
||||
self.minors[major], self.libs[major] = minor, self.libs[major] or {}
|
||||
return self.libs[major], oldminor
|
||||
end
|
||||
|
||||
function LibStub:GetLibrary(major, silent)
|
||||
if not self.libs[major] and not silent then
|
||||
error(("Cannot find a library instance of %q."):format(tostring(major)), 2)
|
||||
end
|
||||
return self.libs[major], self.minors[major]
|
||||
end
|
||||
|
||||
function LibStub:IterateLibraries() return pairs(self.libs) end
|
||||
setmetatable(LibStub, { __call = LibStub.GetLibrary })
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||
..\FrameXML\UI.xsd">
|
||||
|
||||
<Script file="LibStatLogic-1.1.lua"/>
|
||||
|
||||
</Ui>
|
||||
@@ -1,10 +1,10 @@
|
||||
--[[
|
||||
Name: LibTipHooker-1.1.lua
|
||||
Description: A Library for hooking tooltips.
|
||||
Revision: $Revision: 14 $
|
||||
Revision: $Revision: 11 $
|
||||
Author: Whitetooth
|
||||
Email: hotdogee [at] gmail [dot] com
|
||||
LastUpdate: $Date: 2010-10-22 16:07:10 +0000 (Fri, 22 Oct 2010) $
|
||||
LastUpdate: $Date: 2009-08-31 06:43:54 +0000 (Mon, 31 Aug 2009) $
|
||||
Website:
|
||||
Documentation:
|
||||
SVN: $URL $
|
||||
@@ -32,7 +32,7 @@ For a complete item scanning solution to stat scanning you can use ItemBonusLib
|
||||
|
||||
|
||||
local MAJOR = "LibTipHooker-1.1"
|
||||
local MINOR = "$Revision: 14 $"
|
||||
local MINOR = "$Revision: 11 $"
|
||||
|
||||
local TipHooker = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
if not TipHooker then return end -- this file is older version
|
||||
@@ -134,8 +134,6 @@ local MethodList = {
|
||||
-- 3.0
|
||||
"SetCurrencyToken",
|
||||
"SetBackpackToken",
|
||||
-- 4.0
|
||||
"SetReforgeItem",
|
||||
},
|
||||
buff = {
|
||||
"SetPlayerBuff",
|
||||
|
||||
Reference in New Issue
Block a user