init
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,79 @@
|
||||
------------------------------------------------------------------------
|
||||
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
|
||||
------------------------------------------------------------------------
|
||||
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 151 KiB |
@@ -0,0 +1,726 @@
|
||||
--[[
|
||||
Name: RatingBuster deDE locale
|
||||
Revision: $Revision: 295 $
|
||||
Translated by:
|
||||
- Kuja
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "deDE")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "顯示物品編號",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "RatingBuster Optionen"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "Waterfall-1.0 wird zum Anzeigen der GUI benötigt"
|
||||
L["Enabled"] = "Aktiviert"
|
||||
L["Suspend/resume this addon"] = "Stoppt/Aktiviert dieses Addon"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = "Immer"
|
||||
L["ALT Key"] = "Alt Taste"
|
||||
L["CTRL Key"] = "Strg Taste"
|
||||
L["SHIFT Key"] = "Shift Taste"
|
||||
L["Never"] = "Nie"
|
||||
L["General Settings"] = "Allgemeine Einstellungen"
|
||||
L["Profiles"] = "Profile"
|
||||
-- /rb win
|
||||
L["Options Window"] = "Optionsfenster"
|
||||
L["Shows the Options Window"] = "Zeigt das Optionsfenster"
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = "Verstecke Blizzard Gegenstandsvergleich"
|
||||
L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = "Deaktiviert den Gegenstandsvergleich von Blizzard, wenn der eingebaute Vergleichstooltip verwendet wird"
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "Aktiviere Stat Mods"
|
||||
L["Enable support for Stat Mods"] = "Aktiviert die Unterstützung von Stat Mods"
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "Aktiviere Diminishing Returns für Vermeidung"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "Ausweichen, Parieren und Treffervermeidung wird über die Diminishing Returns (Abnehmende Wirkung) Formel berechnet"
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "Zeige ItemID"
|
||||
L["Show the ItemID in tooltips"] = "Zeigt ItemID im Tooltip"
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "Zeige ItemLevel"
|
||||
L["Show the ItemLevel in tooltips"] = "Zeigt ItemLevel im Tooltip"
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "Nutze benötigten Level"
|
||||
L["Calculate using the required level if you are below the required level"] = "Berechne auf Basis des benötigten Levels, falls du unter diesem bist"
|
||||
-- /rb level
|
||||
L["Set Level"] = "Setze Level"
|
||||
L["Set the level used in calculations (0 = your level)"] = "Legt den Level der zur Berechnung benutzt wird fest (0 = dein Level)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "Wertung"
|
||||
L["Options for Rating display"] = "Optionen für die Wertungsanzeige"
|
||||
-- /rb rating show
|
||||
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"
|
||||
-- /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"
|
||||
-- /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 exp
|
||||
L["Expertise Breakdown"] = "Waffenkundeanalyse"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "Wandle Waffenkunde in Ausweich- und Pariermissachtung um"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "Ändere Textfarbe"
|
||||
L["Changes the color of added text"] = "Ändert die Textfarbe des hinzugefügten Textes"
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "Wähle Farbe"
|
||||
L["Pick a color"] = "Wähle eine Farbe"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "Farbe aktivieren"
|
||||
L["Enable colored text"] = "Aktiviert gefärbten Text"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "Werteumrechnung"
|
||||
L["Changes the display of base stats"] = "Ändert die Anzeige der Basiswerte"
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "Zeige Basiswertumrechnung"
|
||||
L["Show base stat conversions in tooltips"] = "Zeige Basiswertumrechnung im Tooltip"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "Stärke"
|
||||
L["Changes the display of Strength"] = "Ändert die Anzeige von Stärke"
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "Zeige Angriffskraft"
|
||||
L["Show Attack Power from Strength"] = "Zeige Angriffskraft, resultierend aus Stärke"
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "Zeige Blockwert"
|
||||
L["Show Block Value from Strength"] = "Zeige Blockwert, resultierend aus Stärke"
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "Zeige Zauberschaden"
|
||||
L["Show Spell Damage from Strength"] = "Zeige Zauberschaden, resultierend aus Stärke"
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "Zeige Heilung"
|
||||
L["Show Healing from Strength"] = "Zeige Heilung, resultierend aus Stärke"
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "Zeige Parieren"
|
||||
L["Show Parry from Strength"] = "Zeige Parieren, resultierend aus Stärke"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "Beweglichkeit"
|
||||
L["Changes the display of Agility"] = "Ändert die Anzeige von Beweglichkeit"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "Zeige kritische Trefferchance"
|
||||
L["Show Crit chance from Agility"] = "Zeige Chance auf kritische Treffer, resultierend aus Beweglichkeit"
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "Zeige Ausweichen"
|
||||
L["Show Dodge chance from Agility"] = "Zeige Ausweichchance, resultierend aus Beweglichkeit"
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "Zeige Angriffskraft"
|
||||
L["Show Attack Power from Agility"] = "Zeige Angriffskraft, resultierend aus Beweglichkeit"
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "Zeige Distanzangriffskraft"
|
||||
L["Show Ranged Attack Power from Agility"] = "Zeige Distanzangriffskraft, resultierend aus Beweglichkeit"
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "Zeige Rüstung"
|
||||
L["Show Armor from Agility"] = "Zeige Rüstung, resultierend aus Beweglichkeit"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "Zeige Heilung"
|
||||
L["Show Healing from Agility"] = "Zeige Heilung, resultierend aus Beweglichkeit"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "Ausdauer"
|
||||
L["Changes the display of Stamina"] = "Ändert die Anzeige von Ausdauer"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "Zeige Leben"
|
||||
L["Show Health from Stamina"] = "Zeige Leben, resultierend aus Ausdauer"
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "Zeige Zauberschaden"
|
||||
L["Show Spell Damage from Stamina"] = "Zeige Zauberschaden, resultierend aus Ausdauer"
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "Zeige Heilung"
|
||||
L["Show Healing from Stamina"] = "Zeige Heilung, resultierend aus Ausdauer"
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "Zeige Angriffskraft"
|
||||
L["Show Attack Power from Stamina"] = "Zeige Angriffskraft, resultierend aus Ausdauer"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "Intelligenz"
|
||||
L["Changes the display of Intellect"] = "Ändert die Anzeige von Intelligenz"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "Zeige kritische Zaubertrefferchance"
|
||||
L["Show Spell Crit chance from Intellect"] = "Zeige Chance auf kritische Zaubertreffer, resultierend aus Intelligenz"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "Zeige Mana"
|
||||
L["Show Mana from Intellect"] = "Zeige Mana, resultierend aus Intelligenz"
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "Zeige Zauberschaden"
|
||||
L["Show Spell Damage from Intellect"] = "Zeige Zauberschaden, resultierend aus Intelligenz"
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "Zeige Heilung"
|
||||
L["Show Healing from Intellect"] = "Zeige Heilung, resultierend aus Intelligenz"
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "Zeige Manaregeneration"
|
||||
L["Show Mana Regen while casting from Intellect"] = "Zeige Manaregeneration beim Zaubern, resultierend aus Intelligenz"
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Zeige Manaregeneration (nicht zaubernd)"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "Zeige Manaregeneration (nicht zaubernd), resultierend aus Intelligenz"
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "Zeige Distanzangriffskraft"
|
||||
L["Show Ranged Attack Power from Intellect"] = "Zeige Distanzangriffskraft, resultierend aus Intelligenz"
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "Zeige Rüstung"
|
||||
L["Show Armor from Intellect"] = "Zeige Rüstung, resultierend aus Intelligenz"
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "Zeige Angriffskraft"
|
||||
L["Show Attack Power from Intellect"] = "Zeige Angriffskraft, resultierend aus Intelligenz"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "Willenskraft"
|
||||
L["Changes the display of Spirit"] = "Ändert die Anzeige von Willenskraft"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "Zeige Manaregeneration"
|
||||
L["Show Mana Regen while casting from Spirit"] = "Zeige Manaregeneration während des Zauberns, resultierend aus Willenskraft"
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Zeige Manaregeneration (nicht zaubernd)"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "Zeige Manaregeneration (nicht zaubernd), resultierend aus Willenskraft"
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "Zeige Lebensregeneration"
|
||||
L["Show Health Regen from Spirit"] = "Zeige Lebensregeneration, resultierend aus Willenskraft"
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "Zeige Zauberschaden"
|
||||
L["Show Spell Damage from Spirit"] = "Zeige Zauberschaden, resultierend aus Willenskraft"
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "Zeige Heilung"
|
||||
L["Show Healing from Spirit"] = "Zeige Heilung, resultierend aus Willenskraft"
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = "Zeige kritische Zaubertrefferchance"
|
||||
L["Show Spell Crit chance from Spirit"] = "Zeige Chance auf kritische Zaubertreffer, resultierend aus Willenskraft"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = "Rüstung"
|
||||
L["Changes the display of Armor"] = "Ändert die Anzeige von Rüstung"
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = "Zeige Angriffskraft"
|
||||
L["Show Attack Power from Armor"] = "Zeige Angriffskraft, resultierend aus Rüstung"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "Werteübersicht"
|
||||
L["Options for stat summary"] = "Optionen für die Werteübersicht"
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "Zeige Werteübersicht"
|
||||
L["Show stat summary in tooltips"] = "Zeige Werteübersicht im Tooltip"
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "Ignoriereinstellungen"
|
||||
L["Ignore stuff when calculating the stat summary"] = "Ignoriere Werte bei der Berechnung der Werteübersicht"
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = "Ignoriere ungewünschte Gegenstände"
|
||||
L["Hide stat summary for undesirable items"] = "Verstecke die Werteübersicht für ungewünschte Gegenstände"
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = "Minimale Gegenstandsqualität"
|
||||
L["Show stat summary only for selected quality items and up"] = "Zeige Werteübersicht nur für die ausgewählte Qualität und höher"
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = "Rüstungsklasse"
|
||||
L["Select armor types you want to ignore"] = "Wähle Rüstungsklassen, die ignoriert werden sollen"
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = "Ignoriere Stoff"
|
||||
L["Hide stat summary for all cloth armor"] = "Verstecke die Werteübersicht für alle Rüstungen aus Stoff"
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = "Ignoriere Leder"
|
||||
L["Hide stat summary for all leather armor"] = "Verstecke die Werteübersicht für alle Rüstungen aus Leder"
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = "Ignoriere Schwere Rüstung"
|
||||
L["Hide stat summary for all mail armor"] = "Verstecke die Werteübersicht für alle Rüstungen aus Schwerer Rüstung"
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = "Ignoriere Platte"
|
||||
L["Hide stat summary for all plate armor"] = "Verstecke die Werteübersicht für alle Rüstungen aus Platte"
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "Ignoriere angelegte Gegenstände"
|
||||
L["Hide stat summary for equipped items"] = "Verstecke Werteübersicht für angelegte Gegenstände"
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "Ignoriere Verzauberungen"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "Ignoriere Verzauberungen auf Gegenständen für die Berechnung der Werteübersicht"
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "Ignoriere Edelsteine"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "Ignoriere Edelsteine auf gesockelten Gegenständen für die Berechnung der Werteübersicht"
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = "Ignoriere prismatische Sockel"
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = "Ignoriere Edelsteine in prismatischen Sockeln für die Berechnung der Werteübersicht"
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "Anzeigestil für veränderte Werte"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "Zeige veränderte Werte im Haupttooltip oder nur in Vergleichstooltips"
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "Füge leere Zeile hinzu"
|
||||
L["Add a empty line before or after stat summary"] = "Füge eine leere Zeile vor oder nach der Werteübersicht hinzu"
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "Vor Berechnung hinzufügen"
|
||||
L["Add a empty line before stat summary"] = "Füge eine leere Zeile vor der Werteübersicht hinzu"
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "Nach Berechnung hinzufügen"
|
||||
L["Add a empty line after stat summary"] = "Füge eine leere Zeile nach der Werteübersicht hinzu"
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "Zeige Symbol"
|
||||
L["Show the sigma icon before summary listing"] = "Zeige das Sigma Symbol vor der Übersichtsliste an"
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "Zeige Titeltext"
|
||||
L["Show the title text before summary listing"] = "Zeige den Titeltext vor der Übersichtsliste an"
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "Zeige Nullwerte"
|
||||
L["Show zero value stats in summary for consistancy"] = "Zeige zur Konsistenz die Nullwerte in der Übersicht an"
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "Berechne Wertesummen"
|
||||
L["Calculate the total stats for the item"] = "Berechne die Gesamtwerte der Items"
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "Berechne Wertedifferenz"
|
||||
L["Calculate the stat difference for the item and equipped items"] = "Berechne Wertedifferenz für das Item und angelegte Items"
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "Sortiere Werteübersicht alphabetisch"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "Sortiere Werteübersicht alphabetisch, deaktivieren um nach Wertetyp zu sortieren (Basis, Physisch, Zauber, Tank)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "Zeige Blockchance in Vermeidungsübersicht"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "Zeige Blockchance in Vermeidungsübersicht, deaktivieren um nur Ausweichen, Parieren und Verfehlen zu zeigen"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "Werte - Basis"
|
||||
L["Choose basic stats for summary"] = "Wähle Basiswerte für die Übersicht"
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "Leben zusammenrechnen"
|
||||
L["Health <- Health, Stamina"] = "Leben <- Leben, Ausdauer"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "Mana zusammenrechnen"
|
||||
L["Mana <- Mana, Intellect"] = "Mana <- Mana, Intelligenz"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "Manaregeneration zusammenrechnen"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "Manaregeneration <- Manaregeneration, Willenskraft"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "Manaregeneration (nicht zaubernd) zusammenrechnen"
|
||||
L["Mana Regen while not casting <- Spirit"] = "Manaregeneration (nicht zaubernd) <- Manaregeneration, Willenskraft"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "Lebensregeneration zusammenrechnen"
|
||||
L["Health Regen <- Health Regen"] = "Lebensregeneration <- Lebensregeneration"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "Lebensregeneration außerhalb des Kampfes zusammenrechnen"
|
||||
L["Health Regen when out of combat <- Spirit"] = "Lebensregeneration außerhalb des Kampfes, Willenskraft"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "Stärke zusammenrechnen"
|
||||
L["Strength Summary"] = "Stärkeübersicht"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "Beweglichkeit zusammenrechnen"
|
||||
L["Agility Summary"] = "Beweglichkeitsübersicht"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "Ausdauer zusammenrechnen"
|
||||
L["Stamina Summary"] = "Ausdauerübersicht"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "Intelligenz zusammenrechnen"
|
||||
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"
|
||||
L["Choose physical damage stats for summary"] = "Wähle physische Schadenswerte für die Übersicht"
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "Angriffskraft zusammenrechnen"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "Angriffskraft <- Angriffskraft, Stärke, Beweglichkeit"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "Distanzangriffskraft zusammenrechnen"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "Distanzangriffskraft <- Distanzangriffskraft, Intelligenz, Angriffskraft, Stärke, Beweglichkeit"
|
||||
-- /rb sum physical fap
|
||||
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"
|
||||
-- /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"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Kritische Trefferwertung zusammenrechnen"
|
||||
L["Crit Rating Summary"] = "Kritische Trefferwertungsübersicht"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "Tempo zusammenrechnen"
|
||||
L["Haste <- Haste Rating"] = "Tempo <- Tempowertung"
|
||||
-- /rb sum physical hasterating
|
||||
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"
|
||||
-- /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"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "Kritische Distanztrefferwertung zusammenrechnen"
|
||||
L["Ranged Crit Rating Summary"] = "Kritische Distanztrefferwertungsübersicht"
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = "Distanztempo zusammenrechnen"
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = "Distanztempo <- Tempowertung, Distanztempowertung"
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = "Distanztempowertung zusammenrechnen"
|
||||
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 weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "Waffenfertigkeit zusammenrechnen"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "Waffenfertigkeit <- Waffenfertigkeitswertung"
|
||||
-- /rb sum physical exp
|
||||
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"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Werte - Zauber"
|
||||
L["Choose spell damage and healing stats for summary"] = "Wähle Zauberschaden und Heilungswerte für die Übersicht"
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "Zauberschaden zusammenrechnen"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "Zauberschaden <- Zauberschaden, Intelligenz, Willenskraft, Ausdauer"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "Heiligzauberschaden zusammenrechnen"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "Heiligzauberschaden <- Heiligzauberschaden, Zauberschaden, Intelligenz, Willenskraft"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "Arkanzauberschaden zusammenrechnen"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "Arkanzauberschaden <- Arkanzauberschaden, Zauberschaden, Intelligenz"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "Feuerzauberschaden zusammenrechnen"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "Feuerzauberschaden <- Feuerzauberschaden, Zauberschaden, Intelligenz, Ausdauer"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "Naturzauberschaden zusammenrechnen"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "Naturzauberschaden <- Naturzauberschaden, Zauberschaden, Intelligenz"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "Frostzauberschaden zusammenrechnen"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "Frostzauberschaden <- Frostzauberschaden, Zauberschaden, Intelligenz"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "Schattenzauberschaden zusammenrechnen"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "Schattenzauberschaden <- Schattenzauberschaden, Zauberschaden, Intelligenz, Willenskraft, Ausdauer"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "Heilung zusammenrechnen"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "Heilung <- Heilung, Intelligenz, Willenskraft, Beweglichkeit, Stärke"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "Kritische Zaubertrefferchance zusammenrechnen"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "Kritische Zaubertrefferchance <- kritische Zaubertrefferwertung, Intelligenz"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "Zaubertrefferchance zusammenrechnen"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "Zaubertrefferchance <- Zaubertrefferwertung"
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "Zaubertempo zusammenrechnen"
|
||||
L["Spell Haste <- Spell Haste Rating"] = "Zaubertempo <- Zaubertempowertung"
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "Zauberdurchschlag zusammenrechnen"
|
||||
L["Spell Penetration Summary"] = "Zauberdurchschlagsübersicht"
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = "Zaubertrefferwertung zusammenrechnen"
|
||||
L["Spell Hit Rating Summary"] = "Zaubertrefferwertungsübersicht"
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = "Kritische Zaubertrefferwertung zusammenrechnen"
|
||||
L["Spell Crit Rating Summary"] = "Kritische Zaubertrefferwertungsübersicht"
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = "Zaubertempowertung zusammenrechnen"
|
||||
L["Spell Haste Rating Summary"] = "Zaubertempowertungsübersicht"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
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"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Ausweichchance zusammenrechnen"
|
||||
L["Dodge Chance <- Dodge Rating, Agility"] = "Ausweichchance <- Ausweichwertung, Beweglichkeit"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "Parierchance zusammenrechnen"
|
||||
L["Parry Chance <- Parry Rating"] = "Parierchance <- Parierwertung"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Blockchance zusammenrechnen"
|
||||
L["Block Chance <- Block Rating"] = " Blockchance <- Blockwertung"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Ausweichmissachtung zusammenrechnen"
|
||||
L["Dodge Neglect <- Expertise"] = "Ausweichmissachtung <- Waffenkunde"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "Pariermissachtung zusammenrechnen"
|
||||
L["Parry Neglect <- Expertise"] = "Pariermissachtung <- Waffenkunde"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Arkanwiderstand zusammenrechnen"
|
||||
L["Arcane Resistance Summary"] = "Arkanwiderstandsübersicht"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "Feuerwiderstand zusammenrechnen"
|
||||
L["Fire Resistance Summary"] = "Feuerwiderstandsübersicht"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "Naturwiderstand zusammenrechnen"
|
||||
L["Nature Resistance Summary"] = "Naturwiderstandsübersicht"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "Frostwiderstand zusammenrechnen"
|
||||
L["Frost Resistance Summary"] = "Frostwiderstandsübersicht"
|
||||
-- /rb sum tank resshadow
|
||||
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"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "Parierwertung zusammenrechnen"
|
||||
L["Parry Rating Summary"] = "Parierwertungsübersicht"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "Blockwertung zusammenrechnen"
|
||||
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 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"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Vermeidung zusammenrechnen"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Vermeidung <- Ausweichen, Parieren, Gegner-Verfehlen, Blocken (optional)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = "Edelsteinset"
|
||||
L["Select a gem set to configure"] = "Wähle ein Edelsteinset zur Konfiguration"
|
||||
L["Default Gem Set 1"] = "Standard Edelsteinset 1"
|
||||
L["Default Gem Set 2"] = "Standard Edelsteinset 2"
|
||||
L["Default Gem Set 3"] = "Standard Edelsteinset 3"
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "Leere Edelsteinplätze automatisch füllen"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = "ItemID oder Link des einzusetzenden Edelsteins"
|
||||
L["<ItemID|Link>"] = true
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = "|cffffff7f%s|r ist nun auf |cffffff7f[%s]|r gesetzt"
|
||||
L["Invalid input: %s. ItemID or ItemLink required."] = "Ungültige Eingabe: %s. ItemID oder ItemLink benötigt."
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = "Frage den Server nach Edelstein: %s. Versuche es in 5 Sekunden noch einmal."
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
L["Second set of default gems which can be toggled with a modifier key"] = "Zweites Set von Standardedelsteinen, das mit einer Umschalttaste angezeigt werden kann"
|
||||
L["Can't use the same modifier as Gem Set 3"] = "Kann nicht die gleiche Umschalttaste wie das dritte Set benutzen"
|
||||
-- /rb sum gem2 key
|
||||
L["Toggle Key"] = "Umschalttaste"
|
||||
L["Use this key to toggle alternate gems"] = "Benutze diese Taste um zu den alternativen Edelsteinen umzuschalten"
|
||||
-- /rb sum gem3
|
||||
L["Third set of default gems which can be toggled with a modifier key"] = "Drittes Set von Standardedelsteinen, das mit einer Umschalttaste angezeigt werden kann"
|
||||
L["Can't use the same modifier as Gem Set 2"] = "Kann nicht die gleiche Umschalttaste wie das zweite Set benutzen"
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = true
|
||||
L["ItemID: "] = true
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = " um (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterStat",},
|
||||
{pattern = "verleiht.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
{pattern = "(%d+) erhöhen.", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID: 24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [發光的暗影卓奈石] +6法術傷害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " und ", ",", "%. ", " für ", "&", ":",
|
||||
-- Fix for [Mirror of Truth]
|
||||
-- Equip: Chance on melee and ranged critical strike to increase your attack power by 1000 for 10 secs.
|
||||
-- 1000 was falsely detected detected as ranged critical strike
|
||||
--"increase your",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Stärke"
|
||||
SPELL_STAT2_NAME = "Beweglichkeit"
|
||||
SPELL_STAT3_NAME = "Ausdauer"
|
||||
SPELL_STAT4_NAME = "Intelligenz"
|
||||
SPELL_STAT5_NAME = "Willenskraft"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "verteidigungswertung", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "ausweichwertung", id = CR_DODGE},
|
||||
{pattern = "blockwertung", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "parierwertung", id = CR_PARRY},
|
||||
-- Falls jemand ein Item mit den unten auskommentierten Patterns hat, die nicht der Übersetzung entsprechen soll er mir bescheid sagen, ich habe nix gefunden...
|
||||
{pattern = "kritische zaubertrefferwertung", id = CR_CRIT_SPELL},
|
||||
-- {pattern = "spell critical hit rating", id = CR_CRIT_SPELL},
|
||||
-- {pattern = "spell critical rating", id = CR_CRIT_SPELL},
|
||||
-- {pattern = "spell crit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "kritische distanztrefferwertung", id = CR_CRIT_RANGED},
|
||||
-- {pattern = "ranged critical strike", id = CR_CRIT_RANGED}, -- [Heartseeker Scope]
|
||||
-- {pattern = "ranged critical hit rating", id = CR_CRIT_RANGED},
|
||||
-- {pattern = "ranged critical rating", id = CR_CRIT_RANGED},
|
||||
-- {pattern = "ranged crit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "kritische trefferwertung", id = CR_CRIT_MELEE},
|
||||
-- {pattern = "critical hit rating", id = CR_CRIT_MELEE},
|
||||
-- {pattern = "critical rating", id = CR_CRIT_MELEE},
|
||||
-- {pattern = "crit rating", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "zaubertrefferwertung", id = CR_HIT_SPELL},
|
||||
{pattern = "distanztrefferwertung", id = CR_HIT_RANGED},
|
||||
{pattern = "trefferwertung", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "abhärtungswertung", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "zaubertempowertung", id = CR_HASTE_SPELL},
|
||||
{pattern = "distanztempowertung", id = CR_HASTE_RANGED},
|
||||
{pattern = "angriffstempowertung", id = CR_HASTE_MELEE},
|
||||
{pattern = "nahkampftempowertung", id = CR_HASTE_MELEE},
|
||||
{pattern = "tempowertung", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
-- {pattern = "skill rating", id = CR_WEAPON_SKILL}, -- seit 2.3.0 entfernt denke ich..
|
||||
{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},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "$value% krit."
|
||||
L["$value% Spell Crit"] = "$value% Zauberkrit."
|
||||
L["$value% Dodge"] = "$value% Ausweichen"
|
||||
L["$value HP"] = true
|
||||
L["$value MP"] = true
|
||||
L["$value AP"] = true
|
||||
L["$value RAP"] = true
|
||||
L["$value Dmg"] = "$value Schaden"
|
||||
L["$value Heal"] = "$value Heilung"
|
||||
L["$value Armor"] = "$value Rüstung"
|
||||
L["$value Block"] = "$value Blocken"
|
||||
L["$value MP5"] = true
|
||||
L["$value MP5(NC)"] = true
|
||||
L["$value HP5"] = true
|
||||
L["$value to be Dodged/Parried"] = "$value wird Ausgewichen/Pariert"
|
||||
L["$value to be Crit"] = "$value wird kritisch"
|
||||
L["$value Crit Dmg Taken"] = "$value erlittener Schaden"
|
||||
L["$value DOT Dmg Taken"] = "$value erlittener Schaden durch DOTs"
|
||||
L["$value% Parry"] = "$value% Parieren"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value Zauber"
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "Werteübersicht"
|
||||
@@ -0,0 +1,726 @@
|
||||
--[[
|
||||
Name: RatingBuster enUS locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- Whitetooth (hotdogee [at] gmail [dot] com)
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "enUS", true)
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend NotePad++ or Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "顯示物品編號",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = true
|
||||
L["Waterfall-1.0 is required to access the GUI."] = true
|
||||
L["Enabled"] = true
|
||||
L["Suspend/resume this addon"] = true
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = true
|
||||
L["ALT Key"] = true
|
||||
L["CTRL Key"] = true
|
||||
L["SHIFT Key"] = true
|
||||
L["Never"] = true
|
||||
L["General Settings"] = true
|
||||
L["Profiles"] = true
|
||||
-- /rb win
|
||||
L["Options Window"] = true
|
||||
L["Shows the Options Window"] = true
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = true
|
||||
L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = true
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = true
|
||||
L["Enable support for Stat Mods"] = true
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = true
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = true
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = true
|
||||
L["Show the ItemID in tooltips"] = true
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = true
|
||||
L["Show the ItemLevel in tooltips"] = true
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = true
|
||||
L["Calculate using the required level if you are below the required level"] = true
|
||||
-- /rb level
|
||||
L["Set Level"] = true
|
||||
L["Set the level used in calculations (0 = your level)"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = true
|
||||
L["Options for Rating display"] = true
|
||||
-- /rb rating show
|
||||
L["Show Rating Conversions"] = true
|
||||
L["Show Rating conversions in tooltips"] = true
|
||||
-- /rb rating spell
|
||||
L["Show Spell Hit/Haste"] = true
|
||||
L["Show Spell Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = true
|
||||
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 exp
|
||||
L["Expertise Breakdown"] = true
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = true
|
||||
L["Changes the color of added text"] = true
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = true
|
||||
L["Pick a color"] = true
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = true
|
||||
L["Enable colored text"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = true
|
||||
L["Changes the display of base stats"] = true
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = true
|
||||
L["Show base stat conversions in tooltips"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = true
|
||||
L["Changes the display of Strength"] = true
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Strength"] = true
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = true
|
||||
L["Show Block Value from Strength"] = true
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = true
|
||||
L["Show Spell Damage from Strength"] = true
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Strength"] = true
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = true
|
||||
L["Show Parry from Strength"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = true
|
||||
L["Changes the display of Agility"] = true
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = true
|
||||
L["Show Crit chance from Agility"] = true
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = true
|
||||
L["Show Dodge chance from Agility"] = true
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Agility"] = true
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = true
|
||||
L["Show Ranged Attack Power from Agility"] = true
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = true
|
||||
L["Show Armor from Agility"] = true
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Agility"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = true
|
||||
L["Changes the display of Stamina"] = true
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = true
|
||||
L["Show Health from Stamina"] = true
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = true
|
||||
L["Show Spell Damage from Stamina"] = true
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Stamina"] = true
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Stamina"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = true
|
||||
L["Changes the display of Intellect"] = true
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = true
|
||||
L["Show Spell Crit chance from Intellect"] = true
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = true
|
||||
L["Show Mana from Intellect"] = true
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = true
|
||||
L["Show Spell Damage from Intellect"] = true
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Intellect"] = true
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = true
|
||||
L["Show Mana Regen while casting from Intellect"] = true
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = true
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = true
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = true
|
||||
L["Show Ranged Attack Power from Intellect"] = true
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = true
|
||||
L["Show Armor from Intellect"] = true
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Intellect"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = true
|
||||
L["Changes the display of Spirit"] = true
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = true
|
||||
L["Show Mana Regen while casting from Spirit"] = true
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = true
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = true
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = true
|
||||
L["Show Health Regen from Spirit"] = true
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = true
|
||||
L["Show Spell Damage from Spirit"] = true
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = true
|
||||
L["Show Healing from Spirit"] = true
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = true
|
||||
L["Show Spell Crit chance from Spirit"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = true
|
||||
L["Changes the display of Armor"] = true
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = true
|
||||
L["Show Attack Power from Armor"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = true
|
||||
L["Options for stat summary"] = true
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = true
|
||||
L["Show stat summary in tooltips"] = true
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = true
|
||||
L["Ignore stuff when calculating the stat summary"] = true
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = true
|
||||
L["Hide stat summary for undesirable items"] = true
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = true
|
||||
L["Show stat summary only for selected quality items and up"] = true
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = true
|
||||
L["Select armor types you want to ignore"] = true
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = true
|
||||
L["Hide stat summary for all cloth armor"] = true
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = true
|
||||
L["Hide stat summary for all leather armor"] = true
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = true
|
||||
L["Hide stat summary for all mail armor"] = true
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = true
|
||||
L["Hide stat summary for all plate armor"] = true
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = true
|
||||
L["Hide stat summary for equipped items"] = true
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = true
|
||||
L["Ignore enchants on items when calculating the stat summary"] = true
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = true
|
||||
L["Ignore gems on items when calculating the stat summary"] = true
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = true
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = true
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = true
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = true
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = true
|
||||
L["Add a empty line before or after stat summary"] = true
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = true
|
||||
L["Add a empty line before stat summary"] = true
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = true
|
||||
L["Add a empty line after stat summary"] = true
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = true
|
||||
L["Show the sigma icon before summary listing"] = true
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = true
|
||||
L["Show the title text before summary listing"] = true
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = true
|
||||
L["Show zero value stats in summary for consistancy"] = true
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = true
|
||||
L["Calculate the total stats for the item"] = true
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = true
|
||||
L["Calculate the stat difference for the item and equipped items"] = true
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = true
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = true
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = true
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = true
|
||||
L["Choose basic stats for summary"] = true
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = true
|
||||
L["Health <- Health, Stamina"] = true
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = true
|
||||
L["Mana <- Mana, Intellect"] = true
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = true
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = true
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = true
|
||||
L["Mana Regen while not casting <- Spirit"] = true
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = true
|
||||
L["Health Regen <- Health Regen"] = true
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = true
|
||||
L["Health Regen when out of combat <- Spirit"] = true
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = true
|
||||
L["Strength Summary"] = true
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = true
|
||||
L["Agility Summary"] = true
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = true
|
||||
L["Stamina Summary"] = true
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = true
|
||||
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
|
||||
L["Choose physical damage stats for summary"] = true
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = true
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = true
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = true
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = true
|
||||
-- /rb sum physical fap
|
||||
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
|
||||
-- /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
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = true
|
||||
L["Crit Rating Summary"] = true
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = true
|
||||
L["Haste <- Haste Rating"] = true
|
||||
-- /rb sum physical hasterating
|
||||
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
|
||||
-- /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
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = true
|
||||
L["Ranged Crit Rating Summary"] = true
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = true
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = true
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = true
|
||||
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 weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = true
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = true
|
||||
-- /rb sum physical exp
|
||||
L["Sum Expertise"] = true
|
||||
L["Expertise <- Expertise Rating"] = true
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = true
|
||||
L["Expertise Rating Summary"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = true
|
||||
L["Choose spell damage and healing stats for summary"] = true
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = true
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = true
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = true
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = true
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = true
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = true
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = true
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = true
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = true
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = true
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = true
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = true
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = true
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = true
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = true
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = true
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = true
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = true
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = true
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = true
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = true
|
||||
L["Spell Haste <- Spell Haste Rating"] = true
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = true
|
||||
L["Spell Penetration Summary"] = true
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = true
|
||||
L["Spell Hit Rating Summary"] = true
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = true
|
||||
L["Spell Crit Rating Summary"] = true
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = true
|
||||
L["Spell Haste Rating Summary"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
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
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = true
|
||||
L["Dodge Chance <- Dodge Rating, Agility"] = true
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = true
|
||||
L["Parry Chance <- Parry Rating"] = true
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = true
|
||||
L["Block Chance <- Block Rating"] = true
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = true
|
||||
L["Dodge Neglect <- Expertise"] = true
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = true
|
||||
L["Parry Neglect <- Expertise"] = true
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = true
|
||||
L["Arcane Resistance Summary"] = true
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = true
|
||||
L["Fire Resistance Summary"] = true
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = true
|
||||
L["Nature Resistance Summary"] = true
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = true
|
||||
L["Frost Resistance Summary"] = true
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = true
|
||||
L["Shadow Resistance Summary"] = true
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = true
|
||||
L["Dodge Rating Summary"] = true
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = true
|
||||
L["Parry Rating Summary"] = true
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = true
|
||||
L["Block Rating Summary"] = true
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = true
|
||||
L["Resilience Summary"] = 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
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = true
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = true
|
||||
L["Select a gem set to configure"] = true
|
||||
L["Default Gem Set 1"] = true
|
||||
L["Default Gem Set 2"] = true
|
||||
L["Default Gem Set 3"] = true
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = true
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = true
|
||||
L["<ItemID|Link>"] = true
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = true
|
||||
L["Invalid input: %s. ItemID or ItemLink required."] = true
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = true
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
L["Second set of default gems which can be toggled with a modifier key"] = true
|
||||
L["Can't use the same modifier as Gem Set 3"] = true
|
||||
-- /rb sum gem2 key
|
||||
L["Toggle Key"] = true
|
||||
L["Use this key to toggle alternate gems"] = true
|
||||
-- /rb sum gem3
|
||||
L["Third set of default gems which can be toggled with a modifier key"] = true
|
||||
L["Can't use the same modifier as Gem Set 2"] = true
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = true
|
||||
L["ItemID: "] = true
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = " by (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)[^%%]", addInfo = "AfterStat",},
|
||||
--{pattern = "grant.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar ID:18348, Assassination Armor set
|
||||
--{pattern = "add.-(%d+)", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone ID:23529
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID:24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [發光的暗影卓奈石] +6法術傷害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " and ", ",", "%. ", " for ", "&", ":",
|
||||
-- Fix for [Mirror of Truth]
|
||||
-- Equip: Chance on melee and ranged critical strike to increase your attack power by 1000 for 10 secs.
|
||||
-- 1000 was falsely detected detected as ranged critical strike
|
||||
"increase your",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "defense rating", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "dodge rating", id = CR_DODGE},
|
||||
{pattern = "block rating", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "parry rating", id = CR_PARRY},
|
||||
|
||||
{pattern = "spell critical strike rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical hit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell crit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "ranged critical strike rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged critical strike", id = CR_CRIT_RANGED}, -- [Heartseeker Scope]
|
||||
{pattern = "ranged critical hit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged critical rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged crit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "critical strike rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical hit rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "crit rating", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "spell hit rating", id = CR_HIT_SPELL},
|
||||
{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},
|
||||
{pattern = "ranged haste rating", id = CR_HASTE_RANGED},
|
||||
{pattern = "haste rating", id = CR_HASTE_MELEE},
|
||||
{pattern = "speed rating", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "expertise rating", id = CR_EXPERTISE},
|
||||
|
||||
{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},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = true
|
||||
L["$value% Spell Crit"] = true
|
||||
L["$value% Dodge"] = true
|
||||
L["$value HP"] = true
|
||||
L["$value MP"] = true
|
||||
L["$value AP"] = true
|
||||
L["$value RAP"] = true
|
||||
L["$value Dmg"] = true
|
||||
L["$value Heal"] = true
|
||||
L["$value Armor"] = true
|
||||
L["$value Block"] = true
|
||||
L["$value MP5"] = true
|
||||
L["$value MP5(NC)"] = true
|
||||
L["$value HP5"] = true
|
||||
L["$value to be Dodged/Parried"] = true
|
||||
L["$value to be Crit"] = true
|
||||
L["$value Crit Dmg Taken"] = true
|
||||
L["$value DOT Dmg Taken"] = true
|
||||
L["$value% Parry"] = true
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = true
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = true
|
||||
@@ -0,0 +1,699 @@
|
||||
--[[
|
||||
Name: RatingBuster esES locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- carahuevo@Curse
|
||||
- kaiemg
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "esES")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "顯示物品編號",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "Opciones RatingBuster"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "Se requiere Waterfall para acceder a la GUI."
|
||||
L["Enabled"] = "Activado"
|
||||
L["Suspend/resume this addon"] = "Parar/Continuar este accesorio"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
--L["General Settings"] = true
|
||||
--L["Profiles"] = true
|
||||
-- /rb optionswin
|
||||
L["Options Window"] = "Ventana opciones"
|
||||
L["Shows the Options Window"] = "Muestra la ventana de opciones"
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "Habilitar Stat Mods"
|
||||
L["Enable support for Stat Mods"] = "Habilita el soporte para Stat Mods"
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "Habilita evitacion de rendimientos decrecientes"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "Rendimientos decrecientes"
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "Mostrar ItemID"
|
||||
L["Show the ItemID in tooltips"] = "Mostrar ItemID en los tooltips"
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "Mostrar NivelItem"
|
||||
L["Show the ItemLevel in tooltips"] = "Muestra el NivelItem en los tooltips"
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "Usar nivel requerido"
|
||||
L["Calculate using the required level if you are below the required level"] = "Calcular apartir del nivel requerido si estas por debajo"
|
||||
-- /rb setlevel
|
||||
L["Set Level"] = "Establecer nivel"
|
||||
L["Set the level used in calculations (0 = your level)"] = "Establece el nivel usado en los caculos (0=tu nivel)"
|
||||
-------------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "Indices"
|
||||
L["Options for Rating display"] = "Opciones de visualizacion de indices"
|
||||
-- /rb rating show
|
||||
L["Show Rating Conversions"] = "Mostrar conversion de indices"
|
||||
L["Show Rating conversions in tooltips"] = "Mostrar conversion de indices en tooltips"
|
||||
-- /rb rating spell
|
||||
--L["Show Spell Hit/Haste"] = true
|
||||
--L["Show Spell Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating physical
|
||||
--L["Show Physical Hit/Haste"] = true
|
||||
--L["Show Physical Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /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 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"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "Cambiar color texto"
|
||||
L["Changes the color of added text"] = "Cambia el color del texto anadido"
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "Coge color"
|
||||
L["Pick a color"] = "Coge un color"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "Habilitar color"
|
||||
L["Enable colored text"] = "Habilitar texto coloreado"
|
||||
---------------------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "Desglose Estadisticas"
|
||||
L["Changes the display of base stats"] = "Cambia la visualizacion de las estad. base"
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "Mostrar conversiones estad. base"
|
||||
L["Show base stat conversions in tooltips"] = "Muestra las conversiones de estad. base en los tooltip"
|
||||
-----------------------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "Fuerza"
|
||||
L["Changes the display of Strength"] = "Cambia la visualizacion de Fuerza"
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "Motrar Poder Ataque"
|
||||
L["Show Attack Power from Strength"] = "Motrar Poder Ataque de Fuerza"
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "Mostrar Valor Bloqueo"
|
||||
L["Show Block Value from Strength"] = "Muestra el Valor Bloqueo de Fuerza"
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "Mostrar Dano Hech"
|
||||
L["Show Spell Damage from Strength"] = "Muestra el Dano de Hechizo de Fuerza"
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "Mostrar Sanacion"
|
||||
L["Show Healing from Strength"] = "Muestra la Sanacion de Fuerza"
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "Mostrar Parada"
|
||||
L["Show Parry from Strength"] = "Muestra Parada de Fuerza"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "Agilidad"
|
||||
L["Changes the display of Agility"] = "Cambia la visualizacion de Agilidad"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "Mostrar Crit"
|
||||
L["Show Crit chance from Agility"] = "Muestra la prob. de critico de Agilidad"
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "Mostrar Esquivar"
|
||||
L["Show Dodge chance from Agility"] = "Muestra la prob. de Esquivar de Agilidad"
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "Mostrar Poder Ataque"
|
||||
L["Show Attack Power from Agility"] = "Muestra Poder de Ataque de Agilidad"
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "Mostrar Poder Ataque Dist"
|
||||
L["Show Ranged Attack Power from Agility"] = "Muestra Poder de Ataque a distancia de Agilidad"
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "Mostrar Armadura"
|
||||
L["Show Armor from Agility"] = "Muestra la Armadura de Agilidad"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "Mostrar Sanacion"
|
||||
L["Show Healing from Agility"] = "Muestra Sanacion de Agilidad"
|
||||
----------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "Aguante"
|
||||
L["Changes the display of Stamina"] = "Cambia la visualizacion de Aguante"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "Mostrar Salud"
|
||||
L["Show Health from Stamina"] = "Muestra la Salud de Aguante"
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "Mostrar Dano Hech"
|
||||
L["Show Spell Damage from Stamina"] = "Muestra el Dano de Hechizo de Aguante"
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "Mostrar Sanacion"
|
||||
L["Show Healing from Stamina"] = "Muestra sanacion de Aguante"
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "Mostrar Poder de Ataque"
|
||||
L["Show Attack Power from Stamina"] = "Muestra Poder de Ataque de Aguante"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "Intelecto"
|
||||
L["Changes the display of Intellect"] = "Cambia la visualizacion de Intelecto"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "Mostrar Crit Hech"
|
||||
L["Show Spell Crit chance from Intellect"] = "Muestra la prob. de Crit. de Hechizo de Intelecto"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "Mostrar Mana"
|
||||
L["Show Mana from Intellect"] = "Muestra el Mana de Intelecto"
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "Mostrar Dano Hech"
|
||||
L["Show Spell Damage from Intellect"] = "Muestra el Dano de Hechizo de Intelecto"
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "Mostrar Sanacion"
|
||||
L["Show Healing from Intellect"] = "Muestra la Sanacion de Intelecto"
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "Mostrar Regen.Mana"
|
||||
L["Show Mana Regen while casting from Intellect"] = "Muestra la Regen.Mana de Intelecto"
|
||||
-- /rb stat int mp5nc
|
||||
--L["Show Mana Regen while NOT casting"] = true
|
||||
--L["Show Mana Regen while NOT casting from Intellect"] = true
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "Mostrar Poder Ataque Dist"
|
||||
L["Show Ranged Attack Power from Intellect"] = "Muestra el Poder Ataque Dist de Intelecto"
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "Mostrar Armadura"
|
||||
L["Show Armor from Intellect"] = "Muestra la Armadura de Intelecto"
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "Mostrar Poder de Ataque"
|
||||
L["Show Attack Power from Intellect"] = "Muestra Poder de Ataque de Intelecto"
|
||||
-------------------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "Espiritu"
|
||||
L["Changes the display of Spirit"] = "Cambia la visualizacion de Espiritu"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "Mostrar Regen.Mana"
|
||||
L["Show Mana Regen while casting from Spirit"] = "Muestra la Regen.Mana de Espiritu"
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Mostrar Regen.Mana NO lanzando"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "Muestra la Regen.Mana NO lanzando de Espiritu"
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "Mostrar Regen.Salud"
|
||||
L["Show Health Regen from Spirit"] = "Muestra la Regen. de Salud de Espiritu"
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "Mostrar Dano Hech"
|
||||
L["Show Spell Damage from Spirit"] = "Muestra el Dano de Hechizos de Espiritu"
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "Mostrar Sanacion"
|
||||
L["Show Healing from Spirit"] = "Muestra la Sanacion de Espiritu"
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "Resumen Estad"
|
||||
L["Options for stat summary"] = "Opciones de Resumen Estad."
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "Mostrar Resumen Estad"
|
||||
L["Show stat summary in tooltips"] = "Muestra el Resumen de Estad. en los tooltips"
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "Ignorar opciones"
|
||||
L["Ignore stuff when calculating the stat summary"] = "Ignorar los datos cuando se calcule el resumen de estad."
|
||||
-- /rb sum ignore unused
|
||||
--L["Ignore Undesirable Items"] = true
|
||||
--L["Hide stat summary for undesirable items"] = true
|
||||
-- /rb sum ignore quality
|
||||
--L["Minimum Item Quality"] = true
|
||||
--L["Show stat summary only for selected quality items and up"] = true
|
||||
-- /rb sum ignore armor
|
||||
--L["Armor Types"] = true
|
||||
--L["Select armor types you want to ignore"] = true
|
||||
-- /rb sum ignore armor cloth
|
||||
--L["Ignore Cloth"] = true
|
||||
--L["Hide stat summary for all cloth armor"] = true
|
||||
-- /rb sum ignore armor leather
|
||||
--L["Ignore Leather"] = true
|
||||
--L["Hide stat summary for all leather armor"] = true
|
||||
-- /rb sum ignore armor mail
|
||||
--L["Ignore Mail"] = true
|
||||
--L["Hide stat summary for all mail armor"] = true
|
||||
-- /rb sum ignore armor plate
|
||||
--L["Ignore Plate"] = true
|
||||
--L["Hide stat summary for all plate armor"] = true
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "Ignorar items equipados"
|
||||
L["Hide stat summary for equipped items"] = "Ocultar resumen estad. para los items equipados"
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "Ignorar encantamientos"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "Ignorar encantamientos en items cuando se calcule el resumen de estad."
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "Ignorar gemas"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "Ignorar gemas en items cuando se calcule el resumen de estad."
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "Mostrar estilo para el valor de diferencia"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "Mostrar diferencia valores en el tooltip principal o solo en los de comparacion"
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "Anadir linea vacia"
|
||||
L["Add a empty line before or after stat summary"] = "Anade una linea vacia antes o despues del resumen"
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "Anadir antes del resumen"
|
||||
L["Add a empty line before stat summary"] = "Anade una linea vacia antes del resumen"
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "Anadir despues del resumen"
|
||||
L["Add a empty line after stat summary"] = "Anade una linea vacia despues del resumen"
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "Mostrar icono"
|
||||
L["Show the sigma icon before summary listing"] = "Muestra el icono de sumatorio antes del listado resumen"
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "Mostrar texto titulo"
|
||||
L["Show the title text before summary listing"] = "Muestra el titulo antes del listado resumen"
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "Mostrar estad. valor cero"
|
||||
L["Show zero value stats in summary for consistancy"] = "Muestra las estad. de valor cero por consistencia"
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "Calcula suma de estad."
|
||||
L["Calculate the total stats for the item"] = "Calcula el total de las estad. para el item"
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "Calcular dif. estad."
|
||||
L["Calculate the stat difference for the item and equipped items"] = "Calcula la diferencia para el item y los items equipados"
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "Ordenar estad. alfabeticamente"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "Ordena alfabeticamente el resumen, deshabilita para ordenar de acuerdo a la estad. (basica, fisica, hechizo, tanque)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "Incluir prob. de bloqueo en resumen de Eludir"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "Incluye prob. de bloqueo en resumen de Eludir, Deshabilita para solo esquivar, parar y fallar"
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "Estad. - Basica"
|
||||
L["Choose basic stats for summary"] = "Escoge las estad. basicas para el resumen"
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "Suma salud"
|
||||
L["Health <- Health, Stamina"] = "Salud <- Salud, Aguante"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "Suma Mana"
|
||||
L["Mana <- Mana, Intellect"] = "Mana <- Mana, Intelecto"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "Suma Mana regenerado"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "Suma Mana reg <- Mana Regen, Espiritu"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "Res. Regen. mana mientras no se lanza"
|
||||
L["Mana Regen while not casting <- Spirit"] = "Regen. mana mientras no se lanza <- Espiritu"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "Res. Regen. salud"
|
||||
L["Health Regen <- Health Regen"] = "Regen. salud <- Regen. salud"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "Res. Regen. salud fuera de combate"
|
||||
L["Health Regen when out of combat <- Spirit"] = "Regen. salud fuera de combate <- Espiritu"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "Res. Fuerza"
|
||||
L["Strength Summary"] = "Resumen Fuerza"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "Res. Agilidad"
|
||||
L["Agility Summary"] = "Resumen Agilidad"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "Res. Aguante"
|
||||
L["Stamina Summary"] = "Resumen Aguante"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "Res. Intelecto"
|
||||
L["Intellect Summary"] = "Resumen Intelecto"
|
||||
-- /rb sum basic 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"
|
||||
L["Choose physical damage stats for summary"] = "Escoge datos de dano fisico para resumen"
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "Res. Poder Ataque"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "Poder Ataque <- Poder Ataque, Fuerza, Agilidad"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "Res. P.Ataque Distancia"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "P.Ataque Distancia <- P.Ataque Distancia, Intelecto, P.Ataque, Fuerza, Agilidad"
|
||||
-- /rb sum physical fap
|
||||
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"
|
||||
-- /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"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Res. Indice Critico"
|
||||
L["Crit Rating Summary"] = "Resumen Indice Critico"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "Res. Celeridad"
|
||||
L["Haste <- Haste Rating"] = "Resumen Celeridad"
|
||||
-- /rb sum physical hasterating
|
||||
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
|
||||
-- /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
|
||||
-- /rb sum physical rangedcritrating
|
||||
-- L["Sum Ranged Crit Rating"] = true
|
||||
-- L["Ranged Crit Rating Summary"] = true
|
||||
-- /rb sum physical rangedhaste
|
||||
-- L["Sum Ranged Haste"] = true
|
||||
-- L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = true
|
||||
-- /rb sum physical rangedhasterating
|
||||
-- L["Sum Ranged Haste Rating"] = true
|
||||
-- L["Ranged Haste Rating Summary"] = true
|
||||
-- /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 weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "Res. Habilidad Arma"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "Habilidad Arma <- Indice Habilidad Arma"
|
||||
-- /rb sum physical exp -- 2.3.0
|
||||
L["Sum Expertise"] = "Res. Pericia"
|
||||
L["Expertise <- Expertise Rating"] = "Pericia <- Indice Pericia"
|
||||
-- /rb sum physical exprating
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Datos - Hechizo"
|
||||
L["Choose spell damage and healing stats for summary"] = "Escoge datos de dano y sanacion de hechizo para resumen"
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "Res. Dano Hech."
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "Dano Hech. <- Dano Hech., Intelecto, Espiritu, Aguante"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "Res. Dano Hech. Sagrado"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "Dano Hech. Sagrado <- Dano Hech. Sagrado, Dano Hech., Intelecto, Espiritu"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "Res. Dano Hech. Arcano"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "Dano Hech. Arcano <- Dano Hech. Arcano, Dano Hech., Intelecto"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "Res. Dano Hech. Fuego"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "Dano Hech. Arcano <- Dano Hech. Arcano, Dano Hech., Intelecto, Aguante"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "Res. Dano Hech. Naturaleza"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "Dano Hech. Naturaleza <- Dano Hech. Naturaleza, Dano Hech., Intelecto"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "Res. Dano Hech. Frio"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "Dano Hech. Frio <- Dano Hech. Frio, Dano Hech., Intelecto"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "Res. Dano Hech. Sombras"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "Dano Hech. Sombras <- Dano Hech. Sombras, Dano Hech., Intelecto, Espiritu, Aguante"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "Res. Sanacion"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "Sanacion <- Sanacion, Intelecto, Espiritu, Agilidad, Fuerza"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "Res. prob. Critico Hech."
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "prob. Critico Hech. <- Indice Critico Hech., Intelecto"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "Res. prob. Golpe Hech."
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "prob. Golpe Hech. <- Indice Golpe Hech."
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "Res. velocidad Hech."
|
||||
L["Spell Haste <- Spell Haste Rating"] = "Velocidad Hech. <- Indice Velocidad Hech."
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "Res. Penetracion"
|
||||
L["Spell Penetration Summary"] = "Resument Penetracion Hechizo"
|
||||
-- /rb sum spell hitspellrating
|
||||
L["Sum Spell Hit Rating"] = "Res. Golpe Hech."
|
||||
L["Spell Hit Rating Summary"] = "Resumen Golpe Hech."
|
||||
-- /rb sum spell critspellrating
|
||||
L["Sum Spell Crit Rating"] = "Res. Indice Critico Hech."
|
||||
L["Spell Crit Rating Summary"] = "Resumen Indice Critico Hech."
|
||||
-- /rb sum spell hastespellrating
|
||||
L["Sum Spell Haste Rating"] = "Res. Indice Velocidad Hech."
|
||||
L["Spell Haste Rating Summary"] = "Resumen Indice Velocidad Hech."
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
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"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Res. prob. Esquivar"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "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"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Res. prob Bloqueo"
|
||||
--L["Block Chance <- Block Rating"] = "Prob. Bloqueo <- Indice Bloqueo, Indice Defensa"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Res. fallo Esquivar"
|
||||
--L["Dodge Neglect <- Expertise"] = "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"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Res. Resist. Arcana"
|
||||
L["Arcane Resistance Summary"] = "Resumen Resistencia Arcana"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "Res. Resist. Fuego"
|
||||
L["Fire Resistance Summary"] = "Resumen Resistencia Fuego"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "Res. Resist. Naturaleza"
|
||||
L["Nature Resistance Summary"] = "Resumen Resistencia Naturaleza"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "Res. Resist. Frio"
|
||||
L["Frost Resistance Summary"] = "Resumen Resistencia Frio"
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = "Res. Resist. Sombras"
|
||||
L["Shadow Resistance Summary"] = "Resumen Resistencia Sombras"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "Res. Indice Esquivar"
|
||||
L["Dodge Rating Summary"] = "Resumen Indice Esquivar"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "Res. Indice Parar"
|
||||
L["Parry Rating Summary"] = "Resumen Indice Parar"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "Res. Indice Bloquear"
|
||||
L["Block Rating Summary"] = "Resumen Indice Bloquear"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "Res. Temple"
|
||||
L["Resilience Summary"] = "Resumen Temple"
|
||||
-- /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"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Res. Elusion"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Elusion <- Esquivar, Parar, FalloEnemigo, Bloqueo(Opcional)"
|
||||
----------------------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
-- L["Gem Set"] = true
|
||||
-- L["Select a gem set to configure"] = true
|
||||
-- L["Default Gem Set 1"] = true
|
||||
-- L["Default Gem Set 2"] = true
|
||||
-- L["Default Gem Set 3"] = true
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "Rellena automaticamente los huecos de gemas"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
--L["ItemID or Link of the gem you would like to auto fill"] = true
|
||||
--L["<ItemID|Link>"] = true
|
||||
--L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = true
|
||||
--L["Queried server for Gem: %s. Try again in 5 secs."] = true
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
--L["Second set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 3"] = true
|
||||
-- /rb sum gem2 key
|
||||
--L["Toggle Key"] = true
|
||||
--L["Use this key to toggle alternate gems"] = true
|
||||
-- /rb sum gem3
|
||||
--L["Third set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 2"] = true
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "NivelItem"
|
||||
L["ItemID: "] = "IDItem"
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = " (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterStat",},
|
||||
{pattern = "Otorga.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
{pattern = "Aumenta.-(%d+) p.", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone
|
||||
{pattern = "Mejora.-(%d+) p.", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [????????] +6?????5??
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " y ", ",", "%. ", " durante ", "&"
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "tu \195\173ndice de defensa", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "tu \195\173ndice de esquivar", id = CR_DODGE},
|
||||
{pattern = "tu \195\173ndice de bloqueo", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "tu \195\173ndice de parada", id = CR_PARRY},
|
||||
|
||||
{pattern = "tu \195\173ndice de golpe cr\195\173tico", id = CR_CRIT_SPELL},
|
||||
{pattern = "tu\195\173ndice de golpe cr\195\173tico", id = CR_CRIT_RANGED},
|
||||
{pattern = "tu \195\173ndice de golpe cr\195\173tico", id = CR_CRIT_MELEE},
|
||||
--{pattern = "tu \195\173ndice de golpe", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "tu \195\173ndice de golpe", id = CR_HIT_SPELL},
|
||||
{pattern = "tu \195\173ndice de golpe a distancia", id = CR_HIT_RANGED},
|
||||
{pattern = "tu \195\173ndice de golpe cuerpo a cuerpo", id = CR_HIT_MELEE},
|
||||
{pattern = "tu \195\173ndice de golpe", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "tu \195\173ndice de temple", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "tu \195\173ndice de celeridad", id = CR_HASTE_SPELL},
|
||||
{pattern = "tu \195\173ndice de celeridad a distancia", id = CR_HASTE_RANGED},
|
||||
{pattern = "tu \195\173ndice de celeridad con cuerpo a cuerpo", id = CR_HASTE_MELEE},
|
||||
{pattern = "tu \195\173ndice de celeridad", id = CR_HASTE_MELEE},
|
||||
{pattern = "Aumenta el \195\173ndice de celeridad de los miembros del grupo cercanos hasta", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "tu \195\173ndice de habilidad", id = CR_WEAPON_SKILL},
|
||||
{pattern = "tu \195\173ndice de pericia", id = CR_EXPERTISE},
|
||||
|
||||
{pattern = "tu \195\173ndice de evasion de golpes cuerpo a cuerpo", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "tu \195\173ndice de evasion", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "tu índice de penetración de armadurap", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "\195\173ndice de habilidad con dagas", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con espadas", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con espadas de dos manos", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con hachas", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con arcos", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con ballesta", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con armas de fuego", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad en combate feral", id = CR_WEAPON_SKILL},
|
||||
{pattern = "tu \195\173ndice de habilidad con mazas", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con armas de asta", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con bastones", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con hachas de dos manos", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad con mazas de dos manos", id = CR_WEAPON_SKILL},
|
||||
{pattern = "\195\173ndice de habilidad sin armas", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "$value% Crit"
|
||||
L["$value% Spell Crit"] = "$value% Crit hechizos"
|
||||
L["$value% Dodge"] = "$value% Esquivar"
|
||||
L["$value HP"] = "$value Vida"
|
||||
L["$value MP"] = "$value Mana"
|
||||
L["$value AP"] = "$value P.At"
|
||||
L["$value RAP"] = "$value P.At Dist"
|
||||
L["$value Dmg"] = "$value Dano"
|
||||
L["$value Heal"] = "$value Sanacion"
|
||||
L["$value Armor"] = "$value Armadura"
|
||||
L["$value Block"] = "$value Bloqueo"
|
||||
L["$value MP5"] = "$value Mana/5sec"
|
||||
L["$value MP5(NC)"] = "$value Mana/5sec(SL)"
|
||||
L["$value HP5"] = "$value Vida/5sec"
|
||||
L["$value to be Dodged/Parried"] = "$value Esquivado/Parado"
|
||||
L["$value to be Crit"] = "$value recibir Crit"
|
||||
L["$value Crit Dmg Taken"] = "$value Dano crit recib"
|
||||
L["$value DOT Dmg Taken"] = "$value Dano por tiempo recib"
|
||||
L["$value% Parry"] = "$value Parada"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value Hech."
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "Resumen estad."
|
||||
|
||||
|
||||
local MX = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "esMX")
|
||||
for k, v in pairs(L) do
|
||||
MX[k] = v
|
||||
end
|
||||
@@ -0,0 +1,660 @@
|
||||
--[[
|
||||
Name: RatingBuster frFR locale (incomplete)
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- Tixu@Curse, Silaor and renchap
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "frFR")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend NotePad++ or Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "顯示物品編號",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "Options de RatingBuster"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "Waterfall-1.0 est nécessaire pour accéder au GUI."
|
||||
L["Enabled"] = "Activé"
|
||||
L["Suspend/resume this addon"] = "Active ou non cet addon."
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = "Toujours"
|
||||
L["ALT Key"] = "Touche ALT"
|
||||
L["CTRL Key"] = "Touche CTRL"
|
||||
L["SHIFT Key"] = "Touche MAJ"
|
||||
L["Never"] = "Jamais"
|
||||
L["General Settings"] = "Paramètres généraux"
|
||||
L["Profiles"] = "Profiles"
|
||||
-- /rb win
|
||||
L["Options Window"] = "Options de la fenêtre"
|
||||
L["Shows the Options Window"] = "Affiche la fenêtre des options"
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = "Masquer la comparaison d'objet de Blizzard"
|
||||
--L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = true -- à traduire
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "Activer les Stat Mods"
|
||||
L["Enable support for Stat Mods"] = "Activer le support pour Stat Mods"
|
||||
-- /rb avoidancedr
|
||||
--L["Enable Avoidance Diminishing Returns"] = true -- à traduire
|
||||
--L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = true -- à traduire
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "Afficher l'ID de l'objet"
|
||||
L["Show the ItemID in tooltips"] = "Affiche l'ID d'un objet dans l'infobulle."
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "Afficher le niveau de l'objet"
|
||||
L["Show the ItemLevel in tooltips"] = "Affiche le niveau de l'objet dans l'infobulle."
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "Utiliser le niveau requis"
|
||||
L["Calculate using the required level if you are below the required level"] = "Effectue les calculs en utilisant le niveau requis par l'objet si il n'est pas atteint."
|
||||
-- /rb level
|
||||
L["Set Level"] = "Définir le niveau"
|
||||
L["Set the level used in calculations (0 = your level)"] = "Définir le niveau utilisé dans les calculs (0 = votre niveau)."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "Score"
|
||||
L["Options for Rating display"] = "Options pour l'affichage des scores"
|
||||
-- /rb rating show
|
||||
L["Show Rating Conversions"] = "Afficher la conversion des scores"
|
||||
L["Show Rating conversions in tooltips"] = "Affiche dans l'infobulle les gains apportés par le score."
|
||||
-- /rb rating spell
|
||||
--L["Show Spell Hit/Haste"] = true
|
||||
--L["Show Spell Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating physical
|
||||
--L["Show Physical Hit/Haste"] = true
|
||||
--L["Show Physical Hit/Haste from Hit/Haste Rating"] = true
|
||||
-- /rb rating detail
|
||||
--L["Show Detailed Conversions Text"] = true -- à traduire
|
||||
--L["Show detailed text for Resilience and Expertise conversions"] = true -- à traduire
|
||||
--L["Defense Breakdown"] = true -- à traduire
|
||||
--L["Convert Defense into Crit Avoidance, Hit Avoidance, Dodge, Parry and Block"] = true
|
||||
--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
|
||||
--L["Expertise Breakdown"] = true -- à traduire
|
||||
--L["Convert Expertise into Dodge Neglect and Parry Neglect"] = true -- à traduire
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "Modifier la couleur du texte"
|
||||
--L["Changes the color of added text"] = true -- à traduire
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "Sélectionner une couleur"
|
||||
L["Pick a color"] = "Choisissez une couleur"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = true
|
||||
L["Enable colored text"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
--L["Stat Breakdown"] = true -- à traduire
|
||||
L["Changes the display of base stats"] = "Modifie l'affichage des caractéristiques de base."
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "Afficher les conversions pour les statistiques de base"
|
||||
L["Show base stat conversions in tooltips"] = "Affiche les conversions pour les statistiques de base dans l'infobulle."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "Force"
|
||||
L["Changes the display of Strength"] = "Modifie l'affichage de la force."
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "Afficher la puissance d'attaque"
|
||||
L["Show Attack Power from Strength"] = "Affiche la puissance d'attaque apporté par la force."
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "Afficher le bloquage"
|
||||
L["Show Block Value from Strength"] = "Affiche le bloquage apporté par la force."
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "Afficher les dégats des sorts"
|
||||
L["Show Spell Damage from Strength"] = "Affiche le bonus de dégats des sorts apporté par la force."
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "Afficher les soins"
|
||||
L["Show Healing from Strength"] = "Affiche le bonus aux soins apporté par la force."
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "Afficher la parade"
|
||||
L["Show Parry from Strength"] = "Affiche la parade apporté par la force."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "Agilité"
|
||||
L["Changes the display of Agility"] = "Modifie l'affichage de l'agilité"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "Afficher le critique"
|
||||
L["Show Crit chance from Agility"] = "Affiche le pourcentage de critique apporté par l'agilité."
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "Afficher l'esquive"
|
||||
L["Show Dodge chance from Agility"] = "Affiche le pourcentage d'esquive apporté par l'agilité."
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "Afficher la puissance d'attaque"
|
||||
L["Show Attack Power from Agility"] = "Affiche la puissance d'attaque apporté par l'agilité."
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "Afficher la puissance d'attaque à distance"
|
||||
L["Show Ranged Attack Power from Agility"] = "Affiche la puissance d'attaque à distance apporté par l'agilité."
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "Afficher l'armure"
|
||||
L["Show Armor from Agility"] = "Afficher l'armure apporté par l'agilité"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "Afficher les soins"
|
||||
L["Show Healing from Agility"] = "Affiche la parade apporté par l'agilité."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "Endurance"
|
||||
L["Changes the display of Stamina"] = "Modifie l'affichage de l'endurance"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "Afficher les points de vies"
|
||||
L["Show Health from Stamina"] = "Affiche les points de vies apporté par l'endurance."
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "Afficher les dégats des sorts"
|
||||
L["Show Spell Damage from Stamina"] = "Affiche le bonus de dégats des sorts apporté par l'endurance."
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "Afficher les soins"
|
||||
L["Show Healing from Stamina"] = "Affiche les soins apporté par l'endurance."
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "Afficher la puissance d'attaque"
|
||||
L["Show Attack Power from Stamina"] = "Affiche la puissance d'attaque apporté par l'endurance."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "Intelligence"
|
||||
L["Changes the display of Intellect"] = "Modifie l'affichage de l'intelligence"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "Afficher le critique des sorts"
|
||||
L["Show Spell Crit chance from Intellect"] = "Affiche le critique des sorts apporté par l'intelligence."
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "Afficher la mana"
|
||||
L["Show Mana from Intellect"] = "Affiche la mana apporté par l'intelligence."
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "Afficher les dégats des sorts"
|
||||
L["Show Spell Damage from Intellect"] = "Afficher les dégats des sorts apporté par l'intelligence."
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "Afficher les soins"
|
||||
L["Show Healing from Intellect"] = "Affiche les soins apporté par l'intelligence."
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "Afficher la mana/5sec"
|
||||
L["Show Mana Regen while casting from Intellect"] = "Affiche la mana/5sec apporté par l'intelligence."
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Afficher la mana/5sec hors cast"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "Affiche la mana/sec hors cast apporté par l'intelligence."
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "Afficher la puissance d'attaque à distance"
|
||||
L["Show Ranged Attack Power from Intellect"] = "Affiche la puissance d'attaque à distance apporté par l'intelligence."
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "Afficher l'armure"
|
||||
L["Show Armor from Intellect"] = "Affiche l'armure apporté par l'intelligence."
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "Afficher la puissance d'attaque"
|
||||
L["Show Attack Power from Intellect"] = "Affiche la puissance d'attaque apporté par l'intelligence."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "Esprit"
|
||||
L["Changes the display of Spirit"] = "Modifie l'affichage de l'esprit"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "Afficher la mana/5sec"
|
||||
L["Show Mana Regen while casting from Spirit"] = "Affiche la mana/5sec apporté par l'esprit."
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Afficher la mana/5sec hors cast"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "Affiche la mana/sec hors cast apporté par l'esprit."
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "Afficher la vie/5sec"
|
||||
L["Show Health Regen from Spirit"] = "Affiche la vie/5sec apporté par l'esprit."
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "Afficher les dégats des sorts"
|
||||
L["Show Spell Damage from Spirit"] = "Afficher les dégats des sorts apporté par l'esprit."
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "Afficher les soins"
|
||||
L["Show Healing from Spirit"] = "Affiche les soins apporté par l'esprit."
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = "Afficher le critique des sorts"
|
||||
L["Show Spell Crit chance from Spirit"] = "Affiche le critique des sorts apporté par l'esprit."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = "Armure"
|
||||
L["Changes the display of Armor"] = "Modifie l'affichage de l'armure"
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = "Afficher la puissance d'attaque"
|
||||
L["Show Attack Power from Armor"] = "Affiche la puissance d'attaque apporté par l'armure"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = true
|
||||
L["Options for stat summary"] = true
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = true
|
||||
L["Show stat summary in tooltips"] = true
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = true
|
||||
L["Ignore stuff when calculating the stat summary"] = true
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = true
|
||||
L["Hide stat summary for undesirable items"] = true
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = true
|
||||
L["Show stat summary only for selected quality items and up"] = true
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = true
|
||||
L["Select armor types you want to ignore"] = true
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = true
|
||||
L["Hide stat summary for all cloth armor"] = true
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = true
|
||||
L["Hide stat summary for all leather armor"] = true
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = true
|
||||
L["Hide stat summary for all mail armor"] = true
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = true
|
||||
L["Hide stat summary for all plate armor"] = true
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = true
|
||||
L["Hide stat summary for equipped items"] = true
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = true
|
||||
L["Ignore enchants on items when calculating the stat summary"] = true
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = true
|
||||
L["Ignore gems on items when calculating the stat summary"] = true
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = true
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = true
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = true
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = true
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = true
|
||||
L["Add a empty line before or after stat summary"] = true
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = true
|
||||
L["Add a empty line before stat summary"] = true
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = true
|
||||
L["Add a empty line after stat summary"] = true
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = true
|
||||
L["Show the sigma icon before summary listing"] = true
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = true
|
||||
L["Show the title text before summary listing"] = true
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = true
|
||||
L["Show zero value stats in summary for consistancy"] = true
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = true
|
||||
L["Calculate the total stats for the item"] = true
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = true
|
||||
L["Calculate the stat difference for the item and equipped items"] = true
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = true
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = true
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = true
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "Stat - Basic"
|
||||
L["Choose basic stats for summary"] = "Choisissez les statistiques de base pour le résumé."
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "Cumul Vie"
|
||||
L["Health <- Health, Stamina"] = "Vie <- Vie, Endu"
|
||||
-- /rb sum stat mp
|
||||
L["Sum Mana"] = "Cumul Mana"
|
||||
L["Mana <- Mana, Intellect"] = "Mana <- Mana, Intel"
|
||||
-- /rb sum stat ap
|
||||
L["Sum Attack Power"] = "Cumul PA"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "PA <- PA, Force, Agi"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "Cumul Regen Mana"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "Regen Mana <- Regen Mana, Esprit"
|
||||
-- /rb sum stat rap
|
||||
L["Sum Ranged Attack Power"] = "Cumul PA Dist"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "PA Dist <- PA Dist, Intel, PA, Force, Agi"
|
||||
-- /rb sum stat fap
|
||||
L["Sum Feral Attack Power"] = "Cumul PA Farouche"
|
||||
L["Feral Attack Power <- Feral Attack Power, Attack Power, Strength, Agility"] = "PA Farouche <- PA Farouche, PA, Force, Agi"
|
||||
-- /rb sum stat dmg
|
||||
L["Sum Spell Damage"] = "Cumul Dégats des Sorts"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "Dégats des Sorts <- Dégats des Sorts, Intel, Esprit, Endu"
|
||||
-- /rb sum stat dmgholy
|
||||
L["Sum Holy Spell Damage"] = "Cumul DS Sacré"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "DS Sacré <- DS Sacré, DS, Intel, Esprit"
|
||||
-- /rb sum stat dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "Cumul DS Arcane"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "DS Arcane <- DS Arcane, DS, Intel"
|
||||
-- /rb sum stat dmgfire
|
||||
L["Sum Fire Spell Damage"] = "Cumul DS Feu"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "DS Feu <- DS Feu, DS, Intel, Endu"
|
||||
-- /rb sum stat dmgnature
|
||||
L["Sum Nature Spell Damage"] = "Cumul DS Nature"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "DS Nature <- DS Nature, DS, Intel"
|
||||
-- /rb sum stat dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "Cumul DS Givre"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "DS Givre <- DS Givre, DS, Intel"
|
||||
-- /rb sum stat dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "Cumul DS Ombre"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "DS Ombre <- DS Ombre, DS, Intel, Esprit, Endu"
|
||||
-- /rb sum stat heal
|
||||
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"
|
||||
-- /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"
|
||||
-- /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"
|
||||
-- /rb sum stat mp5
|
||||
L["Sum Mana Regen"] = "Cumul Regen Mana"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "Regen Mana <- Regen Mana, Esprit"
|
||||
-- /rb sum stat mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "Cumul Regen Mana HI"
|
||||
L["Mana Regen while not casting <- Spirit"] = "Regen Mana HI <- Esprit"
|
||||
-- /rb sum stat hp5
|
||||
L["Sum Health Regen"] = "Cumul Regen Vie"
|
||||
L["Health Regen <- Health Regen"] = "Regen Vie <- Regen Vie"
|
||||
-- /rb sum stat hp5oc
|
||||
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"
|
||||
-- /rb sum stat blockvalue
|
||||
-- /rb sum stat dodge
|
||||
L["Sum Dodge Chance"] = "Cumul Esquive"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "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"
|
||||
-- /rb sum stat block
|
||||
L["Sum Block Chance"] = "Cumul Bloquage"
|
||||
--L["Block Chance <- Block Rating"] = "Bloquage <- Score Bloquage, Score Def"
|
||||
-- /rb sum stat avoidhit
|
||||
-- /rb sum stat avoidcrit
|
||||
-- /rb sum stat neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Cumul Ignore Esquive"
|
||||
--L["Dodge Neglect <- Weapon Skill Rating"] = "Ignore Esquive <- Score Arme"
|
||||
-- /rb sum stat neglectparry
|
||||
L["Sum Parry Neglect"] = "Cumul Ignore Parade"
|
||||
--L["Parry Neglect <- Weapon Skill Rating"] = "Ignore Parade <- Score Arme"
|
||||
-- /rb sum stat neglectblock
|
||||
-- /rb sum stat resarcane
|
||||
L["Sum Arcane Resistance"] = "Cumul RA"
|
||||
L["Arcane Resistance Summary"] = "Résumé de la RA"
|
||||
-- /rb sum stat resfire
|
||||
L["Sum Fire Resistance"] = "Cumul RF"
|
||||
L["Fire Resistance Summary"] = "Résumé de la Rf"
|
||||
-- /rb sum stat resnature
|
||||
L["Sum Nature Resistance"] = "Cumul RN"
|
||||
L["Nature Resistance Summary"] = "Résumé de la RN"
|
||||
-- /rb sum stat resfrost
|
||||
L["Sum Frost Resistance"] = "Cumul RG"
|
||||
L["Frost Resistance Summary"] = "Résumé de la RG"
|
||||
-- /rb sum stat resshadow
|
||||
L["Sum Shadow Resistance"] = "Cumul RO"
|
||||
L["Shadow Resistance Summary"] = "Résumé de la RO"
|
||||
-- /rb sum stat maxdamage
|
||||
L["Sum Weapon Max Damage"] = "Cumul Dommage Arme Max"
|
||||
L["Weapon Max Damage Summary"] = "Résumé du Dommage ax de l'Arme"
|
||||
-- /rb sum stat weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum statcomp
|
||||
--L["Stat - Composite"] = "Stats - Composées"
|
||||
--L["Choose composite stats for summary"] = "Choisir les Stats composées du résumé"
|
||||
-- /rb sum statcomp str
|
||||
L["Sum Strength"] = "Cumul Force"
|
||||
L["Strength Summary"] = "Résumé de la Force"
|
||||
-- /rb sum statcomp agi
|
||||
L["Sum Agility"] = "Cumul Agi"
|
||||
L["Agility Summary"] = "Résumé de l'Agilité"
|
||||
-- /rb sum statcomp sta
|
||||
L["Sum Stamina"] = "Cumul Endu"
|
||||
L["Stamina Summary"] = "Résumé de l'Endurance"
|
||||
-- /rb sum statcomp int
|
||||
L["Sum Intellect"] = "Cumul Int"
|
||||
L["Intellect Summary"] = "Résumé de l'Intelligence"
|
||||
-- /rb sum statcomp spi
|
||||
L["Sum Spirit"] = "Cumul Esprit"
|
||||
L["Spirit Summary"] = "Résumé de l'Esprit"
|
||||
-- /rb sum statcomp def
|
||||
L["Defense <- Defense Rating"] = "Def <- Score def"
|
||||
-- /rb sum statcomp wpn
|
||||
L["Sum Weapon Skill"] = "Cumul Comp Arme"
|
||||
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"
|
||||
L["Select a gem set to configure"] = "Selectionnez un set de gemme à configurer."
|
||||
L["Default Gem Set 1"] = "Set de gemme 1"
|
||||
L["Default Gem Set 2"] = "Set de gemme 2"
|
||||
L["Default Gem Set 3"] = "Set de gemme 3"
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "Remplissage automatique des gemmes vides"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
--L["ItemID or Link of the gem you would like to auto fill"] = true
|
||||
L["<ItemID|Link>"] = "<ItemID|Lien>"
|
||||
--L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = true
|
||||
--L["Invalid input: %s. ItemID or ItemLink required."] = true
|
||||
--L["Queried server for Gem: %s. Try again in 5 secs."] = true
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
--L["Second set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 3"] = true
|
||||
-- /rb sum gem2 key
|
||||
--L["Toggle Key"] = true
|
||||
--L["Use this key to toggle alternate gems"] = true
|
||||
-- /rb sum gem3
|
||||
--L["Third set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 2"] = true
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "Niveau d'objet :"
|
||||
L["ItemID: "] = "ID de l'objet :"
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = " de (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)[^%%]", addInfo = "AfterStat",},
|
||||
--{pattern = "grant.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar ID:18348, Assassination Armor set
|
||||
--{pattern = "add.-(%d+)", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone ID:23529
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID:24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [發光的暗影å“奈石] +6法術傷害åŠ5è€åŠ›
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " et ", ",", "%. ", " pour ", "&", ":",
|
||||
-- Fix for [Mirror of Truth]
|
||||
-- Equip: Chance on melee and ranged critical strike to increase your attack power by 1000 for 10 secs.
|
||||
-- 1000 was falsely detected detected as ranged critical strike
|
||||
"augmente votre",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "score de défense", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "score d'esquive", id = CR_DODGE},
|
||||
{pattern = "score de blocage", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "score de parade", id = CR_PARRY},
|
||||
|
||||
{pattern = "score de critique des sorts", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical hit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell crit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "ranged critical strike rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged critical strike", id = CR_CRIT_RANGED}, -- [Heartseeker Scope]
|
||||
{pattern = "ranged critical hit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged critical rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged crit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "critical strike rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical hit rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "crit rating", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "spell hit rating", id = CR_HIT_SPELL},
|
||||
{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},
|
||||
{pattern = "ranged haste rating", id = CR_HASTE_RANGED},
|
||||
{pattern = "haste rating", id = CR_HASTE_MELEE},
|
||||
{pattern = "speed rating", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "expertise rating", id = CR_EXPERTISE},
|
||||
|
||||
{pattern = "hit avoidance rating", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "armor penetration rating", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
--L["$value% Crit"] = true
|
||||
L["$value% Spell Crit"] = "$value% Crit sorts"
|
||||
L["$value% Dodge"] = "$value% Esquive"
|
||||
L["$value HP"] = "$value% PV"
|
||||
L["$value MP"] = "$value% PM"
|
||||
L["$value AP"] = "$value% PA"
|
||||
L["$value RAP"] = "$value% PA dist"
|
||||
L["$value Dmg"] = "$value% Dégats"
|
||||
L["$value Heal"] = "$value% Soins"
|
||||
L["$value Armor"] = "$value% Armure"
|
||||
L["$value Block"] = "$value% Blocage"
|
||||
L["$value MP5"] = "$value% Mana/5sec"
|
||||
L["$value MP5(NC)"] = "$value% Mana/5sec(NC)"
|
||||
L["$value HP5"] = "$value% Vie/5sec"
|
||||
L["$value to be Dodged/Parried"] = "$value% qui sont esquivés/parés"
|
||||
L["$value to be Crit"] = "$value% qui sont crit"
|
||||
L["$value Crit Dmg Taken"] = "$value% Crit dommage reçu"
|
||||
L["$value DOT Dmg Taken"] = "$value% DOT dommage reçu"
|
||||
L["$value% Parry"] = "$value% parer"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value% Sort"
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "Résumé des stats"
|
||||
@@ -0,0 +1,728 @@
|
||||
--[[
|
||||
Name: RatingBuster koKR locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- Slowhand, 7destiny, kcgcom, fenlis
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "koKR")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "아이템 ID 표시",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "RatingBuster 설정"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "GUI를 표시하려면 Waterfall-1.0 라이브러리가 필요합니다!"
|
||||
L["Enabled"] = "사용"
|
||||
L["Suspend/resume this addon"] = "이 애드온 중지/다시 시작"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = "항상"
|
||||
L["ALT Key"] = "ALT 키"
|
||||
L["CTRL Key"] = "CTRL 키"
|
||||
L["SHIFT Key"] = "SHIFT 키"
|
||||
L["Never"] = "표시 안함"
|
||||
L["General Settings"] = "일반 설정"
|
||||
L["Profiles"] = "프로필"
|
||||
-- /rb win
|
||||
L["Options Window"] = "설정창"
|
||||
L["Shows the Options Window"] = "설정창을 보여줍니다."
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = "기본 아이템 비교 숨김"
|
||||
L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = "툴팁에 블리자드의 기본 아이템 비교를 숨깁니다."
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "기본 능력치에 가중치 적용"
|
||||
L["Enable support for Stat Mods"] = "기본 능력치에 특성이나 버프, 태세(형상, 폼)등에 의한 가중치를 적용합니다."
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "방어행동 점감 효과 사용"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "회피, 무기 막기, 빗맞힘 수치를 현재 능력치에서 점감 효과를 적용하여 계산합니다."
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "아이템 ID 표시"
|
||||
L["Show the ItemID in tooltips"] = "툴팁에 아이템 ID를 표시합니다."
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "아이템 레벨 표시"
|
||||
L["Show the ItemLevel in tooltips"] = "툴팁에 아이템 레벨을 표시합니다."
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "최소 요구 레벨 사용"
|
||||
L["Calculate using the required level if you are below the required level"] = "레벨이 낮아 사용하지 못하는 경우 최소 요구 레벨에 따라 계산합니다."
|
||||
-- /rb level
|
||||
L["Set Level"] = "레벨 설정"
|
||||
L["Set the level used in calculations (0 = your level)"] = "계산에 적용할 레벨을 설정합니다. (0 = 자신의 레벨)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "전투 숙련도"
|
||||
L["Options for Rating display"] = "전투 숙련도 표시에 대한 설정입니다."
|
||||
-- /rb rating show
|
||||
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"] = "주문의 적중/가속을 표시합니다."
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "물리 적중/가속 표시"
|
||||
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 exp
|
||||
L["Expertise Breakdown"] = "숙련 세분화"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "숙련을 회피 무시와 무기 막기 무시로 계산해서 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "글자 색상 변경"
|
||||
L["Changes the color of added text"] = "추가된 글자의 색상을 변경합니다."
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "색상"
|
||||
L["Pick a color"] = "색상을 선택합니다."
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "색상 사용"
|
||||
L["Enable colored text"] = "글자에 색상을 적용합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "능력치"
|
||||
L["Changes the display of base stats"] = "기본 능력치의 표시 방법을 변경합니다."
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "기본 능력치 계산 표시"
|
||||
L["Show base stat conversions in tooltips"] = "툴팁에 기본 능력치를 전투 능력치로 계산하여 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "힘"
|
||||
L["Changes the display of Strength"] = "힘의 표시 방법을 변경합니다."
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "전투력 표시"
|
||||
L["Show Attack Power from Strength"] = "힘에 의한 전투력을 표시합니다."
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "피해 방어량 표시"
|
||||
L["Show Block Value from Strength"] = "힘에 의한 피해 방어량을 표시합니다."
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "주문 공격력 표시"
|
||||
L["Show Spell Damage from Strength"] = "힘에 의한 주문 공격력을 표시합니다."
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "치유량 표시"
|
||||
L["Show Healing from Strength"] = "힘에 의한 치유량을 표시합니다."
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "무기 막기"
|
||||
L["Show Parry from Strength"] = "힘에 의한 무기 막기를 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "민첩성"
|
||||
L["Changes the display of Agility"] = "민첩성의 표시 방법을 변경합니다."
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "치명타 표시"
|
||||
L["Show Crit chance from Agility"] = "민첩성에 의한 치명타 확률을 표시합니다."
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "회피 표시"
|
||||
L["Show Dodge chance from Agility"] = "민첩성에 의한 회피율을 표시합니다."
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "전투력 표시"
|
||||
L["Show Attack Power from Agility"] = "민첩성에 의한 전투력을 표시합니다."
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "원거리 전투력 표시"
|
||||
L["Show Ranged Attack Power from Agility"] = "민첩성에 의한 원거리 전투력을 표시합니다."
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "방어도 표시"
|
||||
L["Show Armor from Agility"] = "민첩성에 의한 방어도를 표시합니다."
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "치유량 표시"
|
||||
L["Show Healing from Agility"] = "민첩성에 의한 치유량을 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "체력"
|
||||
L["Changes the display of Stamina"] = "체력의 표시 방법을 변경합니다."
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "생명력 표시"
|
||||
L["Show Health from Stamina"] = "체력에 의한 생명력을 표시합니다."
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "주문 공격력 표시"
|
||||
L["Show Spell Damage from Stamina"] = "체력에 의한 주문 공격력을 표시합니다."
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "치유량 표시"
|
||||
L["Show Healing from Stamina"] = "체력에 의한 치유량을 표시합니다."
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "전투력 표시"
|
||||
L["Show Attack Power from Stamina"] = "체력에 의한 전투력을 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "지능"
|
||||
L["Changes the display of Intellect"] = "지능 표시방법을 변경합니다."
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "주문 극대화 표시"
|
||||
L["Show Spell Crit chance from Intellect"] = "지능에 의한 주문 극대화율 표시"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "마나 표시"
|
||||
L["Show Mana from Intellect"] = "지능에 의한 마나량을 표시합니다."
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "주문 공격력 표시"
|
||||
L["Show Spell Damage from Intellect"] = "지능에 의한 주문 공격력을 표시합니다."
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "치유량 표시"
|
||||
L["Show Healing from Intellect"] = "지능에 의한 치유량을 표시합니다."
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "마나 회복 표시"
|
||||
L["Show Mana Regen while casting from Intellect"] = "지능에 의한 시전중 마나 회복량을 표시합니다."
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "비시전중 마나 회복 표시"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "지능에 의한 비시전중 마나 회복량을 표시합니다."
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "원거리 전투력 표시"
|
||||
L["Show Ranged Attack Power from Intellect"] = "지능에 의한 원거리 전투력을 표시합니다."
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "방어도 표시"
|
||||
L["Show Armor from Intellect"] = "지능에 의한 방어도를 표시합니다."
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "전투력 표시"
|
||||
L["Show Attack Power from Intellect"] = "지능에 의한 전투력을 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "정신력"
|
||||
L["Changes the display of Spirit"] = "정신력의 표시방법을 변경합니다."
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "마나 회복 표시"
|
||||
L["Show Mana Regen while casting from Spirit"] = "정신력에 의한 시전중 마나 회복량을 표시합니다."
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "비시전중 마나 회복 표시"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "정신력에 의한 비시전중 마나 회복량을 표시합니다."
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "생명력 회복 표시"
|
||||
L["Show Health Regen from Spirit"] = "정신력에 의한 (비전투중) 생명력 회복량을 표시합니다."
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "주문 공격력 표시"
|
||||
L["Show Spell Damage from Spirit"] = "정신력에 의한 주문 공격력을 표시합니다."
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "치유량 표시"
|
||||
L["Show Healing from Spirit"] = "정신력에 의한 치유량을 표시합니다."
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = "주문 극대화 표시"
|
||||
L["Show Spell Crit chance from Spirit"] = "정신력에 의한 주문 극대화를 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = "방어도"
|
||||
L["Changes the display of Armor"] = "방어도의 표시방법을 변경합니다."
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = "전투력 표시"
|
||||
L["Show Attack Power from Armor"] = "방어도에 의한 전투력을 표시합니다."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "능력치 요약"
|
||||
L["Options for stat summary"] = "능력치 요약에 대한 설정입니다."
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "능력치 요약 표시"
|
||||
L["Show stat summary in tooltips"] = "툴팁에 능력치 요약을 표시합니다."
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "제외 설정"
|
||||
L["Ignore stuff when calculating the stat summary"] = "능력치 요약 계산에서 제외시킬 항목들을 설정합니다."
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = "원하지 않는 아이템 제외"
|
||||
L["Hide stat summary for undesirable items"] = "원하지 않는 아이템의 능력치를 숨깁니다."
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = "최소 아이템 품질"
|
||||
L["Show stat summary only for selected quality items and up"] = "선택한 품질 아이템의 이상인 능력치를 표시합니다."
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = "방어구 유형"
|
||||
L["Select armor types you want to ignore"] = "제외를 원하는 방어구 유형을 선택합니다."
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = "제외 - 천"
|
||||
L["Hide stat summary for all cloth armor"] = "모든 천 방어구의 능력치를 숨깁니다."
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = "제외 - 가죽"
|
||||
L["Hide stat summary for all leather armor"] = "모든 가죽 방어구의 능력치를 숨깁니다."
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = "제외 - 사슬"
|
||||
L["Hide stat summary for all mail armor"] = "모든 사슬 방어구의 능력치를 숨깁니다."
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = "제외 - 판금"
|
||||
L["Hide stat summary for all plate armor"] = "모든 판금 방어구의 능력치를 숨깁니다."
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "착용 아이템 제외"
|
||||
L["Hide stat summary for equipped items"] = "능력치 요약 계산에 착용한 아이템은 포함시키지 않습니다."
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "마법부여 제외"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "능력치 요약 계산에 아이템에 부여한 마법부여를 포함시키지 않습니다."
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "보석 제외"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "능력치 요약 계산에 아이템에 장착한 보석을 포함시키지 않습니다."
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = "다색 보석 홈 제외"
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = "능력치 요약 계산에 다색 보석 홈을 포함시키지 않습니다."
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "차이값 표시 방식"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "기본 툴팁 또는 비교 툴팁에 차이나는 수치를 표시합니다."
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "구분선 추가"
|
||||
L["Add a empty line before or after stat summary"] = "능력치 요약 앞/뒤에 구분선을 추가합니다."
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "요약 앞에 추가"
|
||||
L["Add a empty line before stat summary"] = "능력치 요약 앞에 구분선을 추가합니다."
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "요약 뒤에 추가"
|
||||
L["Add a empty line after stat summary"] = "능력치 요약 뒤에 구분선을 추가합니다."
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "아이콘 표시"
|
||||
L["Show the sigma icon before summary listing"] = "요약 목록 앞에 시그마 아이콘을 표시합니다."
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "제목 표시"
|
||||
L["Show the title text before summary listing"] = "요약 목록 앞에 제목을 표시합니다."
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "제로 능력치 표시"
|
||||
L["Show zero value stats in summary for consistancy"] = "통일되게 보이도록 대한 요약에 제로값의 능력치를 표시합니다."
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "능력치 합계 계산"
|
||||
L["Calculate the total stats for the item"] = "아이템에 대한 총 능력치를 계산합니다."
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "능력치 차이 계산"
|
||||
L["Calculate the stat difference for the item and equipped items"] = "선택한 아이템과 착용한 아이템의 능력치 차이를 계산합니다."
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "능력치 요약 정렬"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "능력치 요약을 알파벳순으로 정렬합니다, 능력치별로 정렬하려면 비활성화하세요.(기본, 물리, 주문, 방어)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "방어행동 (Avoidance) 요약에 방패 막기 포함"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "방어행동 (Avoidance) 요약에 방패박기를 포함시킵니다. 회피, 무기 막기, 빗맞힘만 포함시키려면 비활성화하세요."
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "능력치 - 기본"
|
||||
L["Choose basic stats for summary"] = "기본 능력치를 선택합니다."
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "생명력 합계"
|
||||
L["Health <- Health, Stamina"] = "생명력 <- 생명력, 체력"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "마나 합계"
|
||||
L["Mana <- Mana, Intellect"] = "마나 < 마나, 지능"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "마나 회복 합계"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "마나 회복 <- 마나 회복, 정신력"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "비시전중 마나 회복"
|
||||
L["Mana Regen while not casting <- Spirit"] = "비시전중 마나 회복 <- 정신력"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "생명력 회복 합계"
|
||||
L["Health Regen <- Health Regen"] = "생명력 회복 <- 생명력 회복"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "비전투중 생명력 회복"
|
||||
L["Health Regen when out of combat <- Spirit"] = "비전투중 생명력 회복 <- 정신력"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "힘 합계"
|
||||
L["Strength Summary"] = "힘 요약"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "민첩성 합계"
|
||||
L["Agility Summary"] = "민첩성 요약"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "체력 합계"
|
||||
L["Stamina Summary"] = "체력 요약"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "지능 합계"
|
||||
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"] = "능력치 - 물리"
|
||||
L["Choose physical damage stats for summary"] = "물리 공격력 능력치를 선택합니다."
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "전투력 합계"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "전투력 <- 전투력, 힘, 민첩성"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "원거리 전투력 합계"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "원거리 전투력 <- 원거리 전투력, 지능, 전투력, 힘, 민첩성"
|
||||
-- /rb sum physical fap
|
||||
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"] = "적중률 <- 적중도, 무기 숙련도"
|
||||
-- /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"] = "치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "치명타 적중도 합계"
|
||||
L["Crit Rating Summary"] = "치명타 적중도 요약"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "가속율 합계"
|
||||
L["Haste <- Haste Rating"] = "가속율 <- 공격 가속도"
|
||||
-- /rb sum physical hasterating
|
||||
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"] = "원거리 적중률 <- 적중도, 무기 숙련도, 원거리 적중도"
|
||||
-- /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"] = "원거리 치명타율 <- 치명타 적중도, 민첩성, 무기 숙련도, 치명타 적중도"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "원거리 치명타 적중도 합계"
|
||||
L["Ranged Crit Rating Summary"] = "원거리 치명타 적중도 요약"
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = "원거리 공격 가속율 합계"
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = "원거리 공격 가속율 <- 공격 가속도, 원거리 가속율"
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = "원거리 공격 가속도 합계"
|
||||
L["Ranged Haste Rating Summary"] = "원거리 공격 가속도 요약"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "무기 최대 공격력 합계"
|
||||
L["Weapon Max Damage Summary"] = "무기 최대 공격력 요약"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "무기 숙련 합계"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "무기 숙련 <- 무기 숙련도"
|
||||
-- /rb sum physical exp
|
||||
L["Sum Expertise"] = "숙련 합계"
|
||||
L["Expertise <- Expertise Rating"] = "숙련 <- 숙련도"
|
||||
-- /rb sum physical exprating
|
||||
--L["Sum Expertise Rating"] = true
|
||||
--L["Expertise Rating Summary"] = true
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "능력치 - 주문"
|
||||
L["Choose spell damage and healing stats for summary"] = "주문 공격력과 치유량 능력치를 선택합니다."
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "주문 공격력 합계"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "주문 공격력 <- 주문 공격력, 지능, 정신력, 체력"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "신성 주문 공격력 합계"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "신성 주문 공격력 <- 신성 주문 공격력, 주문 공격력, 지능, 정신력"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "비전 주문 공격력 합계"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "비전 주문 공격력 <- 비전 주문 공격력, 주문 공격력, 지능"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "화염 주문 공격력 합계"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "화염 주문 공격력 <- 화염 주문 공격력, 주문 공격력, 지능, 체력"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "자연 주문 공격력 합계"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "자연 주문 공격력 <- 자연 주문 공격력, 주문 공격력, 지능"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "냉기 주문 공격력 합계"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "냉기 주문 공격력 <- 냉기 주문 공격력, 주문 공격력, 지능"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "암흑 주문 공격력 합계"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "암흑 주문 공격력 <- 암흑 주문 공격력, 주문 공격력, 지능, 정신력, 체력"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "치유량 합계"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "치유량 <- 치유량, 지능, 정신력, 민첩성, 힘"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "주문 극대화율 합계"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "주문 극대화율 <- 주문 극대화 적중도, 지능"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "주문 적중율 합계"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "주문 적중율 <- 주문 적중도"
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "주문 가속 합계"
|
||||
L["Spell Haste <- Spell Haste Rating"] = "주문 가속 <- 주문 가속도"
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "주문 관통력 합계"
|
||||
L["Spell Penetration Summary"] = "주문 관통력 요약"
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = "주문 적중도 합계"
|
||||
L["Spell Hit Rating Summary"] = "주문 적중도 요약"
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = "주문 극대화 적중도 합계"
|
||||
L["Spell Crit Rating Summary"] = "주문 극대화 적중도 요약"
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = "주문 가속도"
|
||||
L["Spell Haste Rating Summary"] = "주문 가속도 요약"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
L["Stat - Tank"] = "능력치 - 방어"
|
||||
L["Choose tank stats for summary"] = "방어 능력치를 선택합니다."
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "방어도 합계"
|
||||
--L["Armor <- Armor from items and bonuses"] = "방어도 <- 아이템 방어도, 방어도 보너스, 민첩성, 지능"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "회피율 합계"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "회피율 <- 회피 숙련도, 민첩성, 방어 숙련도"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "무기 막기 확률 합계"
|
||||
--L["Parry Chance <- Parry Rating"] = "무기 막기 확률 <- 무기 막기 숙련도, 방어 숙련도"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "방패 막기 확률 합계"
|
||||
--L["Block Chance <- Block Rating"] = "방패 막기 확률 <- 방패 막기 숙련도, 방어 숙련도"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "회피 무시 합계"
|
||||
--L["Dodge Neglect <- Expertise"] = "회피 무시 <- 숙련도, 무기 숙련도"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "무기 막기 무시 합계"
|
||||
--L["Parry Neglect <- Expertise"] = "무기 막기 무시 <- 숙련도, 무기 숙련도"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "비전 저항력 합계"
|
||||
L["Arcane Resistance Summary"] = "비전 저항력 요약"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "화염 저항력 합계"
|
||||
L["Fire Resistance Summary"] = "화염 저항력 요약"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "자연 저항력 합계"
|
||||
L["Nature Resistance Summary"] = "자연 저항력 요약"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "냉기 저항력 합계"
|
||||
L["Frost Resistance Summary"] = "냉기 저항력 요약"
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = "암흑 저항력 합계"
|
||||
L["Shadow Resistance Summary"] = "암흑 저항력 요약"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "회피 숙련도 합계"
|
||||
L["Dodge Rating Summary"] = "회피 숙련도 요약"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "무기 막기 합계"
|
||||
L["Parry Rating Summary"] = "무기 막기 숙련도 요약"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "방패 막기 숙련도 합계"
|
||||
L["Block Rating Summary"] = "방어 막기 숙련도 요약"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "탄력 합계"
|
||||
L["Resilience Summary"] = "탄력 요약"
|
||||
-- /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"] = "총 피해감소 <- 방어도, 회피, 무기 막기, 방패 막기, 피해 방어량, 방어 숙련, 탄력, 빗맞힘(자신), 치명타 감소, 몹강타, 피해감소 효과"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "총 방어행동 합계"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "방어행동 (Avoidance) <- 회피, 무기 막기, 빗맞힘, 방패 막기(선택적)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = "보석 설정"
|
||||
L["Select a gem set to configure"] = "보석 설정의 구성을 선택합니다."
|
||||
L["Default Gem Set 1"] = "기본 보석 설정 1"
|
||||
L["Default Gem Set 2"] = "기본 보석 설정 2"
|
||||
L["Default Gem Set 3"] = "기본 보석 설정 3"
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "빈 보석 슬롯을 자동으로 채웁니다."
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = "자동으로 채우고 싶은 보석의 아이템ID & 링크를 입력하세요."
|
||||
L["<ItemID|Link>"] = "<아이템ID|링크>"
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = "현재 |cffffff7f%s|r에 |cffffff7f[%s]|r 설정"
|
||||
L["Invalid input: %s. ItemID or ItemLink required."] = "잘못된 입력값 : %s. 아이템ID 나 아이템 링크가 필요합니다."
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = "서버에 보석 조회중: %s. 5초 후 다시하세요."
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
L["Second set of default gems which can be toggled with a modifier key"] = true
|
||||
L["Can't use the same modifier as Gem Set 3"] = true
|
||||
-- /rb sum gem2 key
|
||||
L["Toggle Key"] = "전환 키"
|
||||
L["Use this key to toggle alternate gems"] = "대체 보석으로 전환하는데 사용할 키"
|
||||
-- /rb sum gem3
|
||||
L["Third set of default gems which can be toggled with a modifier key"] = true
|
||||
L["Can't use the same modifier as Gem Set 2"] = true
|
||||
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "아이템레벨: "
|
||||
L["ItemID: "] = "아이템ID: "
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = "(%d+)만큼", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterNumber",},
|
||||
--{pattern = "grant.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
--{pattern = "add.-(%d+)", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID:24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [發光的暗影卓奈石] +6法術傷害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " and ", ",", "%. ", " for ", "&", ":",
|
||||
-- Fix for [Mirror of Truth]
|
||||
-- Equip: Chance on melee and ranged critical strike to increase your attack power by 1000 for 10 secs.
|
||||
-- 1000 was falsely detected detected as ranged critical strike
|
||||
"increase your",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "힘"
|
||||
SPELL_STAT2_NAME = "민첩성"
|
||||
SPELL_STAT3_NAME = "체력"
|
||||
SPELL_STAT4_NAME = "지능"
|
||||
SPELL_STAT5_NAME = "정신력"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "방어 숙련도", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "회피 숙련도", id = CR_DODGE},
|
||||
{pattern = "방패 막기 숙련도", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "무기 막기 숙련도", id = CR_PARRY},
|
||||
|
||||
{pattern = "주문 극대화 적중도", id = CR_CRIT_SPELL},
|
||||
{pattern = "주문의 극대화 적중도", id = CR_CRIT_SPELL},
|
||||
-- {pattern = "spell critical rating", id = CR_CRIT_SPELL},
|
||||
-- {pattern = "spell crit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "원거리 치명타 적중도", id = CR_CRIT_RANGED},
|
||||
{pattern = "원거리 치명타", id = CR_CRIT_RANGED}, -- [Heartseeker Scope]
|
||||
-- {pattern = "ranged critical hit rating", id = CR_CRIT_RANGED},
|
||||
-- {pattern = "ranged critical rating", id = CR_CRIT_RANGED},
|
||||
-- {pattern = "ranged crit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "치명타 적중도", id = CR_CRIT_MELEE},
|
||||
{pattern = "근접 치명타 적중도", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical rating", id = CR_CRIT_MELEE},
|
||||
-- {pattern = "crit rating", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "주문 적중도", id = CR_HIT_SPELL},
|
||||
{pattern = "원거리 적중도", id = CR_HIT_RANGED},
|
||||
{pattern = "적중도", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "탄력도", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "주문 가속도", id = CR_HASTE_SPELL},
|
||||
{pattern = "주문 시전 가속도", id = CR_HASTE_SPELL},
|
||||
{pattern = "원거리 공격 가속도", id = CR_HASTE_RANGED},
|
||||
{pattern = "공격 가속도", id = CR_HASTE_MELEE},
|
||||
{pattern = "가속도", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "무기 숙련도", id = CR_WEAPON_SKILL},
|
||||
{pattern = "숙련도", id = CR_EXPERTISE},
|
||||
{pattern = "숙련", id = CR_EXPERTISE}, -- WotLK beta Gem
|
||||
|
||||
{pattern = "근접 공격 회피", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "방어구 관통력", id = CR_ARMOR_PENETRATION}, --armor penetration rating
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "치명타 $value%"
|
||||
L["$value% Spell Crit"] = "극대화 $value%"
|
||||
L["$value% Dodge"] = "회피 $value%"
|
||||
L["$value HP"] = "생명력 $value"
|
||||
L["$value MP"] = "마나 $value"
|
||||
L["$value AP"] = "전투력 $value"
|
||||
L["$value RAP"] = "원거리 $value"
|
||||
L["$value Dmg"] = "주문력 $value"
|
||||
L["$value Heal"] = "치유량 $value"
|
||||
L["$value Armor"] = "방어도 $value"
|
||||
L["$value Block"] = "방피량 $value"
|
||||
L["$value MP5"] = "$value MP5"
|
||||
L["$value MP5(NC)"] = "$value MP5(비시전)"
|
||||
L["$value HP5"] = "$value HP5"
|
||||
L["$value to be Dodged/Parried"] = "회피/막음 $value"
|
||||
L["$value to be Crit"] = "치명타 적중 $value"
|
||||
L["$value Crit Dmg Taken"] = "치명타 피해 $value"
|
||||
L["$value DOT Dmg Taken"] = "DoT 피해 $value"
|
||||
L["$value% Parry"] = "무막 $value%"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "주문 $value"
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "능력치 요약"
|
||||
@@ -0,0 +1,789 @@
|
||||
--[[
|
||||
Name: RatingBuster ruRU locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- Orsana \ StingerSoft \ Swix
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "ruRU")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "Показывать ID",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "Окно настроек"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "Требуется Waterfall чтобы открыть настройки"
|
||||
L["Enabled"] = "Включён"
|
||||
L["Suspend/resume this addon"] = "Отключить/Запустить аддон"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = "Всегда"
|
||||
L["ALT Key"] = "Клавиша ALT"
|
||||
L["CTRL Key"] = "Клавиша CTRL"
|
||||
L["SHIFT Key"] = "Клавиша SHIFT"
|
||||
L["Never"] = "Никогда"
|
||||
L["General Settings"] = "Основные настройки"
|
||||
L["Profiles"] = "Профили"
|
||||
-- /rb win
|
||||
L["Options Window"] = "Окно настроек"
|
||||
L["Shows the Options Window"] = "Показать окно настроек"
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = "Скрыть сравнение от Blizzardа"
|
||||
L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = "Отключить сравнение предметов Blizzard, если используется метод сравнения RatingBusterа"
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "Включить модуль статистики"
|
||||
L["Enable support for Stat Mods"] = "Включает поддержку модуля статистики"
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "Включить убывания уклонений от удара"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "Значения уклонения, парирования, уклонений от удара при расчетах будет использоваться формула убывания (deminishing return) уклонений от удара по вашим текущим данным"
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "Показывать ID предметов"
|
||||
L["Show the ItemID in tooltips"] = "Показывать ID предметов в подсказке"
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "Показывать уровень предмета"
|
||||
L["Show the ItemLevel in tooltips"] = "Показывать уровень предмета в подсказке"
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "Использовать необходимый уровень"
|
||||
L["Calculate using the required level if you are below the required level"] = "Рассчитывать статы исходя из минимально необходимого для надевания предмета уровня, если вы ниже этого уровня"
|
||||
-- /rb level
|
||||
L["Set Level"] = "Задать уровень"
|
||||
L["Set the level used in calculations (0 = your level)"] = "Задать уровень используемый в расчетах (0 - ваш уровень)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "Рейтинги"
|
||||
L["Options for Rating display"] = "Настройки отображения рейтингов"
|
||||
-- /rb rating show
|
||||
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"] = "Показывать меткость/скорость заклинаний из рейтинга меткости/скорость"
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "Меткость/скорость физических атак"
|
||||
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 exp
|
||||
L["Expertise Breakdown"] = "Разбивать уровень мастерства"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "Разбивать уровень мастерства на игнорирование уклонения и парирования"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "Изменить цвет текста"
|
||||
L["Changes the color of added text"] = "Изменить цвет добавляемого текста"
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "Выбрать цвет"
|
||||
L["Pick a color"] = "Выбрать цвет"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "Включить цвет текста"
|
||||
L["Enable colored text"] = "Включить цвет текста"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "Настройки статов"
|
||||
L["Changes the display of base stats"] = "Показывать изменения базовых статов"
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "Показывать изменение базовых статов"
|
||||
L["Show base stat conversions in tooltips"] = "Отображать изменение базовых статов"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "Сила"
|
||||
L["Changes the display of Strength"] = "Показывать изменение силы"
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "Сила атаки"
|
||||
L["Show Attack Power from Strength"] = "Показывать изменение силы атаки от силы"
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "Блокирование"
|
||||
L["Show Block Value from Strength"] = "Показывать изменение блокирования от силы"
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "Урон от заклинаний"
|
||||
L["Show Spell Damage from Strength"] = "Показывать изменение урона заклинаниями от силы"
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "Исцеление"
|
||||
L["Show Healing from Strength"] = "Показывать изменение исцеления от силы"
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "Парирование"
|
||||
L["Show Parry from Strength"] = "Показывать изменения парирования от силы"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "Ловкость"
|
||||
L["Changes the display of Agility"] = "Показывать изменения ловкости"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "Крит. удар"
|
||||
L["Show Crit chance from Agility"] = "Показывать изменение крит. удара от ловкости"
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "Уклонение"
|
||||
L["Show Dodge chance from Agility"] = "Показывать изменение уклонения от ловкости"
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "Сила атаки"
|
||||
L["Show Attack Power from Agility"] = "Показывать изменение силы атаки от ловкости"
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "Сила атаки дальнего боя"
|
||||
L["Show Ranged Attack Power from Agility"] = "Показывать изменение силы атаки дальнего боя от ловкости"
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "Броня"
|
||||
L["Show Armor from Agility"] = "Показывать изменение брони от ловкости"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "Исцеление"
|
||||
L["Show Healing from Agility"] = "Показывать изменение исцеления от ловкости"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "Выносливость"
|
||||
L["Changes the display of Stamina"] = "Показывать изменение выносливости"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "Здоровье"
|
||||
L["Show Health from Stamina"] = "Показывать изменение здоровья от выносливости"
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "Урон от заклинаний"
|
||||
L["Show Spell Damage from Stamina"] = "Показывать изменение урона заклинаниями от выносливости"
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "Исцеление"
|
||||
L["Show Healing from Stamina"] = "Показывать изменение исцеления от выносливости"
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "Силы атаки"
|
||||
L["Show Attack Power from Stamina"] = "Показывать изменение силы атаки от выносливости"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "Интеллект"
|
||||
L["Changes the display of Intellect"] = "Показывать изменение интеллекта"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "Крит. удар от заклинаний"
|
||||
L["Show Spell Crit chance from Intellect"] = "Показывать изменение крит. удара заклинаний от интеллекта"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "Мана"
|
||||
L["Show Mana from Intellect"] = "Показывать изменение маны от интеллекта"
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "Урон от заклинаний"
|
||||
L["Show Spell Damage from Intellect"] = "Показывать изменение урона заклинаний от интеллекта"
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "Исцеление"
|
||||
L["Show Healing from Intellect"] = "Показывать изменение исцеления от интеллекта"
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "Восполнение маны"
|
||||
L["Show Mana Regen while casting from Intellect"] = "Показывать изменение восполнения маны от интеллекта"
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Изменение восполнения маны(вне каста)"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "Показывать изменение восполнения маны от интеллекта (вне каста)"
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "Сила атаки дальнего боя"
|
||||
L["Show Ranged Attack Power from Intellect"] = "Показывать изменение силы атаки дальнего боя от интеллекта"
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "Броня"
|
||||
L["Show Armor from Intellect"] = "Показывать изменение брони от интеллекта"
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "Силы атаки"
|
||||
L["Show Attack Power from Intellect"] = "Показывать изменение силы атаки от интеллекта"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "Дух"
|
||||
L["Changes the display of Spirit"] = "Показывать изменение духа"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "Восполнение маны"
|
||||
L["Show Mana Regen while casting from Spirit"] = "Показывать изменение восполнения маны от духа"
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "Показывать изменение восполнения маны (вне каста)"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "Показывать изменение восполнения маны от духа (вне каста)"
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "Восполнение здаровья"
|
||||
L["Show Health Regen from Spirit"] = "Показывать изменение восполнения здоровья от духа"
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "Урон от заклинаний"
|
||||
L["Show Spell Damage from Spirit"] = "Показывать изменение урона заклинаний от духа"
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "Исцеление"
|
||||
L["Show Healing from Spirit"] = "Показывать изменение исцеления от духа"
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = "Крит. удар заклинаний"
|
||||
L["Show Spell Crit chance from Spirit"] = "Показывать изменение вероятности критического удара заклинаниями от духа"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = "Броня"
|
||||
L["Changes the display of Armor"] = "Показывать изменение брони"
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = "Силы атаки"
|
||||
L["Show Attack Power from Armor"] = "Показывать изменение силы атаки от брони"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "Настройки итогов"
|
||||
L["Options for stat summary"] = "Итоги по статам"
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "Показывать суммарные изменения"
|
||||
L["Show stat summary in tooltips"] = "Показывать суммарные изменения"
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "Настройки игнорирования"
|
||||
L["Ignore stuff when calculating the stat summary"] = " Настройка игнорирования при расчете итога"
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = "Игнорирование неподходящих предметов"
|
||||
L["Hide stat summary for undesirable items"] = "Скрыть итоги по статам для неподходящих предметов"
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = "Мин. качество предмета"
|
||||
L["Show stat summary only for selected quality items and up"] = "Показывать итоги по статам только для выбранного качества предметов и выше"
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = "Тип брони"
|
||||
L["Select armor types you want to ignore"] = "Выберите тип брони, который будет игнорироваться"
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = "Игнорировать ткань"
|
||||
L["Hide stat summary for all cloth armor"] = "Скрыть итоги по статам для всех доспехов из ткани"
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = "Игнорированть кожу"
|
||||
L["Hide stat summary for all leather armor"] = "Скрыть итоги по статам для всех доспехов из кожы"
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = "Игнорированть кальчугу"
|
||||
L["Hide stat summary for all mail armor"] = "Скрыть итоги по статам для всех доспехов из кальчуги"
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = "Игнорированть латы"
|
||||
L["Hide stat summary for all plate armor"] = "Скрыть итоги по статам для всех доспехов из лат"
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "Не показывать для надетых вещей"
|
||||
L["Hide stat summary for equipped items"] = "Не показывать для надетых вещей"
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "Игнорировать чары"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "Игнорировать чары при расчете итога"
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "Игнорировать самоцветы"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "Игнорировать самоцветы при расчете итога"
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = "Игнорировать радужные гнёзда"
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = "Игнорировать гнезда для радужного самоцвета при расчете итога"
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "Стиль отображения отличия значений"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "Отображения различных значений в главной подсказке или только в сравнительных подсказках"
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "Добавить пустую линию"
|
||||
L["Add a empty line before or after stat summary"] = "Добавить пустую линию перед или после итогов"
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "Добавить линию до итога"
|
||||
L["Add a empty line before stat summary"] = "Добавить линию до итога"
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "Добавить линию после итога"
|
||||
L["Add a empty line after stat summary"] = "Добавить линию после итога"
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "Добавить иконку"
|
||||
L["Show the sigma icon before summary listing"] = "Добавит иконку до списка итога"
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "Показывать заголовок"
|
||||
L["Show the title text before summary listing"] = "Показывать заголовок до списка итога"
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "Показывать нулевые статы"
|
||||
L["Show zero value stats in summary for consistancy"] = "Показывать нулевые статы"
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "Рассчитать сумму стат"
|
||||
L["Calculate the total stats for the item"] = "Рассчитать все статы для предмета"
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "Рассчитывать разницу в статах"
|
||||
L["Calculate the stat difference for the item and equipped items"] = "Рассчитывать разницу в статах с надетой вещью"
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "Сортировать статы в алфавитном порядке"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "Если включено - то по алфавиту, если выключено, то по смыслу (базовые, физические, заклинания, танковые)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "Включать вероятность блока в итоге избежаний"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "Включать вероятность блока в итоге избежаний, отключение только для уклона, парирования, промоха"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "Статы - базовые"
|
||||
L["Choose basic stats for summary"] = "Выбор базовых статов для подсчета"
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "Сумма здоровья"
|
||||
L["Health <- Health, Stamina"] = "Здоровье <- Здоровье, Выносливость"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "Сумма маны"
|
||||
L["Mana <- Mana, Intellect"] = "Мана <- Мана, Интеллект"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "Сумма восстановления маны"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "Восстановление маны <- Восстановления маны, Дух"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "Сумма восстановления маны вне применения"
|
||||
L["Mana Regen while not casting <- Spirit"] = "Сумма восстановления маны вне применения <- Дух"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "Сумма восстановления здоровья"
|
||||
L["Health Regen <- Health Regen"] = "Восстановление здоровья <- Восстановление здоровья"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "Сумма восстановления здоровья вне применения"
|
||||
L["Health Regen when out of combat <- Spirit"] = "Сумма восстановления здоровья вне применения <- Дух"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "Сумма силы"
|
||||
L["Strength Summary"] = "Суммировать силу"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "Сумма ловкости"
|
||||
L["Agility Summary"] = "Суммировать ловкость"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "Сумма выносливости"
|
||||
L["Stamina Summary"] = "Суммировать выносливость"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "Сумма интеллекта"
|
||||
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"] = "Статы - физические"
|
||||
L["Choose physical damage stats for summary"] = "Выбор статов физического урона для подсчета"
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "Сумма силы атаки"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "Сила атаки <- Сила атаки, Сила, Ловкость"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "Сумма силы атаки дальнего боя"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "Сила атаки дальнего боя <- Сила атаки дальнего боя, Интеллект, Сила атаки, Сила, Ловкость"
|
||||
-- /rb sum physical fap
|
||||
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"] = "Вероятности поподания <- Рейтинг меткости, Рейтинг владения оружием"
|
||||
-- /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"] = "Вероятности крит удара <- Рейтинг крит удара, Ловкость, Рейтинг владения оружием"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "Сумма рейтинга крита"
|
||||
L["Crit Rating Summary"] = "Суммировать рейтинг крит удара"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "Сумма скорости"
|
||||
L["Haste <- Haste Rating"] = "Скорость <- Рейтинг скорости"
|
||||
-- /rb sum physical hasterating
|
||||
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"] = "Вероятность поподания в дальнем бою <- Рейтинг меткости, Рейтинг владения оружием, Рейтинг меткости дальнего боя"
|
||||
-- /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"] = "Вероятность крита в дальнем бою <- Рейтинг крита, Ловкость, Рейтинг владения оружием, Рейтинга крит удара дальнего боя"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "Сумма рейтинга крит удара дальнего боя"
|
||||
L["Ranged Crit Rating Summary"] = "Суммировать рейтинг критического удара в дальнем бою"
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = "Сумма скорости дальнего боя"
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = "Скорости дальнего боя <- Рейтинг скорости, Рейтинг скорости дальнего боя"
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = "Сумма рейтинга скорости дальнего боя"
|
||||
L["Ranged Haste Rating Summary"] = "Суммировать рейтинг скорости дальнего боя"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "Сумма макс урона оружия"
|
||||
L["Weapon Max Damage Summary"] = "Суммировать макс урон уружия"
|
||||
-- /rb sum physical weapondps
|
||||
L["Sum Weapon DPS"] = "Сумма УВС оружия"
|
||||
L["Weapon DPS Summary"] = "Суммировать урон в секунду от оружия"
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "Сумма оружейного навык"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "Оружейный навык <- Рейтинг владения оружием"
|
||||
-- /rb sum physical exp
|
||||
L["Sum Expertise"] = "Сумма мастерства"
|
||||
L["Expertise <- Expertise Rating"] = "Мастерство <- рейтинг мастерства"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "Сумма рейтинга мастерства"
|
||||
L["Expertise Rating Summary"] = "Суммировать рейтинг мастерства"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "Статы - заклинания"
|
||||
L["Choose spell damage and healing stats for summary"] = "Выбор статов исцеления и урона заклинаниями для посчета"
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "Сумма урона заклинаниями"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "Урон заклинаниями <- Урон заклинаниями, Интеллект, Дух, Выносливость"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "Сумма урона светлой магией"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "Урон светлой магии <- Урон светлой магией, Урон заклинаниями, Интеллект, Дух"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "Сумма урона тайной магией"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "Урон тайной магией <- Урон тайной магией, Урон заклинаниями, Интеллект"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "Сумма урона магией огня"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "Урон магией огня <- Урон магией огня, Урон заклинаниями, Интеллект, Выносливость"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "Сумма урона силами природы"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "Урон силами природы <- Урон силами природы, Урон заклинаниями, Интеллект"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "Сумма урона магией льда"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "Урон магией льда <- Урон магией льда, Урон заклинаниями, Интеллект"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "Сумма урона темной магией"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "Урон темной магией <- Урон темной магией, Урон заклинаниями, Интеллект, Дух, Выносливость"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "Сумма исцеления"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "Исцеление <- Исцеление, Интеллект, Дух, Ловкость, Сила"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "Сумма вероятности крита заклинания"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "Вероятность крита заклинания <- Рейтинг крита удара заклинаниями, Интеллект"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "Сумма вероятности поподания заклинаний"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "Вероятность поподания заклинаний <- Рйтинг меткости заклинаний"
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "Сумма скорости заклинаний"
|
||||
L["Spell Haste <- Spell Haste Rating"] = "Скорость заклинаний <- Рейтинг скорости заклинаний"
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "Сумма проникающей способности"
|
||||
L["Spell Penetration Summary"] = "Суммировать проникающую способность заклинаний"
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = "Сумма рейтинга меткости заклинаний"
|
||||
L["Spell Hit Rating Summary"] = "Суммировать рейтинг меткости заклинаний"
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = "Сумма рейтинга крит удара заклинаниями"
|
||||
L["Spell Crit Rating Summary"] = "Суммировать рейтинг крит удара заклинаниями"
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = "Сумма рейтинга скорости заклинаний"
|
||||
L["Spell Haste Rating Summary"] = "Суммировать рейтинг скорости заклинаний"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
L["Stat - Tank"] = "Статы - танкования"
|
||||
L["Choose tank stats for summary"] = "Выбор статов танкования для подсчета"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "Сумма брони"
|
||||
--L["Armor <- Armor from items and bonuses"] = "Броня <- Броня с одежды, Броня от бонусов, Ловкость, Интеллект"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "Сумма вероятности уклонения"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "Вероятность уклонения <- рейтинг уклонения, ловкость, рейтинг защиты"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "Сумма вероятности парирования"
|
||||
--L["Parry Chance <- Parry Rating"] = "Вероятность парирования <- рейтинг парирования, рейтинг защиты"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "Сумма вероятности блокирования"
|
||||
--L["Block Chance <- Block Rating"] = "Вероятность блокирования <- рейтинг блокирования, рейтинг защиты"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "Сумма игнорирования уклонения"
|
||||
--L["Dodge Neglect <- Expertise"] = "Игнорирование уклонения <- Мастерство, Рейтинг владения оружием"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "Сумма игнорирования парирования"
|
||||
--L["Parry Neglect <- Expertise"] = "Игнорирование парирования <- Мастерство, Рейтинг владения оружием"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "Сумма защиты от тайной магии"
|
||||
L["Arcane Resistance Summary"] = "Суммировать сопротивление тайной магии"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "Сумма защиты от огня"
|
||||
L["Fire Resistance Summary"] = "Суммировать сопротивление огню"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "Сумма защиты от магии природы"
|
||||
L["Nature Resistance Summary"] = "Суммировать сопротивление силам природы"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "Сумма защиты от магии льда"
|
||||
L["Frost Resistance Summary"] = "Суммировать сопротивление магии льда"
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = "Сумма защиты от темной магии"
|
||||
L["Shadow Resistance Summary"] = "Суммировать сопротивление темной магии"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "Сумма рейтинга уклонения"
|
||||
L["Dodge Rating Summary"] = "Суммировать рейтинг уклонения"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "Сумма рейтинга парирования"
|
||||
L["Parry Rating Summary"] = "Суммировать рейтинг парирования"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "Сумма рейтинга блока"
|
||||
L["Block Rating Summary"] = "Суммировать рейтинг блока"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "Сумма устойчивости"
|
||||
L["Resilience Summary"] = "Суммировать устойчивость"
|
||||
-- /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"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "Сумма уклонения от удара"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "Уклонение от удара <- Уклонение, Парирование, ПромахСущества, Блок(дополнительный)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = "Набор самоцветов"
|
||||
L["Select a gem set to configure"] = "Для настройки выберите набор самоцветов"
|
||||
L["Default Gem Set 1"] = "Набор по умолчанию 1"
|
||||
L["Default Gem Set 2"] = "Набор по умолчанию 2"
|
||||
L["Default Gem Set 3"] = "Набор по умолчанию 3"
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "Автозаполнение пустых слотов"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = "ID предмета или ссылка на самоцвет, кторым вы хотите автозаполнять слоты"
|
||||
L["<ItemID|Link>"] = "<ItemID|Link>"
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = "|cffffff7f%s|r в настоящее время установлена на |cffffff7f[%s]|r"
|
||||
L["Invalid input: %s. ItemID or ItemLink required."] = "Ошибочный ввод: %s. Требуется ID предмета либо ссылка."
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = "Запрос у сервера самоцвета: %s. Повторная попытка через 5 сек."
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
L["Second set of default gems which can be toggled with a modifier key"] = "Второй набор самоцветов по умолчанию который может быть переключен с помощью клавиш"
|
||||
L["Can't use the same modifier as Gem Set 3"] = "Нельзя использовать теже клавиши что и у набора самоцветов 3"
|
||||
-- /rb sum gem2 key
|
||||
L["Toggle Key"] = "Клавиша переключения"
|
||||
L["Use this key to toggle alternate gems"] = "Используйте данную клавишу для переключения альтернативных самоцветов"
|
||||
-- /rb sum gem3
|
||||
L["Third set of default gems which can be toggled with a modifier key"] = "Третий набор самоцветов по умолчанию который может быть переключен с помощью клавиш"
|
||||
L["Can't use the same modifier as Gem Set 2"] = "Нельзя использовать теже клавиши что и у набора самоцветов 2"
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "Уровень предмета: "
|
||||
L["ItemID: "] = "ID предмета: "
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = " на (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = " увеличена на (%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "(%d+) к ", addInfo = "AfterNumber"}, -- тест
|
||||
{pattern = "увеличение (%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
{pattern = "дополнительно (%d+)", addInfo = "AfterNumber",}, -- for "add xx stat" type pattern, ex: Adamantite Sharpening Stone
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID: 24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "на (%d+)([^%d%%|]+)", addInfo = "AfterNumber",}, -- [發光的暗影卓奈石] +6法術傷害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", " и ", ",", "%. ", " для ", "&", ":",
|
||||
-- Fix for [Mirror of Truth]
|
||||
-- Equip: Chance on melee and ranged critical strike to increase your attack power by 1000 for 10 secs.
|
||||
-- 1000 was falsely detected detected as ranged critical strike
|
||||
"повысить вашу",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
-- для русской локализации надо указывать все используемые склонения рейтингов (рейтинг, рейтинга,
|
||||
-- рейтингу) т.к. иначе распознавание не работает.
|
||||
--
|
||||
|
||||
L["statList"] = {
|
||||
{pattern = string.lower("Силе атаки"), id = SPELL_STAT1115_NAME}, --чтобы Сила атаки и сила заклинаний не распознавалась как Сила
|
||||
{pattern = string.lower("Сила атаки"), id = SPELL_STAT1115_NAME}, -- строки SPELL_STAT1115_NAME должны быть впереди
|
||||
{pattern = string.lower("Силу атаки"), id = SPELL_STAT1115_NAME},
|
||||
{pattern = string.lower("Сила заклинаний"), id = SPELL_STAT1115_NAME},
|
||||
{pattern = string.lower("Силу заклинаний"), id = SPELL_STAT1115_NAME},
|
||||
{pattern = string.lower("Силе заклинаний"), id = SPELL_STAT1115_NAME}, -- конец левых строчек
|
||||
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower("Силе"), id = SPELL_STAT1_NAME},
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower("Ловкости"), id = SPELL_STAT2_NAME},
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower("Выносливости"), id = SPELL_STAT3_NAME},
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower("Интеллекту"), id = SPELL_STAT4_NAME},
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = string.lower("Духу"), id = SPELL_STAT5_NAME},
|
||||
|
||||
{pattern = "рейтинг защиты", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "рейтингу защиты", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "рейтинга защиты", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "рейтинг уклонения", id = CR_DODGE},
|
||||
{pattern = "рейтингу уклонения", id = CR_DODGE},
|
||||
{pattern = "рейтинга уклонения", id = CR_DODGE},
|
||||
{pattern = "рейтинг блокирования щитом", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "рейтинга блокирования щитом", id = CR_BLOCK},
|
||||
{pattern = "рейтингу блокирования щитом", id = CR_BLOCK},
|
||||
{pattern = "увеличение рейтинга блокирования щита на", id = CR_BLOCK},
|
||||
{pattern = "рейтинг блока", id = CR_BLOCK},
|
||||
{pattern = "рейтинга блока", id = CR_BLOCK},
|
||||
{pattern = "рейтингу блока", id = CR_BLOCK},
|
||||
{pattern = "рейтинг парирования", id = CR_PARRY},
|
||||
{pattern = "рейтинга парирования", id = CR_PARRY},
|
||||
{pattern = "рейтингу парирования", id = CR_PARRY},
|
||||
|
||||
{pattern = "рейтинг критического удара %(заклинания%)", id = CR_CRIT_SPELL},
|
||||
{pattern = "рейтингу критического удара %(заклинания%)", id = CR_CRIT_SPELL},
|
||||
{pattern = "рейтинга критического удара %(заклинания%)", id = CR_CRIT_SPELL},
|
||||
{pattern = "рейтинга критического удара заклинаниями", id = CR_CRIT_SPELL},
|
||||
{pattern = "рейтингу критического удара заклинаниями", id = CR_CRIT_SPELL},
|
||||
{pattern = "рейтинг критического удара заклинаниями", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical hit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell critical rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "spell crit rating", id = CR_CRIT_SPELL},
|
||||
{pattern = "ranged critical strike rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "к критическому удару в дальнем бою", id = CR_CRIT_RANGED}, -- [Heartseeker Scope]
|
||||
{pattern = "ranged critical hit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged critical rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "ranged crit rating", id = CR_CRIT_RANGED},
|
||||
{pattern = "рейтинг критического удара", id = CR_CRIT_MELEE},
|
||||
{pattern = "рейтинг критического эффекта", id = CR_CRIT_MELEE},
|
||||
{pattern = "рейтингу критического удара", id = CR_CRIT_MELEE},
|
||||
{pattern = "рейтинга критического удара", id = CR_CRIT_MELEE},
|
||||
{pattern = "рейтинг крит. удара оруж. ближнего боя", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical hit rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "critical rating", id = CR_CRIT_MELEE},
|
||||
{pattern = "crit rating", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "рейтинг меткости %(заклинания%)", id = CR_HIT_SPELL},
|
||||
{pattern = "рейтингу меткости %(заклинания%)", id = CR_HIT_SPELL},
|
||||
{pattern = "рейтинга меткости %(заклинания%)", id = CR_HIT_SPELL},
|
||||
{pattern = "рейтингу меткости заклинаний", id = CR_HIT_SPELL},
|
||||
{pattern = "ranged hit rating", id = CR_HIT_RANGED},
|
||||
{pattern = "рейтинга нанесения удара ближнего боя", id = CR_HIT_MELEE},
|
||||
{pattern = "рейтинг меткости", id = CR_HIT_MELEE},
|
||||
{pattern = "рейтинга меткости", id = CR_HIT_MELEE},
|
||||
{pattern = "рейтингу меткости", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "рейтинг устойчивости", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
{pattern = "рейтингу устойчивости", id = CR_CRIT_TAKEN_MELEE},
|
||||
{pattern = "рейтинга устойчивости", id = CR_CRIT_TAKEN_MELEE},
|
||||
|
||||
{pattern = "рейтинг скорости %(заклинания%)", id = CR_HASTE_SPELL},
|
||||
{pattern = "рейтингу скорости %(заклинания%)", id = CR_HASTE_SPELL},
|
||||
{pattern = "рейтинга скорости %(заклинания%)", id = CR_HASTE_SPELL},
|
||||
{pattern = "скорости наложения заклинаний", id = CR_HASTE_SPELL},
|
||||
{pattern = "скорость наложения заклинаний", id = CR_HASTE_SPELL},
|
||||
{pattern = "рейтинг скорости дальнего боя", id = CR_HASTE_RANGED},
|
||||
{pattern = "рейтингу скорости дальнего боя", id = CR_HASTE_RANGED},
|
||||
{pattern = "рейтинга скорости дальнего боя", id = CR_HASTE_RANGED},
|
||||
{pattern = "рейтинг скорости", id = CR_HASTE_MELEE},
|
||||
{pattern = "рейтингу скорости", id = CR_HASTE_MELEE},
|
||||
{pattern = "рейтинга скорости", id = CR_HASTE_MELEE},
|
||||
{pattern = "speed rating", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "рейтинг владения", id = CR_WEAPON_SKILL},
|
||||
{pattern = "рейтингу владения", id = CR_WEAPON_SKILL},
|
||||
{pattern = "рейтинга владения", id = CR_WEAPON_SKILL},
|
||||
{pattern = "рейтинг мастерства", id = CR_EXPERTISE},
|
||||
{pattern = "рейтингу мастерства", id = CR_EXPERTISE},
|
||||
{pattern = "рейтинга мастерства", id = CR_EXPERTISE},
|
||||
|
||||
{pattern = "рейтинг уклонения от удара", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "Рейтингу уклонения от удара", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "рейтинга уклонения от удара", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "рейтинг пробивания брони", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = "рейтингу пробивания брони", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = "рейтинга пробивания брони", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "$value% крит"
|
||||
L["$value% Spell Crit"] = "$value% крит закл"
|
||||
L["$value% Dodge"] = "$value% уклонение"
|
||||
L["$value HP"] = "$value Здор"
|
||||
L["$value MP"] = "$value Мана"
|
||||
L["$value AP"] = "$value Сила атаки"
|
||||
L["$value RAP"] = "$value САДБ"
|
||||
L["$value Dmg"] = "$value урона"
|
||||
L["$value Heal"] = "$value Исцеления"
|
||||
L["$value Armor"] = "$value Броня"
|
||||
L["$value Block"] = "$value% Блок"
|
||||
L["$value MP5"] = "$value МП5сек"
|
||||
L["$value MP5(NC)"] = "$value МП 5сек НК"
|
||||
L["$value HP5"] = "$value Здор 5сек"
|
||||
L["$value to be Dodged/Parried"] = "$value% уклон/парир"
|
||||
L["$value to be Crit"] = "$value% крит"
|
||||
L["$value Crit Dmg Taken"] = "$value крит урон"
|
||||
L["$value DOT Dmg Taken"] = "$value сила дотов"
|
||||
L["$value% Parry"] = "$value% парирование"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value закл."
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "Итог по статам"
|
||||
@@ -0,0 +1,695 @@
|
||||
--[[
|
||||
Name: RatingBuster zhCN locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- iceburn
|
||||
- 急云@CWDG
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "zhCN")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true,
|
||||
-- After: L["Show Item ID"] = "显示物品编号",
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "RatingBuster选项"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "这个GUI需要Waterfall库"
|
||||
L["Enabled"] = "\229\144\175\231\148\168"
|
||||
L["Suspend/resume this addon"] = "\230\154\130\229\129\156/\230\129\162\229\164\141 \230\173\164\230\143\146\228\187\182"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
--L["General Settings"] = true
|
||||
--L["Profiles"] = true
|
||||
-- /rb win
|
||||
L["Options Window"] = "选项窗口"
|
||||
L["Shows the Options Window"] = "打开选项窗口"
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "属性加成"
|
||||
L["Enable support for Stat Mods"] = "启用属性加成计算"
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "开启回避递减效应"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "你的闪避、招架、避免命中值会被计算在回避递减效应中"
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "显示物品编号"
|
||||
L["Show the ItemID in tooltips"] = "显示物品编号"
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "显示物品等级"
|
||||
L["Show the ItemLevel in tooltips"] = "显示物品等级"
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "使用需要等级"
|
||||
L["Calculate using the required level if you are below the required level"] = "如果你的等级低于需要等级则用需要等级来换算"
|
||||
-- /rb level
|
||||
L["Set Level"] = "设定换算等级"
|
||||
L["Set the level used in calculations (0 = your level)"] = "设定换算等级 (0 = 你的目前的等级)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "属性等级"
|
||||
L["Options for Rating display"] = "设定属性等级显示"
|
||||
-- /rb rating show
|
||||
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"] = "显示命中/急速等级给的法术命中/急速加成"
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "显示物理命中"
|
||||
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 exp
|
||||
L["Expertise Breakdown"] = "精准效能"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "转换精准等级为忽略躲闪和忽略招架"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "设定文字颜色"
|
||||
L["Changes the color of added text"] = "设定RB所增加的文字的颜色"
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "挑选颜色"
|
||||
L["Pick a color"] = "挑选颜色"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "启用文字颜色"
|
||||
L["Enable colored text"] = "启用文字颜色"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "基本属性解析"
|
||||
L["Changes the display of base stats"] = "设定基本属性的解析显示"
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "显示基本属性解析"
|
||||
L["Show base stat conversions in tooltips"] = "在物品提示中显示基本属性解析"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "力量"
|
||||
L["Changes the display of Strength"] = "自订力量解析项目"
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "显示近战攻击强度"
|
||||
L["Show Attack Power from Strength"] = "显示力量给的近战攻击强度"
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "显示格档值"
|
||||
L["Show Block Value from Strength"] = "显示力量给的格档值"
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "显示法伤"
|
||||
L["Show Spell Damage from Strength"] = "显示力量给的法术伤害加成"
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "显示治疗"
|
||||
L["Show Healing from Strength"] = "显示力量给的治疗加成"
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "显示闪避"
|
||||
L["Show Parry from Strength"] = "显示智力给的闪避加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "敏捷"
|
||||
L["Changes the display of Agility"] = "自订敏捷解析项目"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "显示物理爆击"
|
||||
L["Show Crit chance from Agility"] = "显示敏捷给的物理爆击几率"
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "显示躲闪"
|
||||
L["Show Dodge chance from Agility"] = "显示敏捷给的躲闪几率"
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "显示近战攻击强度"
|
||||
L["Show Attack Power from Agility"] = "显示敏捷给的近战攻击强度"
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "显示远程攻击强度"
|
||||
L["Show Ranged Attack Power from Agility"] = "显示敏捷给的远程攻击强度"
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "显示护甲值"
|
||||
L["Show Armor from Agility"] = "显示敏捷给的护甲值"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "显示治疗"
|
||||
L["Show Healing from Agility"] = "显示敏捷给的治疗加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "耐力"
|
||||
L["Changes the display of Stamina"] = "自订耐力解析项目"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "显示生命值"
|
||||
L["Show Health from Stamina"] = "显示耐力给的生命值"
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "显示法伤"
|
||||
L["Show Spell Damage from Stamina"] = "显示耐力给的法术伤害加成"
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "显示治疗"
|
||||
L["Show Healing from Stamina"] = "显示智力给的治疗加成"
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "显示攻击强度"
|
||||
L["Show Attack Power from Stamina"] = "显示智力给的攻击强度加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "智力"
|
||||
L["Changes the display of Intellect"] = "自订智力解析项目"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "显示法术爆击"
|
||||
L["Show Spell Crit chance from Intellect"] = "显示智力给的法术爆击几率"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "显示法力值"
|
||||
L["Show Mana from Intellect"] = "显示智力给的法力值"
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "显示法伤"
|
||||
L["Show Spell Damage from Intellect"] = "显示智力给的法术伤害加成"
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "显示治疗"
|
||||
L["Show Healing from Intellect"] = "显示智力给的治疗加成"
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "显示施法回魔"
|
||||
L["Show Mana Regen while casting from Intellect"] = "显示智力给的施法中法力恢复量"
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "显示5秒外回魔"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "显示在非施法状态下的法力恢复量"
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "显示远程攻击强度"
|
||||
L["Show Ranged Attack Power from Intellect"] = "显示智力给的远程攻击强度"
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "显示护甲值"
|
||||
L["Show Armor from Intellect"] = "显示智力给的护甲值"
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "显示攻击强度"
|
||||
L["Show Attack Power from Intellect"] = "显示智力给的攻击强度加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "精神"
|
||||
L["Changes the display of Spirit"] = "自订精神解析项目"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "显示施法回魔"
|
||||
L["Show Mana Regen while casting from Spirit"] = "显示在施法状态时,精神给的法力恢复量"
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "显示正常回魔"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "显示在未施法状态时,精神给的法力恢复量"
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "显示回血"
|
||||
L["Show Health Regen from Spirit"] = "显示精神给的正常回血"
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "显示法伤"
|
||||
L["Show Spell Damage from Spirit"] = "显示精神给的法术伤害加成"
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "显示治疗"
|
||||
L["Show Healing from Spirit"] = "显示精神给的治疗加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "属性统计"
|
||||
L["Options for stat summary"] = "自订属性选项"
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "显示属性统计"
|
||||
L["Show stat summary in tooltips"] = "在物品提示中显示属性统计"
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "忽略设定"
|
||||
L["Ignore stuff when calculating the stat summary"] = "设定在统计总合时所要忽略的事项"
|
||||
-- /rb sum ignore unused
|
||||
--L["Ignore Undesirable Items"] = true
|
||||
--L["Hide stat summary for undesirable items"] = true
|
||||
-- /rb sum ignore quality
|
||||
--L["Minimum Item Quality"] = true
|
||||
--L["Show stat summary only for selected quality items and up"] = true
|
||||
-- /rb sum ignore armor
|
||||
--L["Armor Types"] = true
|
||||
--L["Select armor types you want to ignore"] = true
|
||||
-- /rb sum ignore armor cloth
|
||||
--L["Ignore Cloth"] = true
|
||||
--L["Hide stat summary for all cloth armor"] = true
|
||||
-- /rb sum ignore armor leather
|
||||
--L["Ignore Leather"] = true
|
||||
--L["Hide stat summary for all leather armor"] = true
|
||||
-- /rb sum ignore armor mail
|
||||
--L["Ignore Mail"] = true
|
||||
--L["Hide stat summary for all mail armor"] = true
|
||||
-- /rb sum ignore armor plate
|
||||
--L["Ignore Plate"] = true
|
||||
--L["Hide stat summary for all plate armor"] = true
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "忽略已装备的物品"
|
||||
L["Hide stat summary for equipped items"] = "隐藏已装备的物品的统计总合"
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "忽略附魔"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "计算时忽略物品上的附魔效果"
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "忽略宝石"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "计算时忽略物品上的宝石效果"
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "差异值显示方式"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "设定在主提示框架或只在比较框架中显示差异值"
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "加入空白列"
|
||||
L["Add a empty line before or after stat summary"] = "在物品提示中的属性统计前或后加入空白列"
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "加在统计前"
|
||||
L["Add a empty line before stat summary"] = "在物品提示中的属性统计前加入空白列"
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "加在统计后"
|
||||
L["Add a empty line after stat summary"] = "在物品提示中的属性统计后加入空白列"
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "显示图示"
|
||||
L["Show the sigma icon before summary listing"] = "在属性统计前显示图示"
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "显示标题"
|
||||
L["Show the title text before summary listing"] = "在属性统计前显示标题文字"
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "显示数值为0的属性"
|
||||
L["Show zero value stats in summary for consistancy"] = "为了一致性,在统计中显示数值为0的属性"
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "计算总和统计"
|
||||
L["Calculate the total stats for the item"] = "计算物品的总和统计"
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "计算差异统计"
|
||||
L["Calculate the stat difference for the item and equipped items"] = "计算物品和已装备物品的统计差异"
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "按照字母排序"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "启用以按照字母顺序排列,禁用按照属性类型排列(基础、物理、法术、抵抗……)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "在躲避统计中显示格挡几率"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "启用该选项后将在躲避统计中加入格挡几率,禁用将仅显示躲闪,招架,未击中"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "属性 - 基本"
|
||||
L["Choose basic stats for summary"] = "选择想要统计的基本属性"
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "统计生命值"
|
||||
L["Health <- Health, Stamina"] = "生命值 ← 生命值、耐力"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "统计法力值"
|
||||
L["Mana <- Mana, Intellect"] = "法力值 ← 法力值、智力"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "统计法力恢复"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "法力恢复 ← 法力恢复、精神"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "统计法力恢复(未施法时)"
|
||||
L["Mana Regen while not casting <- Spirit"] = "法力恢复(未施法时) ← 精神"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "统计生命恢复"
|
||||
L["Health Regen <- Health Regen"] = "生命恢复 ← 生命恢复"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "统计生命恢复(未战斗时)"
|
||||
L["Health Regen when out of combat <- Spirit"] = "生命恢复(未战斗时) ← 精神"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "统计力量"
|
||||
L["Strength Summary"] = "统计力量"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "统计敏捷"
|
||||
L["Agility Summary"] = "统计敏捷"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "统计耐力"
|
||||
L["Stamina Summary"] = "统计耐力"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "统计智力"
|
||||
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"] = "属性 - 物理"
|
||||
L["Choose physical damage stats for summary"] = "选择想要统计的物理攻击属性"
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "统计近战攻击强度"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "近战攻击强度 ← 攻击强度、力量、敏捷"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "统计远程攻击强度"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "远程攻击强度 ← 远程攻击强度、智力、攻击强度、力量、敏捷"
|
||||
-- /rb sum physical fap
|
||||
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"] = "物理命中几率 ← 命中等级、武器技能等级"
|
||||
-- /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"] = "物理爆击几率 ← 爆击等级、敏捷、武器技能等级"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "统计爆击等级"
|
||||
L["Crit Rating Summary"] = "统计爆击等级"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "统计急速"
|
||||
L["Haste <- Haste Rating"] = "急速 ← 急速等级"
|
||||
-- /rb sum physical hasterating
|
||||
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"] = "远程米中几率 ← 命中等级、武器技能等级、远程命中等级"
|
||||
-- /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"] = "远程爆击几率 ← 爆击等级、敏捷、武器技能等级、远程爆击等级"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "统计远程爆击等级"
|
||||
L["Ranged Crit Rating Summary"] = "统计远程爆击等级"
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = "统计远程急速"
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = "远程急速 ← 急速等级、远程急速等级"
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = "统计远程急速等级"
|
||||
L["Ranged Haste Rating Summary"] = "统计远程急速等级"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "统计武器最大伤害"
|
||||
L["Weapon Max Damage Summary"] = "统计武器最大伤害"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = "统计武器DPS"
|
||||
--L["Weapon DPS Summary"] = "武器DPS统计"
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "统计武器技能"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "武器技能 ← 武器技能等级"
|
||||
-- /rb sum physical exp
|
||||
L["Sum Expertise"] = "统计精准"
|
||||
L["Expertise <- Expertise Rating"] = "精准 ← 精准等级"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "统计精准等级"
|
||||
L["Expertise Rating Summary"] = "统计精准等级"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "属性 - 法术"
|
||||
L["Choose spell damage and healing stats for summary"] = "选择想要统计的法术攻击和治疗的属性"
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "统计法术伤害"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "法术伤害 ← 法术伤害、智力、精神、耐力"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "统计神圣法术伤害"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "神圣法术伤害 ← 神圣法术伤害、法术伤害、智力、精神"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "统计奥术法术伤害"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "奥术法术伤害 ← 奥术法术伤害、法术伤害、智力"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "统计火焰法术伤害"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "火焰法术伤害 ← 火焰法术伤害、法术伤害、智力、耐力"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "统计自然法术伤害"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "自然法术伤害 ← 自然法术伤害、法术伤害、智力"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "统计冰霜法术伤害"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "冰霜法术伤害 ← 冰霜法术伤害、法术伤害、智力"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "统计暗影法术伤害"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "暗影法术伤害 ← 暗影法术伤害、法术伤害、智力、精神、耐力"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "统计治疗"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "治疗 ← 治疗、智力、精神、敏捷、力量"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "统计法术爆击几率"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "法术爆击几率 ← 法术爆击等级、智力"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "统计法术命中几率"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "法术命中几率 ← 法术命中等级"
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "统计法术急速"
|
||||
L["Spell Haste <- Spell Haste Rating"] = "法术急速 ← 法术急速等级"
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "统计穿透"
|
||||
L["Spell Penetration Summary"] = "统计法术穿透"
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = "统计法术命中等级"
|
||||
L["Spell Hit Rating Summary"] = "统计法术命中等级"
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = "统计法术爆击等级"
|
||||
L["Spell Crit Rating Summary"] = "统计法术爆击等级"
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = "统计法术急速等级"
|
||||
L["Spell Haste Rating Summary"] = "统计法术急速等级"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
L["Stat - Tank"] = "属性 - 抗打击"
|
||||
L["Choose tank stats for summary"] = "选择你想要统计的抗打击能力的属性"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "统计护甲值"
|
||||
--L["Armor <- Armor from items and bonuses"] = "护甲值 ← 物品护甲、护甲加成、敏捷、智力"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "统计躲闪几率"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "躲闪几率 ← 躲闪等级、敏捷、防御等级"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "统计招架几率"
|
||||
--L["Parry Chance <- Parry Rating"] = "招架几率 ← 招架等级、防御等级"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "统计格挡几率"
|
||||
--L["Block Chance <- Block Rating"] = "格挡几率 ← 格挡等级、防御等级"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "统计防止被躲闪"
|
||||
--L["Dodge Neglect <- Expertise"] = "防止被躲闪 ← 精准等级、武器技能等级"
|
||||
-- /rb sum tank neglectparry
|
||||
L["Sum Parry Neglect"] = "统计防止被招架"
|
||||
--L["Parry Neglect <- Expertise"] = "防止被招架 ← 精准等级、武器技能等级"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "统计奥术抗性"
|
||||
L["Arcane Resistance Summary"] = "统计奥术抗性"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "统计火焰抗性"
|
||||
L["Fire Resistance Summary"] = "统计火焰抗性"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "统计自然抗性"
|
||||
L["Nature Resistance Summary"] = "统计自然抗性"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "统计冰霜抗性"
|
||||
L["Frost Resistance Summary"] = "统计冰霜抗性"
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = "统计暗影抗性"
|
||||
L["Shadow Resistance Summary"] = "统计暗影抗性"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "统计躲闪等级"
|
||||
L["Dodge Rating Summary"] = "统计躲闪等级"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "统计招架等级"
|
||||
L["Parry Rating Summary"] = "统计招架等级"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "统计格挡等级"
|
||||
L["Block Rating Summary"] = "统计格挡等级"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "统计韧性"
|
||||
L["Resilience Summary"] = "统计韧性等级"
|
||||
-- /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"] = "所有伤害减免 <- 护甲值, 躲闪, 招架, 格挡, 格挡值, 防御技能, 韧性, 怪物未击中几率, 怪物重击几率, 怪物碾压打击几率, 伤害减免"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "统计躲避"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "躲避 ← 躲闪, 招架, 怪物未命中, 格挡(可选)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
-- L["Gem Set"] = true
|
||||
-- L["Select a gem set to configure"] = true
|
||||
-- L["Default Gem Set 1"] = true
|
||||
-- L["Default Gem Set 2"] = true
|
||||
-- L["Default Gem Set 3"] = true
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "自动填充空宝石位"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = "你想要填充该空格位的物品ID或者链接"
|
||||
L["<ItemID|Link>"] = "<物品ID|链接>"
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = "|cffffff7f%s|r 已设置为 |cffffff7f[%s]|r"
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = "对服务器查询宝石: %s。将会在5秒后重试。"
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
--L["Second set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 3"] = true
|
||||
-- /rb sum gem2 key
|
||||
--L["Toggle Key"] = true
|
||||
--L["Use this key to toggle alternate gems"] = true
|
||||
-- /rb sum gem3
|
||||
--L["Third set of default gems which can be toggled with a modifier key"] = true
|
||||
--L["Can't use the same modifier as Gem Set 2"] = true
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "物品等级: "
|
||||
L["ItemID: "] = "物品编号: "
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = "(%d+)。", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterStat",},
|
||||
{pattern = "佩戴者.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
{pattern = "提高.-(%d+)", addInfo = "AfterNumber",},
|
||||
-- Added [^%%] so that it doesn't match strings like "Increases healing by up to 10% of your total Intellect." [Whitemend Pants] ID: 24261
|
||||
-- Added [^|] so that it doesn't match enchant strings (JewelTips)
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [发光的暗影卓奈石] +6法术伤害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", "和", ",", "。", " 持续 ", "&", "及", "并", ",","、",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "防御等级", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "躲闪等级", id = CR_DODGE},
|
||||
{pattern = "格挡等级", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "招架等级", id = CR_PARRY},
|
||||
|
||||
{pattern = "法术爆击等级", id = CR_CRIT_SPELL},
|
||||
{pattern = "法术爆击命中等级", id = CR_CRIT_SPELL},
|
||||
{pattern = "法术爆击等级", id = CR_CRIT_SPELL},
|
||||
{pattern = "远程爆击等级", id = CR_CRIT_RANGED},
|
||||
{pattern = "远程爆击命中等级", id = CR_CRIT_RANGED},
|
||||
{pattern = "远程爆击等级", id = CR_CRIT_RANGED},
|
||||
{pattern = "近战爆击等级", id = CR_CRIT_MELEE},
|
||||
{pattern = "爆击等级", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "法术命中等级", id = CR_HIT_SPELL},
|
||||
{pattern = "远程命中等级", id = CR_HIT_RANGED},
|
||||
{pattern = "命中等级", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "韧性等级", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "法术急速等级", id = CR_HASTE_SPELL},
|
||||
{pattern = "远程急速等级", id = CR_HASTE_RANGED},
|
||||
{pattern = "急速等级", id = CR_HASTE_MELEE},
|
||||
{pattern = "加速等级", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "武器技能等级", id = CR_WEAPON_SKILL},
|
||||
{pattern = "精准等级", id = CR_EXPERTISE},
|
||||
|
||||
{pattern = "命中躲闪等级", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "护甲穿透等级", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "dagger skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "sword skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed swords skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "axe skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "bow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "crossbow skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "gun skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "feral combat skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "mace skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "polearm skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "staff skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed axes skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "two%-handed maces skill rating", id = CR_WEAPON_SKILL},
|
||||
{pattern = "fist weapons skill rating", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "$value% 爆击"
|
||||
L["$value% Spell Crit"] = "$value% 法爆"
|
||||
L["$value% Dodge"] = "$value% 躲闪"
|
||||
L["$value HP"] = "$value 生命"
|
||||
L["$value MP"] = "$value 法力"
|
||||
L["$value AP"] = "$value 攻击强度"
|
||||
L["$value RAP"] = "$value 远攻强度"
|
||||
L["$value Dmg"] = "$value 法伤"
|
||||
L["$value Heal"] = "$value 治疗"
|
||||
L["$value Armor"] = "$value 护甲"
|
||||
L["$value Block"] = "$value 格挡值"
|
||||
L["$value MP5"] = "$value 施法回魔"
|
||||
L["$value MP5(NC)"] = "$value 精神回魔"
|
||||
L["$value HP5"] = "$value 回血"
|
||||
L["$value to be Dodged/Parried"] = "$value 被躲闪/被招架"
|
||||
L["$value to be Crit"] = "$value 被致命一击"
|
||||
L["$value Crit Dmg Taken"] = "$value 致命一击伤害减免"
|
||||
L["$value DOT Dmg Taken"] = "$value 持续伤害减免"
|
||||
L["$value% Parry"] = "$value% 招架"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value 法术"
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "属性统计"
|
||||
@@ -0,0 +1,713 @@
|
||||
--[[
|
||||
Name: RatingBuster zhTW locale
|
||||
Revision: $Revision: 294 $
|
||||
Translated by:
|
||||
- Whitetooth@Cenarius (hotdogee@bahamut.twbbs.org)
|
||||
- CuteMiyu
|
||||
- 小紫
|
||||
- mcc
|
||||
]]
|
||||
|
||||
local L = LibStub("AceLocale-3.0"):NewLocale("RatingBuster", "zhTW")
|
||||
if not L then return end
|
||||
-- This file is coded in UTF-8
|
||||
-- If you don't have a editor that can save in UTF-8, I recommend Ultraedit
|
||||
----
|
||||
-- To translate AceLocale strings, replace true with the translation string
|
||||
-- Before: L["Show Item ID"] = true
|
||||
-- After: L["Show Item ID"] = "顯示物品編號"
|
||||
---------------
|
||||
-- Waterfall --
|
||||
---------------
|
||||
L["RatingBuster Options"] = "屬性轉換選項"
|
||||
L["Waterfall-1.0 is required to access the GUI."] = "需要 Waterfall-1.0 才能使用設定介面。"
|
||||
L["Enabled"] = "啟用"
|
||||
L["Suspend/resume this addon"] = "暫停/繼續使用這個插件"
|
||||
---------------------------
|
||||
-- Slash Command Options --
|
||||
---------------------------
|
||||
L["Always"] = "永遠顯示"
|
||||
L["ALT Key"] = "ALT 鍵"
|
||||
L["CTRL Key"] = "CTRL 鍵"
|
||||
L["SHIFT Key"] = "SHIFT 鍵"
|
||||
L["Never"] = "不顯示"
|
||||
L["General Settings"] = "一般設定"
|
||||
L["Profiles"] = "設定檔"
|
||||
-- /rb win
|
||||
L["Options Window"] = "選項視窗"
|
||||
L["Shows the Options Window"] = "顯示選項視窗"
|
||||
-- /rb hidebzcomp
|
||||
L["Hide Blizzard Item Comparisons"] = "隱藏內建的物品比較"
|
||||
L["Disable Blizzard stat change summary when using the built-in comparison tooltip"] = "觀看內建的已裝備物品提示時不顯示內建的物品比較功能"
|
||||
-- /rb statmod
|
||||
L["Enable Stat Mods"] = "屬性加成"
|
||||
L["Enable support for Stat Mods"] = "啟用屬性加成計算"
|
||||
-- /rb avoidancedr
|
||||
L["Enable Avoidance Diminishing Returns"] = "啟用迴避遞減效應"
|
||||
L["Dodge, Parry, Hit Avoidance values will be calculated using the avoidance deminishing return formula with your current stats"] = "你的閃避、招架、避免命中值會被計算在迴避遞減效應中"
|
||||
-- /rb itemid
|
||||
L["Show ItemID"] = "顯示物品編號"
|
||||
L["Show the ItemID in tooltips"] = "顯示物品編號"
|
||||
-- /rb itemlevel
|
||||
L["Show ItemLevel"] = "顯示物品等級"
|
||||
L["Show the ItemLevel in tooltips"] = "顯示物品等級"
|
||||
-- /rb usereqlv
|
||||
L["Use Required Level"] = "使用需要等級"
|
||||
L["Calculate using the required level if you are below the required level"] = "如果你的等級低於需要等級則用需要等級來換算"
|
||||
-- /rb level
|
||||
L["Set Level"] = "設定換算等級"
|
||||
L["Set the level used in calculations (0 = your level)"] = "設定換算等級 (0 = 你的目前的等級)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating
|
||||
L["Rating"] = "屬性等級"
|
||||
L["Options for Rating display"] = "設定屬性等級顯示"
|
||||
-- /rb rating show
|
||||
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"] = "顯示命中/加速給的法術命中/加速"
|
||||
-- /rb rating physical
|
||||
L["Show Physical Hit/Haste"] = "顯示物理命中/加速"
|
||||
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 exp
|
||||
L["Expertise Breakdown"] = "分析熟練技能"
|
||||
L["Convert Expertise into Dodge Neglect and Parry Neglect"] = "將熟練技能分為防止被閃躲、防止被招架"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb rating color
|
||||
L["Change Text Color"] = "設定文字顏色"
|
||||
L["Changes the color of added text"] = "設定 RB 所增加的文字的顏色"
|
||||
-- /rb rating color pick
|
||||
L["Pick Color"] = "挑選顏色"
|
||||
L["Pick a color"] = "挑選顏色"
|
||||
-- /rb rating color enable
|
||||
L["Enable Color"] = "啟用文字顏色"
|
||||
L["Enable colored text"] = "啟用文字顏色"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat
|
||||
L["Stat Breakdown"] = "基本屬性解析"
|
||||
L["Changes the display of base stats"] = "設定基本屬性的解析顯示"
|
||||
-- /rb stat show
|
||||
L["Show Base Stat Conversions"] = "顯示基本屬性解析"
|
||||
L["Show base stat conversions in tooltips"] = "在物品提示中顯示基本屬性解析"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat str
|
||||
L["Strength"] = "力量"
|
||||
L["Changes the display of Strength"] = "自訂力量解析項目"
|
||||
-- /rb stat str ap
|
||||
L["Show Attack Power"] = "顯示攻擊強度"
|
||||
L["Show Attack Power from Strength"] = "顯示力量給的攻擊強度"
|
||||
-- /rb stat str block
|
||||
L["Show Block Value"] = "顯示格檔值"
|
||||
L["Show Block Value from Strength"] = "顯示力量給的格檔值"
|
||||
-- /rb stat str dmg
|
||||
L["Show Spell Damage"] = "顯示法傷"
|
||||
L["Show Spell Damage from Strength"] = "顯示力量給的法術傷害加成"
|
||||
-- /rb stat str heal
|
||||
L["Show Healing"] = "顯示治療"
|
||||
L["Show Healing from Strength"] = "顯示力量給的治療加成"
|
||||
-- /rb stat str parry
|
||||
L["Show Parry"] = "顯示招架"
|
||||
L["Show Parry from Strength"] = "顯示力量給的招架加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat agi
|
||||
L["Agility"] = "敏捷"
|
||||
L["Changes the display of Agility"] = "自訂敏捷解析項目"
|
||||
-- /rb stat agi crit
|
||||
L["Show Crit"] = "顯示致命"
|
||||
L["Show Crit chance from Agility"] = "顯示敏捷給的致命一擊機率"
|
||||
-- /rb stat agi dodge
|
||||
L["Show Dodge"] = "顯示閃躲"
|
||||
L["Show Dodge chance from Agility"] = "顯示敏捷給的閃躲機率"
|
||||
-- /rb stat agi ap
|
||||
L["Show Attack Power"] = "顯示攻擊強度"
|
||||
L["Show Attack Power from Agility"] = "顯示敏捷給的攻擊強度"
|
||||
-- /rb stat agi rap
|
||||
L["Show Ranged Attack Power"] = "顯示遠程攻擊強度"
|
||||
L["Show Ranged Attack Power from Agility"] = "顯示敏捷給的遠程攻擊強度"
|
||||
-- /rb stat agi armor
|
||||
L["Show Armor"] = "顯示裝甲值"
|
||||
L["Show Armor from Agility"] = "顯示敏捷給的裝甲值"
|
||||
-- /rb stat agi heal
|
||||
L["Show Healing"] = "顯示治療"
|
||||
L["Show Healing from Agility"] = "顯示敏捷給的治療加成"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat sta
|
||||
L["Stamina"] = "耐力"
|
||||
L["Changes the display of Stamina"] = "自訂耐力解析項目"
|
||||
-- /rb stat sta hp
|
||||
L["Show Health"] = "顯示生命力"
|
||||
L["Show Health from Stamina"] = "顯示耐力給的生命力"
|
||||
-- /rb stat sta dmg
|
||||
L["Show Spell Damage"] = "顯示法傷"
|
||||
L["Show Spell Damage from Stamina"] = "顯示耐力給的法術傷害加成"
|
||||
-- /rb stat sta heal
|
||||
L["Show Healing"] = "顯示治療"
|
||||
L["Show Healing from Stamina"] = "顯示耐力給的治療加成"
|
||||
-- /rb stat sta ap
|
||||
L["Show Attack Power"] = "顯示治療"
|
||||
L["Show Attack Power from Stamina"] = "顯示耐力給的攻擊強度"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat int
|
||||
L["Intellect"] = "智力"
|
||||
L["Changes the display of Intellect"] = "自訂智力解析項目"
|
||||
-- /rb stat int spellcrit
|
||||
L["Show Spell Crit"] = "顯示法術致命"
|
||||
L["Show Spell Crit chance from Intellect"] = "顯示智力給的法術致命一擊機率"
|
||||
-- /rb stat int mp
|
||||
L["Show Mana"] = "顯示法力"
|
||||
L["Show Mana from Intellect"] = "顯示智力給的法力"
|
||||
-- /rb stat int dmg
|
||||
L["Show Spell Damage"] = "顯示法傷"
|
||||
L["Show Spell Damage from Intellect"] = "顯示智力給的法術傷害加成"
|
||||
-- /rb stat int heal
|
||||
L["Show Healing"] = "顯示治療"
|
||||
L["Show Healing from Intellect"] = "顯示智力給的治療加成"
|
||||
-- /rb stat int mp5
|
||||
L["Show Mana Regen"] = "顯示施法回魔"
|
||||
L["Show Mana Regen while casting from Intellect"] = "顯示智力給的施法中法力恢復量"
|
||||
-- /rb stat int mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "顯示一般回魔"
|
||||
L["Show Mana Regen while NOT casting from Intellect"] = "顯示在未施法狀態時,智力給的法力恢復量"
|
||||
-- /rb stat int rap
|
||||
L["Show Ranged Attack Power"] = "顯示遠程攻擊強度"
|
||||
L["Show Ranged Attack Power from Intellect"] = "顯示智力給的遠程攻擊強度"
|
||||
-- /rb stat int armor
|
||||
L["Show Armor"] = "顯示裝甲值"
|
||||
L["Show Armor from Intellect"] = "顯示智力給的裝甲值"
|
||||
-- /rb stat int ap
|
||||
L["Show Attack Power"] = "顯示攻擊強度"
|
||||
L["Show Attack Power from Intellect"] = "顯示智力給的攻擊強度"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat spi
|
||||
L["Spirit"] = "精神"
|
||||
L["Changes the display of Spirit"] = "自訂精神解析項目"
|
||||
-- /rb stat spi mp5
|
||||
L["Show Mana Regen"] = "顯示施法回魔"
|
||||
L["Show Mana Regen while casting from Spirit"] = "顯示在施法狀態時,精神給的法力恢復量"
|
||||
-- /rb stat spi mp5nc
|
||||
L["Show Mana Regen while NOT casting"] = "顯示一般回魔"
|
||||
L["Show Mana Regen while NOT casting from Spirit"] = "顯示在未施法狀態時,精神給的法力恢復量"
|
||||
-- /rb stat spi hp5
|
||||
L["Show Health Regen"] = "顯示回血"
|
||||
L["Show Health Regen from Spirit"] = "顯示精神給的戰鬥外回生命力"
|
||||
-- /rb stat spi dmg
|
||||
L["Show Spell Damage"] = "顯示法傷"
|
||||
L["Show Spell Damage from Spirit"] = "顯示精神給的法術傷害加成"
|
||||
-- /rb stat spi heal
|
||||
L["Show Healing"] = "顯示治療"
|
||||
L["Show Healing from Spirit"] = "顯示精神給的治療加成"
|
||||
-- /rb stat spi spellcrit
|
||||
L["Show Spell Crit"] = "顯示法術致命"
|
||||
L["Show Spell Crit chance from Spirit"] = "顯示精神給的法術致命一擊機率"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb stat armor
|
||||
L["Armor"] = "護甲"
|
||||
L["Changes the display of Armor"] = "自訂護甲解析項目"
|
||||
-- /rb stat armor ap
|
||||
L["Show Attack Power"] = "顯示攻擊強度"
|
||||
L["Show Attack Power from Armor"] = "顯示護甲給的攻擊強度"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum
|
||||
L["Stat Summary"] = "屬性統計"
|
||||
L["Options for stat summary"] = "自訂屬性選項"
|
||||
-- /rb sum show
|
||||
L["Show Stat Summary"] = "顯示屬性統計"
|
||||
L["Show stat summary in tooltips"] = "在物品提示中顯示屬性統計"
|
||||
-- /rb sum ignore
|
||||
L["Ignore Settings"] = "忽略設定"
|
||||
L["Ignore stuff when calculating the stat summary"] = "設定在統計總合時所要忽略的項目"
|
||||
-- /rb sum ignore unused
|
||||
L["Ignore Undesirable Items"] = "忽略不想要的物品"
|
||||
L["Hide stat summary for undesirable items"] = "只在你可以裝備的物品顯示屬性統計"
|
||||
-- /rb sum ignore quality
|
||||
L["Minimum Item Quality"] = "最低物品品質"
|
||||
L["Show stat summary only for selected quality items and up"] = "只在你所選的品質或更好的物品上顯示屬性統計"
|
||||
-- /rb sum ignore armor
|
||||
L["Armor Types"] = "護甲種類"
|
||||
L["Select armor types you want to ignore"] = "選擇你想忽略的護甲種類"
|
||||
-- /rb sum ignore armor cloth
|
||||
L["Ignore Cloth"] = "忽略布甲"
|
||||
L["Hide stat summary for all cloth armor"] = "隱藏所有布甲的屬性統計"
|
||||
-- /rb sum ignore armor leather
|
||||
L["Ignore Leather"] = "忽略皮甲"
|
||||
L["Hide stat summary for all leather armor"] = "隱藏所有皮甲的屬性統計"
|
||||
-- /rb sum ignore armor mail
|
||||
L["Ignore Mail"] = "忽略鎖甲"
|
||||
L["Hide stat summary for all mail armor"] = "隱藏所有鎖甲的屬性統計"
|
||||
-- /rb sum ignore armor plate
|
||||
L["Ignore Plate"] = "忽略鎧甲"
|
||||
L["Hide stat summary for all plate armor"] = "隱藏所有鎧甲的屬性統計"
|
||||
-- /rb sum ignore equipped
|
||||
L["Ignore Equipped Items"] = "忽略已裝備的物品"
|
||||
L["Hide stat summary for equipped items"] = "隱藏已裝備的物品的屬性統計"
|
||||
-- /rb sum ignore enchant
|
||||
L["Ignore Enchants"] = "忽略附魔"
|
||||
L["Ignore enchants on items when calculating the stat summary"] = "統計時忽略物品上的附魔效果"
|
||||
-- /rb sum ignore gem
|
||||
L["Ignore Gems"] = "忽略寶石"
|
||||
L["Ignore gems on items when calculating the stat summary"] = "統計時忽略物品上的寶石效果"
|
||||
-- /rb sum ignore prismaticSocket
|
||||
L["Ignore Prismatic Sockets"] = "忽略多色插槽"
|
||||
L["Ignore gems in prismatic sockets when calculating the stat summary"] = "統計時忽略多色插槽裡的寶石效果"
|
||||
-- /rb sum diffstyle
|
||||
L["Display Style For Diff Value"] = "差異值顯示方式"
|
||||
L["Display diff values in the main tooltip or only in compare tooltips"] = "設定在主提示框架或只在比較框架中顯示差異值"
|
||||
-- /rb sum space
|
||||
L["Add Empty Line"] = "加入空白列"
|
||||
L["Add a empty line before or after stat summary"] = "在物品提示中的屬性統計前或後加入空白列"
|
||||
-- /rb sum space before
|
||||
L["Add Before Summary"] = "加在統計前"
|
||||
L["Add a empty line before stat summary"] = "在物品提示中的屬性統計前加入空白列"
|
||||
-- /rb sum space after
|
||||
L["Add After Summary"] = "加在統計後"
|
||||
L["Add a empty line after stat summary"] = "在物品提示中的屬性統計後加入空白列"
|
||||
-- /rb sum icon
|
||||
L["Show Icon"] = "顯示圖示"
|
||||
L["Show the sigma icon before summary listing"] = "在屬性統計前顯示圖示"
|
||||
-- /rb sum title
|
||||
L["Show Title Text"] = "顯示標題"
|
||||
L["Show the title text before summary listing"] = "在屬性統計前顯示標題文字"
|
||||
-- /rb sum showzerostat
|
||||
L["Show Zero Value Stats"] = "顯示數值為 0 的屬性"
|
||||
L["Show zero value stats in summary for consistancy"] = "為了一致性,在統計中顯示數值為 0 的屬性"
|
||||
-- /rb sum calcsum
|
||||
L["Calculate Stat Sum"] = "計算統計總合"
|
||||
L["Calculate the total stats for the item"] = "計算物品的統計總合"
|
||||
-- /rb sum calcdiff
|
||||
L["Calculate Stat Diff"] = "計算統計差異"
|
||||
L["Calculate the stat difference for the item and equipped items"] = "計算物品和已裝備物品的統計差異"
|
||||
-- /rb sum sort
|
||||
L["Sort StatSummary Alphabetically"] = "依字幕順序排列屬性統計"
|
||||
L["Enable to sort StatSummary alphabetically, disable to sort according to stat type(basic, physical, spell, tank)"] = "開啟時依字幕順序排列,關閉時依屬性種類排列(基本、物理、魔法、坦克)"
|
||||
-- /rb sum avoidhasblock
|
||||
L["Include Block Chance In Avoidance Summary"] = "傷害迴避包含格檔率"
|
||||
L["Enable to include block chance in Avoidance summary, Disable for only dodge, parry, miss"] = "開啟時傷害迴避包含格檔率,關閉時有閃躲、招架、未擊中"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum basic
|
||||
L["Stat - Basic"] = "統計基本屬性"
|
||||
L["Choose basic stats for summary"] = "自訂基本屬性統計項目"
|
||||
-- /rb sum basic hp
|
||||
L["Sum Health"] = "統計生命力"
|
||||
L["Health <- Health, Stamina"] = "生命力 ← 生命力、耐力"
|
||||
-- /rb sum basic mp
|
||||
L["Sum Mana"] = "統計法力"
|
||||
L["Mana <- Mana, Intellect"] = "法力 ← 法力、智力"
|
||||
-- /rb sum basic mp5
|
||||
L["Sum Mana Regen"] = "統計法力恢復"
|
||||
L["Mana Regen <- Mana Regen, Spirit"] = "法力恢復 ← 法力恢復、精神"
|
||||
-- /rb sum basic mp5nc
|
||||
L["Sum Mana Regen while not casting"] = "統計法力恢復 (未施法時)"
|
||||
L["Mana Regen while not casting <- Spirit"] = "法力恢復 (未施法時) ← 精神"
|
||||
-- /rb sum basic hp5
|
||||
L["Sum Health Regen"] = "統計生命恢復"
|
||||
L["Health Regen <- Health Regen"] = "生命恢復 ← 生命恢復"
|
||||
-- /rb sum basic hp5oc
|
||||
L["Sum Health Regen when out of combat"] = "統計生命恢復 (未戰鬥時)"
|
||||
L["Health Regen when out of combat <- Spirit"] = "生命恢復 (未戰鬥時) ← 精神"
|
||||
-- /rb sum basic str
|
||||
L["Sum Strength"] = "統計力量"
|
||||
L["Strength Summary"] = "統計力量"
|
||||
-- /rb sum basic agi
|
||||
L["Sum Agility"] = "統計敏捷"
|
||||
L["Agility Summary"] = "統計敏捷"
|
||||
-- /rb sum basic sta
|
||||
L["Sum Stamina"] = "統計耐力"
|
||||
L["Stamina Summary"] = "統計耐力"
|
||||
-- /rb sum basic int
|
||||
L["Sum Intellect"] = "統計智力"
|
||||
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"] = "統計物理屬性"
|
||||
L["Choose physical damage stats for summary"] = "自訂物理傷害屬性統計項目"
|
||||
-- /rb sum physical ap
|
||||
L["Sum Attack Power"] = "統計攻擊強度"
|
||||
L["Attack Power <- Attack Power, Strength, Agility"] = "攻擊強度 ← 攻擊強度、力量、敏捷"
|
||||
-- /rb sum physical rap
|
||||
L["Sum Ranged Attack Power"] = "統計遠程攻擊強度"
|
||||
L["Ranged Attack Power <- Ranged Attack Power, Intellect, Attack Power, Strength, Agility"] = "遠程攻擊強度 ← 遠程攻擊強度、智力、攻擊強度、力量、敏捷"
|
||||
-- /rb sum physical fap
|
||||
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"] = "命中機率 ← 命中等級、武器技能等級"
|
||||
-- /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"] = "致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級"
|
||||
-- /rb sum physical critrating
|
||||
L["Sum Crit Rating"] = "統計致命等級"
|
||||
L["Crit Rating Summary"] = "統計致命等級"
|
||||
-- /rb sum physical haste
|
||||
L["Sum Haste"] = "統計加速"
|
||||
L["Haste <- Haste Rating"] = "加速 ← 加速等級"
|
||||
-- /rb sum physical hasterating
|
||||
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"] = "遠程命中機率 ← 命中等級、武器技能等級、遠程命中等級"
|
||||
-- /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"] = "遠程致命一擊機率 ← 致命一擊等級、敏捷、武器技能等級、遠程致命一級等級"
|
||||
-- /rb sum physical rangedcritrating
|
||||
L["Sum Ranged Crit Rating"] = "統計遠程致命一級等級"
|
||||
L["Ranged Crit Rating Summary"] = "統計遠程致命一級等級"
|
||||
-- /rb sum physical rangedhaste
|
||||
L["Sum Ranged Haste"] = "統計遠程加速"
|
||||
L["Ranged Haste <- Haste Rating, Ranged Haste Rating"] = "遠程加速 ← 加速等級、遠程加速等級"
|
||||
-- /rb sum physical rangedhasterating
|
||||
L["Sum Ranged Haste Rating"] = "統計遠程加速等級"
|
||||
L["Ranged Haste Rating Summary"] = "統計遠程加速等級"
|
||||
-- /rb sum physical maxdamage
|
||||
L["Sum Weapon Max Damage"] = "統計武器最大傷害"
|
||||
L["Weapon Max Damage Summary"] = "統計武器最大傷害"
|
||||
-- /rb sum physical weapondps
|
||||
--L["Sum Weapon DPS"] = true
|
||||
--L["Weapon DPS Summary"] = true
|
||||
-- /rb sum physical wpn
|
||||
L["Sum Weapon Skill"] = "統計武器技能"
|
||||
L["Weapon Skill <- Weapon Skill Rating"] = "武器技能 ← 武器技能等級"
|
||||
-- /rb sum physical exp
|
||||
L["Sum Expertise"] = "統計熟練技能"
|
||||
L["Expertise <- Expertise Rating"] = "熟練技能 ← 熟練等級"
|
||||
-- /rb sum physical exprating
|
||||
L["Sum Expertise Rating"] = "統計熟練等級"
|
||||
L["Expertise Rating Summary"] = "統計熟練等級"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum spell
|
||||
L["Stat - Spell"] = "統計魔法屬性"
|
||||
L["Choose spell damage and healing stats for summary"] = "自訂魔法傷害及治療屬性統計項目"
|
||||
-- /rb sum spell dmg
|
||||
L["Sum Spell Damage"] = "統計法術傷害"
|
||||
L["Spell Damage <- Spell Damage, Intellect, Spirit, Stamina"] = "法術傷害 ← 法術傷害、智力、精神、耐力"
|
||||
-- /rb sum spell dmgholy
|
||||
L["Sum Holy Spell Damage"] = "統計神聖法術傷害"
|
||||
L["Holy Spell Damage <- Holy Spell Damage, Spell Damage, Intellect, Spirit"] = "神聖法術傷害 ← 神聖法術傷害、法術傷害、智力、精神"
|
||||
-- /rb sum spell dmgarcane
|
||||
L["Sum Arcane Spell Damage"] = "統計秘法法術傷害"
|
||||
L["Arcane Spell Damage <- Arcane Spell Damage, Spell Damage, Intellect"] = "秘法法術傷害 ← 秘法法術傷害、法術傷害、智力"
|
||||
-- /rb sum spell dmgfire
|
||||
L["Sum Fire Spell Damage"] = "統計火焰法術傷害"
|
||||
L["Fire Spell Damage <- Fire Spell Damage, Spell Damage, Intellect, Stamina"] = "火焰法術傷害 ← 火焰法術傷害、法術傷害、智力、耐力"
|
||||
-- /rb sum spell dmgnature
|
||||
L["Sum Nature Spell Damage"] = "統計自然法術傷害"
|
||||
L["Nature Spell Damage <- Nature Spell Damage, Spell Damage, Intellect"] = "自然法術傷害 ← 自然法術傷害、法術傷害、智力"
|
||||
-- /rb sum spell dmgfrost
|
||||
L["Sum Frost Spell Damage"] = "統計冰霜法術傷害"
|
||||
L["Frost Spell Damage <- Frost Spell Damage, Spell Damage, Intellect"] = "冰霜法術傷害 ← 冰霜法術傷害、法術傷害、智力"
|
||||
-- /rb sum spell dmgshadow
|
||||
L["Sum Shadow Spell Damage"] = "統計暗影法術傷害"
|
||||
L["Shadow Spell Damage <- Shadow Spell Damage, Spell Damage, Intellect, Spirit, Stamina"] = "暗影法術傷害 ← 暗影法術傷害、法術傷害、智力、精神、耐力"
|
||||
-- /rb sum spell heal
|
||||
L["Sum Healing"] = "統計治療"
|
||||
L["Healing <- Healing, Intellect, Spirit, Agility, Strength"] = "治療 ← 治療、智力、精神、敏捷、力量"
|
||||
-- /rb sum spell crit
|
||||
L["Sum Spell Crit Chance"] = "統計法術致命一擊機率"
|
||||
L["Spell Crit Chance <- Spell Crit Rating, Intellect"] = "法術致命一擊機率 ← 法術致命一擊等級、智力"
|
||||
-- /rb sum spell hit
|
||||
L["Sum Spell Hit Chance"] = "統計法術命中機率"
|
||||
L["Spell Hit Chance <- Spell Hit Rating"] = "法術命中機率 ← 法術命中機率"
|
||||
-- /rb sum spell haste
|
||||
L["Sum Spell Haste"] = "統計法術加速"
|
||||
L["Spell Haste <- Spell Haste Rating"] = "法術加速 ← 法術加速等級"
|
||||
-- /rb sum spell pen
|
||||
L["Sum Penetration"] = "統計法術穿透力"
|
||||
L["Spell Penetration Summary"] = "統計法術穿透力"
|
||||
-- /rb sum spell hitrating
|
||||
L["Sum Spell Hit Rating"] = "統計法術命中等級"
|
||||
L["Spell Hit Rating Summary"] = "統計法術命中等級"
|
||||
-- /rb sum spell critrating
|
||||
L["Sum Spell Crit Rating"] = "統計法術致命等級"
|
||||
L["Spell Crit Rating Summary"] = "統計法術致命等級"
|
||||
-- /rb sum spell hasterating
|
||||
L["Sum Spell Haste Rating"] = "統計法術加速等級"
|
||||
L["Spell Haste Rating Summary"] = "統計法術加速等級"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum tank
|
||||
L["Stat - Tank"] = "統計坦克屬性"
|
||||
L["Choose tank stats for summary"] = "自訂坦克屬性統計項目"
|
||||
-- /rb sum tank armor
|
||||
L["Sum Armor"] = "統計護甲值"
|
||||
--L["Armor <- Armor from items and bonuses"] = "護甲值 ← 物品護甲、護甲加成、敏捷、智力"
|
||||
-- /rb sum tank dodge
|
||||
L["Sum Dodge Chance"] = "統計閃躲機率"
|
||||
--L["Dodge Chance <- Dodge Rating, Agility"] = "閃躲機率 ← 閃躲等級、敏捷、防禦等級"
|
||||
-- /rb sum tank parry
|
||||
L["Sum Parry Chance"] = "統計招架機率"
|
||||
--L["Parry Chance <- Parry Rating"] = "招架機率 ← 招架等級、防禦等級"
|
||||
-- /rb sum tank block
|
||||
L["Sum Block Chance"] = "統計格擋機率"
|
||||
--L["Block Chance <- Block Rating"] = "格擋機率 ← 格擋等級、防禦等級"
|
||||
-- /rb sum tank neglectdodge
|
||||
L["Sum Dodge Neglect"] = "統計防止被閃躲"
|
||||
--L["Dodge Neglect <- Expertise"] = "防止被閃躲 ← 熟練技能、武器技能等級"
|
||||
-- /rb sum stat neglectparry
|
||||
L["Sum Parry Neglect"] = "統計防止被招架"
|
||||
--L["Parry Neglect <- Expertise"] = "防止被招架 ← 熟練技能、武器技能等級"
|
||||
-- /rb sum tank resarcane
|
||||
L["Sum Arcane Resistance"] = "統計秘法抗性"
|
||||
L["Arcane Resistance Summary"] = "統計秘法抗性"
|
||||
-- /rb sum tank resfire
|
||||
L["Sum Fire Resistance"] = "統計火焰抗性"
|
||||
L["Fire Resistance Summary"] = "統計火焰抗性"
|
||||
-- /rb sum tank resnature
|
||||
L["Sum Nature Resistance"] = "統計自然抗性"
|
||||
L["Nature Resistance Summary"] = "統計自然抗性"
|
||||
-- /rb sum tank resfrost
|
||||
L["Sum Frost Resistance"] = "統計冰霜抗性"
|
||||
L["Frost Resistance Summary"] = "統計冰霜抗性"
|
||||
-- /rb sum tank resshadow
|
||||
L["Sum Shadow Resistance"] = "統計暗影抗性"
|
||||
L["Shadow Resistance Summary"] = "統計暗影抗性"
|
||||
-- /rb sum tank dodgerating
|
||||
L["Sum Dodge Rating"] = "統計閃躲等級"
|
||||
L["Dodge Rating Summary"] = "統計閃躲等級"
|
||||
-- /rb sum tank parryrating
|
||||
L["Sum Parry Rating"] = "統計招架等級"
|
||||
L["Parry Rating Summary"] = "統計招架等級"
|
||||
-- /rb sum tank blockrating
|
||||
L["Sum Block Rating"] = "統計格檔等級"
|
||||
L["Block Rating Summary"] = "統計格檔等級"
|
||||
-- /rb sum tank res
|
||||
L["Sum Resilience"] = "統計韌性"
|
||||
L["Resilience Summary"] = "統計韌性"
|
||||
-- /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 (?)"
|
||||
-- /rb sum tank avoid
|
||||
L["Sum Avoidance"] = "統計傷害迴避"
|
||||
L["Avoidance <- Dodge, Parry, MobMiss, Block(Optional)"] = "傷害迴避 ← 閃躲、招架、怪物未擊中、格擋(選項)"
|
||||
---------------------------------------------------------------------------
|
||||
-- /rb sum gemset
|
||||
L["Gem Set"] = "寶石設定"
|
||||
L["Select a gem set to configure"] = "選擇一組寶石設定"
|
||||
L["Default Gem Set 1"] = "寶石設定 1"
|
||||
L["Default Gem Set 2"] = "寶石設定 2"
|
||||
L["Default Gem Set 3"] = "寶石設定 3"
|
||||
-- /rb sum gem
|
||||
L["Auto fill empty gem slots"] = "空寶石插槽的預設寶石"
|
||||
-- /rb sum gem red
|
||||
L["Red Socket"] = EMPTY_SOCKET_RED
|
||||
L["ItemID or Link of the gem you would like to auto fill"] = "預設寶石的物品編號或連結"
|
||||
L["<ItemID|Link>"] = "<物品編號|連結>"
|
||||
L["|cffffff7f%s|r is now set to |cffffff7f[%s]|r"] = "|cffffff7f%s|r 已設定為 |cffffff7f[%s]|r"
|
||||
L["Invalid input: %s. ItemID or ItemLink required."] = "輸入錯誤:%s,請輸入物品編號或物品連結。"
|
||||
L["Queried server for Gem: %s. Try again in 5 secs."] = "嘗試查詢編號:%s,請5秒後再試一次。"
|
||||
-- /rb sum gem yellow
|
||||
L["Yellow Socket"] = EMPTY_SOCKET_YELLOW
|
||||
-- /rb sum gem blue
|
||||
L["Blue Socket"] = EMPTY_SOCKET_BLUE
|
||||
-- /rb sum gem meta
|
||||
L["Meta Socket"] = EMPTY_SOCKET_META
|
||||
-- /rb sum gem2
|
||||
L["Second set of default gems which can be toggled with a modifier key"] = "你可以使用 SHIFT, ALT 或 CTRL 來切換第二組預設寶石設定"
|
||||
L["Can't use the same modifier as Gem Set 3"] = "無法使用與第 3 組預設寶石設定相同的切換鍵"
|
||||
-- /rb sum gem2 key
|
||||
L["Toggle Key"] = "切換鍵"
|
||||
L["Use this key to toggle alternate gems"] = "選擇一個按鍵來切換這組寶石設定"
|
||||
-- /rb sum gem3
|
||||
L["Third set of default gems which can be toggled with a modifier key"] = "你可以使用 SHIFT, ALT 或 CTRL 來切換第三組預設寶石設定"
|
||||
L["Can't use the same modifier as Gem Set 2"] = "無法使用與第 2 組預設寶石設定相同的切換鍵"
|
||||
|
||||
-----------------------
|
||||
-- Item Level and ID --
|
||||
-----------------------
|
||||
L["ItemLevel: "] = "物品等級: "
|
||||
L["ItemID: "] = "物品編號: "
|
||||
-----------------------
|
||||
-- Matching Patterns --
|
||||
-----------------------
|
||||
-- Items to check --
|
||||
--------------------
|
||||
-- [Potent Ornate Topaz]
|
||||
-- +6 Spell Damage, +5 Spell Crit Rating
|
||||
--------------------
|
||||
-- ZG enchant
|
||||
-- +10 Defense Rating/+10 Stamina/+15 Block Value
|
||||
--------------------
|
||||
-- [Glinting Flam Spessarite]
|
||||
-- +3 Hit Rating and +3 Agility
|
||||
--------------------
|
||||
-- ItemID: 22589
|
||||
-- [Atiesh, Greatstaff of the Guardian] warlock version
|
||||
-- Equip: Increases the spell critical strike rating of all party members within 30 yards by 28.
|
||||
--------------------
|
||||
-- [Brilliant Wizard Oil]
|
||||
-- Use: While applied to target weapon it increases spell damage by up to 36 and increases spell critical strike rating by 14 . Lasts for 30 minutes.
|
||||
----------------------------------------------------------------------------------------------------
|
||||
-- I redesigned the tooltip scanner using a more locale friendly, 2 pass matching matching algorithm.
|
||||
--
|
||||
-- The first pass searches for the rating number, the patterns are read from L["numberPatterns"] here,
|
||||
-- " by (%d+)" will match strings like: "Increases defense rating by 16."
|
||||
-- "%+(%d+)" will match strings like: "+10 Defense Rating"
|
||||
-- You can add additional patterns if needed, its not limited to 2 patterns.
|
||||
-- The separators are a table of strings used to break up a line into multiple lines what will be parsed seperately.
|
||||
-- For example "+3 Hit Rating, +5 Spell Crit Rating" will be split into "+3 Hit Rating" and " +5 Spell Crit Rating"
|
||||
--
|
||||
-- The second pass searches for the rating name, the names are read from L["statList"] here,
|
||||
-- It will look through the table in order, so you can put common strings at the begining to speed up the search,
|
||||
-- and longer strings should be listed first, like "spell critical strike" should be listed before "critical strike",
|
||||
-- this way "spell critical strike" does get matched by "critical strike".
|
||||
-- Strings need to be in lower case letters, because string.lower is called on lookup
|
||||
--
|
||||
-- IMPORTANT: there may not exist a one-to-one correspondence, meaning you can't just translate this file,
|
||||
-- but will need to go in game and find out what needs to be put in here.
|
||||
-- For example, in english I found 3 different strings that maps to CR_CRIT_MELEE: "critical strike", "critical hit" and "crit".
|
||||
-- You will need to find out every string that represents CR_CRIT_MELEE, and so on.
|
||||
-- In other languages there may be 5 different strings that should all map to CR_CRIT_MELEE.
|
||||
-- so please check in game that you have all strings, and not translate directly off this table.
|
||||
--
|
||||
-- Tip1: When doing localizations, I recommend you set debugging to true in RatingBuster.lua
|
||||
-- Find RatingBuster:SetDebugging(false) and change it to RatingBuster:SetDebugging(true)
|
||||
-- or you can type /rb debug to enable it in game
|
||||
--
|
||||
-- Tip2: The strings are passed into string.find, so you should escape the magic characters ^$()%.[]*+-? with a %
|
||||
L["numberPatterns"] = {
|
||||
{pattern = "提高.-(%d+)", addInfo = "AfterNumber",},
|
||||
{pattern = "提升.-(%d+)", addInfo = "AfterNumber",}, -- [奎克米瑞之眼] ID:27683
|
||||
{pattern = "(%d+)。", addInfo = "AfterNumber",},
|
||||
{pattern = "([%+%-]%d+)", addInfo = "AfterStat",},
|
||||
{pattern = "佩戴者.-(%d+)", addInfo = "AfterNumber",}, -- for "grant you xx stat" type pattern, ex: Quel'Serrar, Assassination Armor set
|
||||
{pattern = "(%d+)([^%d%%|]+)", addInfo = "AfterStat",}, -- [發光的暗影卓奈石] +6法術傷害及5耐力
|
||||
}
|
||||
L["separators"] = {
|
||||
"/", "和", ",", "。", " 持續 ", "&", "及", "並", ",",
|
||||
}
|
||||
--[[ Rating ID
|
||||
CR_WEAPON_SKILL = 1;
|
||||
CR_DEFENSE_SKILL = 2;
|
||||
CR_DODGE = 3;
|
||||
CR_PARRY = 4;
|
||||
CR_BLOCK = 5;
|
||||
CR_HIT_MELEE = 6;
|
||||
CR_HIT_RANGED = 7;
|
||||
CR_HIT_SPELL = 8;
|
||||
CR_CRIT_MELEE = 9;
|
||||
CR_CRIT_RANGED = 10;
|
||||
CR_CRIT_SPELL = 11;
|
||||
CR_HIT_TAKEN_MELEE = 12;
|
||||
CR_HIT_TAKEN_RANGED = 13;
|
||||
CR_HIT_TAKEN_SPELL = 14;
|
||||
CR_CRIT_TAKEN_MELEE = 15;
|
||||
CR_CRIT_TAKEN_RANGED = 16;
|
||||
CR_CRIT_TAKEN_SPELL = 17;
|
||||
CR_HASTE_MELEE = 18;
|
||||
CR_HASTE_RANGED = 19;
|
||||
CR_HASTE_SPELL = 20;
|
||||
CR_WEAPON_SKILL_MAINHAND = 21;
|
||||
CR_WEAPON_SKILL_OFFHAND = 22;
|
||||
CR_WEAPON_SKILL_RANGED = 23;
|
||||
CR_EXPERTISE = 24;
|
||||
--
|
||||
SPELL_STAT1_NAME = "Strength"
|
||||
SPELL_STAT2_NAME = "Agility"
|
||||
SPELL_STAT3_NAME = "Stamina"
|
||||
SPELL_STAT4_NAME = "Intellect"
|
||||
SPELL_STAT5_NAME = "Spirit"
|
||||
--]]
|
||||
L["statList"] = {
|
||||
{pattern = string.lower(SPELL_STAT1_NAME), id = SPELL_STAT1_NAME}, -- Strength
|
||||
{pattern = string.lower(SPELL_STAT2_NAME), id = SPELL_STAT2_NAME}, -- Agility
|
||||
{pattern = string.lower(SPELL_STAT3_NAME), id = SPELL_STAT3_NAME}, -- Stamina
|
||||
{pattern = string.lower(SPELL_STAT4_NAME), id = SPELL_STAT4_NAME}, -- Intellect
|
||||
{pattern = string.lower(SPELL_STAT5_NAME), id = SPELL_STAT5_NAME}, -- Spirit
|
||||
{pattern = "防禦等級", id = CR_DEFENSE_SKILL},
|
||||
{pattern = "閃躲等級", id = CR_DODGE},
|
||||
{pattern = "格擋等級", id = CR_BLOCK}, -- block enchant: "+10 Shield Block Rating"
|
||||
{pattern = "招架等級", id = CR_PARRY},
|
||||
|
||||
{pattern = "法術致命一擊等級", id = CR_CRIT_SPELL},
|
||||
{pattern = "遠程攻擊致命一擊等級", id = CR_CRIT_RANGED},
|
||||
{pattern = "致命一擊等級", id = CR_CRIT_MELEE},
|
||||
|
||||
{pattern = "法術命中等級", id = CR_HIT_SPELL},
|
||||
{pattern = "遠程命中等級", id = CR_HIT_RANGED},
|
||||
{pattern = "命中等級", id = CR_HIT_MELEE},
|
||||
|
||||
{pattern = "韌性", id = CR_CRIT_TAKEN_MELEE}, -- resilience is implicitly a rating
|
||||
|
||||
{pattern = "法術加速等級", id = CR_HASTE_SPELL},
|
||||
{pattern = "遠程攻擊加速等級", id = CR_HASTE_RANGED},
|
||||
{pattern = "加速等級", id = CR_HASTE_MELEE},
|
||||
{pattern = "攻擊速度等級", id = CR_HASTE_MELEE}, -- [Drums of Battle]
|
||||
|
||||
{pattern = "技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "熟練等級", id = CR_EXPERTISE}, -- 2.3
|
||||
|
||||
{pattern = "命中迴避率", id = CR_HIT_TAKEN_MELEE},
|
||||
{pattern = "護甲穿透等級", id = CR_ARMOR_PENETRATION},
|
||||
{pattern = string.lower(ARMOR), id = ARMOR},
|
||||
--[[
|
||||
{pattern = "匕首技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "劍技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "雙手劍技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "斧技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "弓技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "弩技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "槍械技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "野性戰鬥技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "錘技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "長柄武器技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "法杖技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "雙手斧技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "雙手錘技能等級", id = CR_WEAPON_SKILL},
|
||||
{pattern = "徒手戰鬥技能等級", id = CR_WEAPON_SKILL},
|
||||
--]]
|
||||
}
|
||||
-------------------------
|
||||
-- Added info patterns --
|
||||
-------------------------
|
||||
-- $value will be replaced with the number
|
||||
-- EX: "$value% Crit" -> "+1.34% Crit"
|
||||
-- EX: "Crit $value%" -> "Crit +1.34%"
|
||||
L["$value% Crit"] = "$value% 致命"
|
||||
L["$value% Spell Crit"] = "$value% 法術致命"
|
||||
L["$value% Dodge"] = "$value% 閃躲"
|
||||
L["$value HP"] = "$value 生命"
|
||||
L["$value MP"] = "$value 法力"
|
||||
L["$value AP"] = "$value 強度"
|
||||
L["$value RAP"] = "$value 遠程強度"
|
||||
L["$value Dmg"] = "$value 法傷"
|
||||
L["$value Heal"] = "$value 治療"
|
||||
L["$value Armor"] = "$value 護甲"
|
||||
L["$value Block"] = "$value 格擋值"
|
||||
L["$value MP5"] = "$value 施法回魔"
|
||||
L["$value MP5(NC)"] = "$value 一般回魔"
|
||||
L["$value HP5"] = "$value 回血"
|
||||
L["$value to be Dodged/Parried"] = "$value 被閃躲/被招架"
|
||||
L["$value to be Crit"] = "$value 被致命"
|
||||
L["$value Crit Dmg Taken"] = "$value 致命傷害減免"
|
||||
L["$value DOT Dmg Taken"] = "$value 持續傷害減免"
|
||||
L["$value% Parry"] = "$value% 招架"
|
||||
-- for hit rating showing both physical and spell conversions
|
||||
-- (+1.21%, S+0.98%)
|
||||
-- (+1.21%, +0.98% S)
|
||||
L["$value Spell"] = "$value 法術"
|
||||
|
||||
------------------
|
||||
-- Stat Summary --
|
||||
------------------
|
||||
L["Stat Summary"] = "屬性統計"
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
||||
## Interface: 30300
|
||||
## Title: RatingBuster
|
||||
## Notes: Item stat breakdown, analysis and comparison
|
||||
## Notes-zhTW: 裝備數值解析與比較
|
||||
## Author: Whitetooth
|
||||
## 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
|
||||
## 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-Project-Name: RatingBuster
|
||||
## X-Curse-Project-ID: rating-buster
|
||||
## X-Curse-Repository-ID: wow/rating-buster/mainline
|
||||
|
||||
# Non-Ace Libraries #
|
||||
UTF8\utf8data.lua
|
||||
UTF8\utf8.lua
|
||||
|
||||
#@no-lib-strip@
|
||||
embeds.xml
|
||||
#@end-no-lib-strip@
|
||||
|
||||
# Localization Files #
|
||||
RatingBuster-Locale-enUS.lua
|
||||
RatingBuster-Locale-ruRU.lua
|
||||
RatingBuster-Locale-zhCN.lua
|
||||
RatingBuster-Locale-zhTW.lua
|
||||
RatingBuster-Locale-deDE.lua
|
||||
RatingBuster-Locale-frFR.lua
|
||||
RatingBuster-Locale-koKR.lua
|
||||
RatingBuster-Locale-esES.lua
|
||||
|
||||
# Core #
|
||||
RatingBuster.lua
|
||||
@@ -0,0 +1,327 @@
|
||||
-- $Id: utf8.lua 147 2007-01-04 00:57:00Z pasta $
|
||||
--
|
||||
-- Provides UTF-8 aware string functions implemented in pure lua:
|
||||
-- * string.utf8len(s)
|
||||
-- * string.utf8sub(s, i, j)
|
||||
-- * string.utf8reverse(s)
|
||||
--
|
||||
-- If utf8data.lua (containing the lower<->upper case mappings) is loaded, these
|
||||
-- additional functions are available:
|
||||
-- * string.utf8upper(s)
|
||||
-- * string.utf8lower(s)
|
||||
--
|
||||
-- All functions behave as their non UTF-8 aware counterparts with the exception
|
||||
-- that UTF-8 characters are used instead of bytes for all units.
|
||||
|
||||
--[[
|
||||
Copyright (c) 2006-2007, Kyle Smith
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the author nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--]]
|
||||
|
||||
-- ABNF from RFC 3629
|
||||
--
|
||||
-- UTF8-octets = *( UTF8-char )
|
||||
-- UTF8-char = UTF8-1 / UTF8-2 / UTF8-3 / UTF8-4
|
||||
-- UTF8-1 = %x00-7F
|
||||
-- UTF8-2 = %xC2-DF UTF8-tail
|
||||
-- UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) /
|
||||
-- %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail )
|
||||
-- UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) /
|
||||
-- %xF4 %x80-8F 2( UTF8-tail )
|
||||
-- UTF8-tail = %x80-BF
|
||||
--
|
||||
|
||||
-- returns the number of bytes used by the UTF-8 character at byte i in s
|
||||
-- also doubles as a UTF-8 character validator
|
||||
local function utf8charbytes (s, i)
|
||||
-- argument defaults
|
||||
i = i or 1
|
||||
|
||||
-- argument checking
|
||||
if type(s) ~= "string" then
|
||||
error("bad argument #1 to 'utf8charbytes' (string expected, got ".. type(s).. ")")
|
||||
end
|
||||
if type(i) ~= "number" then
|
||||
error("bad argument #2 to 'utf8charbytes' (number expected, got ".. type(i).. ")")
|
||||
end
|
||||
|
||||
local c = s:byte(i)
|
||||
|
||||
-- determine bytes needed for character, based on RFC 3629
|
||||
-- validate byte 1
|
||||
if c > 0 and c <= 127 then
|
||||
-- UTF8-1
|
||||
return 1
|
||||
|
||||
elseif c >= 194 and c <= 223 then
|
||||
-- UTF8-2
|
||||
local c2 = s:byte(i + 1)
|
||||
|
||||
if not c2 then
|
||||
error("UTF-8 string terminated early")
|
||||
end
|
||||
|
||||
-- validate byte 2
|
||||
if c2 < 128 or c2 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
return 2
|
||||
|
||||
elseif c >= 224 and c <= 239 then
|
||||
-- UTF8-3
|
||||
local c2 = s:byte(i + 1)
|
||||
local c3 = s:byte(i + 2)
|
||||
|
||||
if not c2 or not c3 then
|
||||
error("UTF-8 string terminated early")
|
||||
end
|
||||
|
||||
-- validate byte 2
|
||||
if c == 224 and (c2 < 160 or c2 > 191) then
|
||||
error("Invalid UTF-8 character")
|
||||
elseif c == 237 and (c2 < 128 or c2 > 159) then
|
||||
error("Invalid UTF-8 character")
|
||||
elseif c2 < 128 or c2 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
-- validate byte 3
|
||||
if c3 < 128 or c3 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
return 3
|
||||
|
||||
elseif c >= 240 and c <= 244 then
|
||||
-- UTF8-4
|
||||
local c2 = s:byte(i + 1)
|
||||
local c3 = s:byte(i + 2)
|
||||
local c4 = s:byte(i + 3)
|
||||
|
||||
if not c2 or not c3 or not c4 then
|
||||
error("UTF-8 string terminated early")
|
||||
end
|
||||
|
||||
-- validate byte 2
|
||||
if c == 240 and (c2 < 144 or c2 > 191) then
|
||||
error("Invalid UTF-8 character")
|
||||
elseif c == 244 and (c2 < 128 or c2 > 143) then
|
||||
error("Invalid UTF-8 character")
|
||||
elseif c2 < 128 or c2 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
-- validate byte 3
|
||||
if c3 < 128 or c3 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
-- validate byte 4
|
||||
if c4 < 128 or c4 > 191 then
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
|
||||
return 4
|
||||
|
||||
else
|
||||
error("Invalid UTF-8 character")
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- returns the number of characters in a UTF-8 string
|
||||
local function utf8len (s)
|
||||
-- argument checking
|
||||
if type(s) ~= "string" then
|
||||
error("bad argument #1 to 'utf8len' (string expected, got ".. type(s).. ")")
|
||||
end
|
||||
|
||||
local pos = 1
|
||||
local bytes = s:len()
|
||||
local len = 0
|
||||
|
||||
while pos <= bytes and len ~= chars do
|
||||
local c = s:byte(pos)
|
||||
len = len + 1
|
||||
|
||||
pos = pos + utf8charbytes(s, pos)
|
||||
end
|
||||
|
||||
if chars ~= nil then
|
||||
return pos - 1
|
||||
end
|
||||
|
||||
return len
|
||||
end
|
||||
|
||||
-- install in the string library
|
||||
if not string.utf8len then
|
||||
string.utf8len = utf8len
|
||||
end
|
||||
|
||||
|
||||
-- functions identically to string.sub except that i and j are UTF-8 characters
|
||||
-- instead of bytes
|
||||
local function utf8sub (s, i, j)
|
||||
-- argument defaults
|
||||
j = j or -1
|
||||
|
||||
-- argument checking
|
||||
if type(s) ~= "string" then
|
||||
error("bad argument #1 to 'utf8sub' (string expected, got ".. type(s).. ")")
|
||||
end
|
||||
if type(i) ~= "number" then
|
||||
error("bad argument #2 to 'utf8sub' (number expected, got ".. type(i).. ")")
|
||||
end
|
||||
if type(j) ~= "number" then
|
||||
error("bad argument #3 to 'utf8sub' (number expected, got ".. type(j).. ")")
|
||||
end
|
||||
|
||||
local pos = 1
|
||||
local bytes = s:len()
|
||||
local len = 0
|
||||
|
||||
-- only set l if i or j is negative
|
||||
local l = (i >= 0 and j >= 0) or utf8len(s)
|
||||
local startChar = (i >= 0) and i or l + i + 1
|
||||
local endChar = (j >= 0) and j or l + j + 1
|
||||
|
||||
-- can't have start before end!
|
||||
if startChar > endChar then
|
||||
return ""
|
||||
end
|
||||
|
||||
-- byte offsets to pass to string.sub
|
||||
local startByte, endByte = 1, bytes
|
||||
|
||||
while pos <= bytes do
|
||||
len = len + 1
|
||||
|
||||
if len == startChar then
|
||||
startByte = pos
|
||||
end
|
||||
|
||||
pos = pos + utf8charbytes(s, pos)
|
||||
|
||||
if len == endChar then
|
||||
endByte = pos - 1
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return s:sub(startByte, endByte)
|
||||
end
|
||||
|
||||
-- install in the string library
|
||||
if not string.utf8sub then
|
||||
string.utf8sub = utf8sub
|
||||
end
|
||||
|
||||
|
||||
-- replace UTF-8 characters based on a mapping table
|
||||
local function utf8replace (s, mapping)
|
||||
-- argument checking
|
||||
if type(s) ~= "string" then
|
||||
error("bad argument #1 to 'utf8replace' (string expected, got ".. type(s).. ")")
|
||||
end
|
||||
if type(mapping) ~= "table" then
|
||||
error("bad argument #2 to 'utf8replace' (table expected, got ".. type(mapping).. ")")
|
||||
end
|
||||
|
||||
local pos = 1
|
||||
local bytes = s:len()
|
||||
local charbytes
|
||||
local newstr = ""
|
||||
|
||||
while pos <= bytes do
|
||||
charbytes = utf8charbytes(s, pos)
|
||||
local c = s:sub(pos, pos + charbytes - 1)
|
||||
|
||||
newstr = newstr .. (mapping[c] or c)
|
||||
|
||||
pos = pos + charbytes
|
||||
end
|
||||
|
||||
return newstr
|
||||
end
|
||||
|
||||
|
||||
-- identical to string.upper except it knows about unicode simple case conversions
|
||||
local function utf8upper (s)
|
||||
return utf8replace(s, utf8_lc_uc)
|
||||
end
|
||||
|
||||
-- install in the string library
|
||||
if not string.utf8upper and utf8_lc_uc then
|
||||
string.utf8upper = utf8upper
|
||||
end
|
||||
|
||||
|
||||
-- identical to string.lower except it knows about unicode simple case conversions
|
||||
local function utf8lower (s)
|
||||
return utf8replace(s, utf8_uc_lc)
|
||||
end
|
||||
|
||||
-- install in the string library
|
||||
if not string.utf8lower and utf8_uc_lc then
|
||||
string.utf8lower = utf8lower
|
||||
end
|
||||
|
||||
|
||||
-- identical to string.reverse except that it supports UTF-8
|
||||
local function utf8reverse (s)
|
||||
-- argument checking
|
||||
if type(s) ~= "string" then
|
||||
error("bad argument #1 to 'utf8reverse' (string expected, got ".. type(s).. ")")
|
||||
end
|
||||
|
||||
local bytes = s:len()
|
||||
local pos = bytes
|
||||
local charbytes
|
||||
local newstr = ""
|
||||
|
||||
while pos > 0 do
|
||||
c = s:byte(pos)
|
||||
while c >= 128 and c <= 191 do
|
||||
pos = pos - 1
|
||||
c = s:byte(pos)
|
||||
end
|
||||
|
||||
charbytes = utf8charbytes(s, pos)
|
||||
|
||||
newstr = newstr .. s:sub(pos, pos + charbytes - 1)
|
||||
|
||||
pos = pos - 1
|
||||
end
|
||||
|
||||
return newstr
|
||||
end
|
||||
|
||||
-- install in the string library
|
||||
if not string.utf8reverse then
|
||||
string.utf8reverse = utf8reverse
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,19 @@
|
||||
<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="libs\LibStub\LibStub.lua"/>
|
||||
<Include file="libs\LibStatLogic-1.2\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" />
|
||||
<Include file="Libs\AceLocale-3.0\AceLocale-3.0.xml" />
|
||||
<Include file="Libs\AceAddon-3.0\AceAddon-3.0.xml" />
|
||||
<Include file="Libs\AceDB-3.0\AceDB-3.0.xml" />
|
||||
<Include file="Libs\AceDBOptions-3.0\AceDBOptions-3.0.xml" />
|
||||
<Include file="Libs\AceConsole-3.0\AceConsole-3.0.xml" />
|
||||
<Include file="Libs\AceEvent-3.0\AceEvent-3.0.xml" />
|
||||
<Include file="Libs\AceGUI-3.0\AceGUI-3.0.xml" />
|
||||
<Include file="Libs\AceConfig-3.0\AceConfig-3.0.xml" />
|
||||
<Script file="Libs\LibDualSpec-1.0\LibDualSpec-1.0.lua" />
|
||||
|
||||
</Ui>
|
||||
Binary file not shown.
@@ -0,0 +1,642 @@
|
||||
--- **AceAddon-3.0** provides a template for creating addon objects.
|
||||
-- It'll provide you with a set of callback functions that allow you to simplify the loading
|
||||
-- process of your addon.\\
|
||||
-- Callbacks provided are:\\
|
||||
-- * **OnInitialize**, which is called directly after the addon is fully loaded.
|
||||
-- * **OnEnable** which gets called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
|
||||
-- * **OnDisable**, which is only called when your addon is manually being disabled.
|
||||
-- @usage
|
||||
-- -- A small (but complete) addon, that doesn't do anything,
|
||||
-- -- but shows usage of the callbacks.
|
||||
-- local MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
|
||||
--
|
||||
-- function MyAddon:OnInitialize()
|
||||
-- -- do init tasks here, like loading the Saved Variables,
|
||||
-- -- or setting up slash commands.
|
||||
-- end
|
||||
--
|
||||
-- function MyAddon:OnEnable()
|
||||
-- -- Do more initialization here, that really enables the use of your addon.
|
||||
-- -- Register Events, Hook functions, Create Frames, Get information from
|
||||
-- -- the game that wasn't available in OnInitialize
|
||||
-- end
|
||||
--
|
||||
-- function MyAddon:OnDisable()
|
||||
-- -- Unhook, Unregister Events, Hide frames that you created.
|
||||
-- -- You would probably only use an OnDisable if you want to
|
||||
-- -- build a "standby" mode, or be able to toggle modules on/off.
|
||||
-- end
|
||||
-- @class file
|
||||
-- @name AceAddon-3.0.lua
|
||||
-- @release $Id: AceAddon-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
|
||||
|
||||
local MAJOR, MINOR = "AceAddon-3.0", 5
|
||||
local AceAddon, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceAddon then return end -- No Upgrade needed.
|
||||
|
||||
AceAddon.frame = AceAddon.frame or CreateFrame("Frame", "AceAddon30Frame") -- Our very own frame
|
||||
AceAddon.addons = AceAddon.addons or {} -- addons in general
|
||||
AceAddon.statuses = AceAddon.statuses or {} -- statuses of addon.
|
||||
AceAddon.initializequeue = AceAddon.initializequeue or {} -- addons that are new and not initialized
|
||||
AceAddon.enablequeue = AceAddon.enablequeue or {} -- addons that are initialized and waiting to be enabled
|
||||
AceAddon.embeds = AceAddon.embeds or setmetatable({}, {__index = function(tbl, key) tbl[key] = {} return tbl[key] end }) -- contains a list of libraries embedded in an addon
|
||||
|
||||
-- Lua APIs
|
||||
local tinsert, tconcat, tremove = table.insert, table.concat, table.remove
|
||||
local fmt, tostring = string.format, tostring
|
||||
local select, pairs, next, type, unpack = select, pairs, next, type, unpack
|
||||
local loadstring, assert, error = loadstring, assert, error
|
||||
local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: LibStub, IsLoggedIn, geterrorhandler
|
||||
|
||||
--[[
|
||||
xpcall safecall implementation
|
||||
]]
|
||||
local xpcall = xpcall
|
||||
|
||||
local function errorhandler(err)
|
||||
return geterrorhandler()(err)
|
||||
end
|
||||
|
||||
local function CreateDispatcher(argCount)
|
||||
local code = [[
|
||||
local xpcall, eh = ...
|
||||
local method, ARGS
|
||||
local function call() return method(ARGS) end
|
||||
|
||||
local function dispatch(func, ...)
|
||||
method = func
|
||||
if not method then return end
|
||||
ARGS = ...
|
||||
return xpcall(call, eh)
|
||||
end
|
||||
|
||||
return dispatch
|
||||
]]
|
||||
|
||||
local ARGS = {}
|
||||
for i = 1, argCount do ARGS[i] = "arg"..i end
|
||||
code = code:gsub("ARGS", tconcat(ARGS, ", "))
|
||||
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
|
||||
end
|
||||
|
||||
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
|
||||
local dispatcher = CreateDispatcher(argCount)
|
||||
rawset(self, argCount, dispatcher)
|
||||
return dispatcher
|
||||
end})
|
||||
Dispatchers[0] = function(func)
|
||||
return xpcall(func, errorhandler)
|
||||
end
|
||||
|
||||
local function safecall(func, ...)
|
||||
-- we check to see if the func is passed is actually a function here and don't error when it isn't
|
||||
-- this safecall is used for optional functions like OnInitialize OnEnable etc. When they are not
|
||||
-- present execution should continue without hinderance
|
||||
if type(func) == "function" then
|
||||
return Dispatchers[select('#', ...)](func, ...)
|
||||
end
|
||||
end
|
||||
|
||||
-- local functions that will be implemented further down
|
||||
local Enable, Disable, EnableModule, DisableModule, Embed, NewModule, GetModule, GetName, SetDefaultModuleState, SetDefaultModuleLibraries, SetEnabledState, SetDefaultModulePrototype
|
||||
|
||||
-- used in the addon metatable
|
||||
local function addontostring( self ) return self.name end
|
||||
|
||||
--- Create a new AceAddon-3.0 addon.
|
||||
-- Any libraries you specified will be embeded, and the addon will be scheduled for
|
||||
-- its OnInitialize and OnEnable callbacks.
|
||||
-- The final addon object, with all libraries embeded, will be returned.
|
||||
-- @paramsig [object ,]name[, lib, ...]
|
||||
-- @param object Table to use as a base for the addon (optional)
|
||||
-- @param name Name of the addon object to create
|
||||
-- @param lib List of libraries to embed into the addon
|
||||
-- @usage
|
||||
-- -- Create a simple addon object
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceEvent-3.0")
|
||||
--
|
||||
-- -- Create a Addon object based on the table of a frame
|
||||
-- local MyFrame = CreateFrame("Frame")
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon(MyFrame, "MyAddon", "AceEvent-3.0")
|
||||
function AceAddon:NewAddon(objectorname, ...)
|
||||
local object,name
|
||||
local i=1
|
||||
if type(objectorname)=="table" then
|
||||
object=objectorname
|
||||
name=...
|
||||
i=2
|
||||
else
|
||||
name=objectorname
|
||||
end
|
||||
if type(name)~="string" then
|
||||
error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2)
|
||||
end
|
||||
if self.addons[name] then
|
||||
error(("Usage: NewAddon([object,] name, [lib, lib, lib, ...]): 'name' - Addon '%s' already exists."):format(name), 2)
|
||||
end
|
||||
|
||||
object = object or {}
|
||||
object.name = name
|
||||
|
||||
local addonmeta = {}
|
||||
local oldmeta = getmetatable(object)
|
||||
if oldmeta then
|
||||
for k, v in pairs(oldmeta) do addonmeta[k] = v end
|
||||
end
|
||||
addonmeta.__tostring = addontostring
|
||||
|
||||
setmetatable( object, addonmeta )
|
||||
self.addons[name] = object
|
||||
object.modules = {}
|
||||
object.defaultModuleLibraries = {}
|
||||
Embed( object ) -- embed NewModule, GetModule methods
|
||||
self:EmbedLibraries(object, select(i,...))
|
||||
|
||||
-- add to queue of addons to be initialized upon ADDON_LOADED
|
||||
tinsert(self.initializequeue, object)
|
||||
return object
|
||||
end
|
||||
|
||||
|
||||
--- Get the addon object by its name from the internal AceAddon registry.
|
||||
-- Throws an error if the addon object cannot be found (except if silent is set).
|
||||
-- @param name unique name of the addon object
|
||||
-- @param silent if true, the addon is optional, silently return nil if its not found
|
||||
-- @usage
|
||||
-- -- Get the Addon
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
function AceAddon:GetAddon(name, silent)
|
||||
if not silent and not self.addons[name] then
|
||||
error(("Usage: GetAddon(name): 'name' - Cannot find an AceAddon '%s'."):format(tostring(name)), 2)
|
||||
end
|
||||
return self.addons[name]
|
||||
end
|
||||
|
||||
-- - Embed a list of libraries into the specified addon.
|
||||
-- This function will try to embed all of the listed libraries into the addon
|
||||
-- and error if a single one fails.
|
||||
--
|
||||
-- **Note:** This function is for internal use by :NewAddon/:NewModule
|
||||
-- @paramsig addon, [lib, ...]
|
||||
-- @param addon addon object to embed the libs in
|
||||
-- @param lib List of libraries to embed into the addon
|
||||
function AceAddon:EmbedLibraries(addon, ...)
|
||||
for i=1,select("#", ... ) do
|
||||
local libname = select(i, ...)
|
||||
self:EmbedLibrary(addon, libname, false, 4)
|
||||
end
|
||||
end
|
||||
|
||||
-- - Embed a library into the addon object.
|
||||
-- This function will check if the specified library is registered with LibStub
|
||||
-- and if it has a :Embed function to call. It'll error if any of those conditions
|
||||
-- fails.
|
||||
--
|
||||
-- **Note:** This function is for internal use by :EmbedLibraries
|
||||
-- @paramsig addon, libname[, silent[, offset]]
|
||||
-- @param addon addon object to embed the library in
|
||||
-- @param libname name of the library to embed
|
||||
-- @param silent marks an embed to fail silently if the library doesn't exist (optional)
|
||||
-- @param offset will push the error messages back to said offset, defaults to 2 (optional)
|
||||
function AceAddon:EmbedLibrary(addon, libname, silent, offset)
|
||||
local lib = LibStub:GetLibrary(libname, true)
|
||||
if not lib and not silent then
|
||||
error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Cannot find a library instance of %q."):format(tostring(libname)), offset or 2)
|
||||
elseif lib and type(lib.Embed) == "function" then
|
||||
lib:Embed(addon)
|
||||
tinsert(self.embeds[addon], libname)
|
||||
return true
|
||||
elseif lib then
|
||||
error(("Usage: EmbedLibrary(addon, libname, silent, offset): 'libname' - Library '%s' is not Embed capable"):format(libname), offset or 2)
|
||||
end
|
||||
end
|
||||
|
||||
--- Return the specified module from an addon object.
|
||||
-- Throws an error if the addon object cannot be found (except if silent is set)
|
||||
-- @name //addon//:GetModule
|
||||
-- @paramsig name[, silent]
|
||||
-- @param name unique name of the module
|
||||
-- @param silent if true, the module is optional, silently return nil if its not found (optional)
|
||||
-- @usage
|
||||
-- -- Get the Addon
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- -- Get the Module
|
||||
-- MyModule = MyAddon:GetModule("MyModule")
|
||||
function GetModule(self, name, silent)
|
||||
if not self.modules[name] and not silent then
|
||||
error(("Usage: GetModule(name, silent): 'name' - Cannot find module '%s'."):format(tostring(name)), 2)
|
||||
end
|
||||
return self.modules[name]
|
||||
end
|
||||
|
||||
local function IsModuleTrue(self) return true end
|
||||
|
||||
--- Create a new module for the addon.
|
||||
-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.\\
|
||||
-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as
|
||||
-- an addon object.
|
||||
-- @name //addon//:NewModule
|
||||
-- @paramsig name[, prototype|lib[, lib, ...]]
|
||||
-- @param name unique name of the module
|
||||
-- @param prototype object to derive this module from, methods and values from this table will be mixed into the module (optional)
|
||||
-- @param lib List of libraries to embed into the addon
|
||||
-- @usage
|
||||
-- -- Create a module with some embeded libraries
|
||||
-- MyModule = MyAddon:NewModule("MyModule", "AceEvent-3.0", "AceHook-3.0")
|
||||
--
|
||||
-- -- Create a module with a prototype
|
||||
-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
|
||||
-- MyModule = MyAddon:NewModule("MyModule", prototype, "AceEvent-3.0", "AceHook-3.0")
|
||||
function NewModule(self, name, prototype, ...)
|
||||
if type(name) ~= "string" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - string expected got '%s'."):format(type(name)), 2) end
|
||||
if type(prototype) ~= "string" and type(prototype) ~= "table" and type(prototype) ~= "nil" then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'prototype' - table (prototype), string (lib) or nil expected got '%s'."):format(type(prototype)), 2) end
|
||||
|
||||
if self.modules[name] then error(("Usage: NewModule(name, [prototype, [lib, lib, lib, ...]): 'name' - Module '%s' already exists."):format(name), 2) end
|
||||
|
||||
-- modules are basically addons. We treat them as such. They will be added to the initializequeue properly as well.
|
||||
-- NewModule can only be called after the parent addon is present thus the modules will be initialized after their parent is.
|
||||
local module = AceAddon:NewAddon(fmt("%s_%s", self.name or tostring(self), name))
|
||||
|
||||
module.IsModule = IsModuleTrue
|
||||
module:SetEnabledState(self.defaultModuleState)
|
||||
module.moduleName = name
|
||||
|
||||
if type(prototype) == "string" then
|
||||
AceAddon:EmbedLibraries(module, prototype, ...)
|
||||
else
|
||||
AceAddon:EmbedLibraries(module, ...)
|
||||
end
|
||||
AceAddon:EmbedLibraries(module, unpack(self.defaultModuleLibraries))
|
||||
|
||||
if not prototype or type(prototype) == "string" then
|
||||
prototype = self.defaultModulePrototype or nil
|
||||
end
|
||||
|
||||
if type(prototype) == "table" then
|
||||
local mt = getmetatable(module)
|
||||
mt.__index = prototype
|
||||
setmetatable(module, mt) -- More of a Base class type feel.
|
||||
end
|
||||
|
||||
safecall(self.OnModuleCreated, self, module) -- Was in Ace2 and I think it could be a cool thing to have handy.
|
||||
self.modules[name] = module
|
||||
|
||||
return module
|
||||
end
|
||||
|
||||
--- Returns the real name of the addon or module, without any prefix.
|
||||
-- @name //addon//:GetName
|
||||
-- @paramsig
|
||||
-- @usage
|
||||
-- print(MyAddon:GetName())
|
||||
-- -- prints "MyAddon"
|
||||
function GetName(self)
|
||||
return self.moduleName or self.name
|
||||
end
|
||||
|
||||
--- Enables the Addon, if possible, return true or false depending on success.
|
||||
-- This internally calls AceAddon:EnableAddon(), thus dispatching a OnEnable callback
|
||||
-- and enabling all modules of the addon (unless explicitly disabled).\\
|
||||
-- :Enable() also sets the internal `enableState` variable to true
|
||||
-- @name //addon//:Enable
|
||||
-- @paramsig
|
||||
-- @usage
|
||||
-- -- Enable MyModule
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyModule = MyAddon:GetModule("MyModule")
|
||||
-- MyModule:Enable()
|
||||
function Enable(self)
|
||||
self:SetEnabledState(true)
|
||||
return AceAddon:EnableAddon(self)
|
||||
end
|
||||
|
||||
--- Disables the Addon, if possible, return true or false depending on success.
|
||||
-- This internally calls AceAddon:DisableAddon(), thus dispatching a OnDisable callback
|
||||
-- and disabling all modules of the addon.\\
|
||||
-- :Disable() also sets the internal `enableState` variable to false
|
||||
-- @name //addon//:Disable
|
||||
-- @paramsig
|
||||
-- @usage
|
||||
-- -- Disable MyAddon
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyAddon:Disable()
|
||||
function Disable(self)
|
||||
self:SetEnabledState(false)
|
||||
return AceAddon:DisableAddon(self)
|
||||
end
|
||||
|
||||
--- Enables the Module, if possible, return true or false depending on success.
|
||||
-- Short-hand function that retrieves the module via `:GetModule` and calls `:Enable` on the module object.
|
||||
-- @name //addon//:EnableModule
|
||||
-- @paramsig name
|
||||
-- @usage
|
||||
-- -- Enable MyModule using :GetModule
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyModule = MyAddon:GetModule("MyModule")
|
||||
-- MyModule:Enable()
|
||||
--
|
||||
-- -- Enable MyModule using the short-hand
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyAddon:EnableModule("MyModule")
|
||||
function EnableModule(self, name)
|
||||
local module = self:GetModule( name )
|
||||
return module:Enable()
|
||||
end
|
||||
|
||||
--- Disables the Module, if possible, return true or false depending on success.
|
||||
-- Short-hand function that retrieves the module via `:GetModule` and calls `:Disable` on the module object.
|
||||
-- @name //addon//:DisableModule
|
||||
-- @paramsig name
|
||||
-- @usage
|
||||
-- -- Disable MyModule using :GetModule
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyModule = MyAddon:GetModule("MyModule")
|
||||
-- MyModule:Disable()
|
||||
--
|
||||
-- -- Disable MyModule using the short-hand
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):GetAddon("MyAddon")
|
||||
-- MyAddon:DisableModule("MyModule")
|
||||
function DisableModule(self, name)
|
||||
local module = self:GetModule( name )
|
||||
return module:Disable()
|
||||
end
|
||||
|
||||
--- Set the default libraries to be mixed into all modules created by this object.
|
||||
-- Note that you can only change the default module libraries before any module is created.
|
||||
-- @name //addon//:SetDefaultModuleLibraries
|
||||
-- @paramsig lib[, lib, ...]
|
||||
-- @param lib List of libraries to embed into the addon
|
||||
-- @usage
|
||||
-- -- Create the addon object
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
|
||||
-- -- Configure default libraries for modules (all modules need AceEvent-3.0)
|
||||
-- MyAddon:SetDefaultModuleLibraries("AceEvent-3.0")
|
||||
-- -- Create a module
|
||||
-- MyModule = MyAddon:NewModule("MyModule")
|
||||
function SetDefaultModuleLibraries(self, ...)
|
||||
if next(self.modules) then
|
||||
error("Usage: SetDefaultModuleLibraries(...): cannot change the module defaults after a module has been registered.", 2)
|
||||
end
|
||||
self.defaultModuleLibraries = {...}
|
||||
end
|
||||
|
||||
--- Set the default state in which new modules are being created.
|
||||
-- Note that you can only change the default state before any module is created.
|
||||
-- @name //addon//:SetDefaultModuleState
|
||||
-- @paramsig state
|
||||
-- @param state Default state for new modules, true for enabled, false for disabled
|
||||
-- @usage
|
||||
-- -- Create the addon object
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon")
|
||||
-- -- Set the default state to "disabled"
|
||||
-- MyAddon:SetDefaultModuleState(false)
|
||||
-- -- Create a module and explicilty enable it
|
||||
-- MyModule = MyAddon:NewModule("MyModule")
|
||||
-- MyModule:Enable()
|
||||
function SetDefaultModuleState(self, state)
|
||||
if next(self.modules) then
|
||||
error("Usage: SetDefaultModuleState(state): cannot change the module defaults after a module has been registered.", 2)
|
||||
end
|
||||
self.defaultModuleState = state
|
||||
end
|
||||
|
||||
--- Set the default prototype to use for new modules on creation.
|
||||
-- Note that you can only change the default prototype before any module is created.
|
||||
-- @name //addon//:SetDefaultModulePrototype
|
||||
-- @paramsig prototype
|
||||
-- @param prototype Default prototype for the new modules (table)
|
||||
-- @usage
|
||||
-- -- Define a prototype
|
||||
-- local prototype = { OnEnable = function(self) print("OnEnable called!") end }
|
||||
-- -- Set the default prototype
|
||||
-- MyAddon:SetDefaultModulePrototype(prototype)
|
||||
-- -- Create a module and explicitly Enable it
|
||||
-- MyModule = MyAddon:NewModule("MyModule")
|
||||
-- MyModule:Enable()
|
||||
-- -- should print "OnEnable called!" now
|
||||
-- @see NewModule
|
||||
function SetDefaultModulePrototype(self, prototype)
|
||||
if next(self.modules) then
|
||||
error("Usage: SetDefaultModulePrototype(prototype): cannot change the module defaults after a module has been registered.", 2)
|
||||
end
|
||||
if type(prototype) ~= "table" then
|
||||
error(("Usage: SetDefaultModulePrototype(prototype): 'prototype' - table expected got '%s'."):format(type(prototype)), 2)
|
||||
end
|
||||
self.defaultModulePrototype = prototype
|
||||
end
|
||||
|
||||
--- Set the state of an addon or module
|
||||
-- This should only be called before any enabling actually happend, e.g. in/before OnInitialize.
|
||||
-- @name //addon//:SetEnabledState
|
||||
-- @paramsig state
|
||||
-- @param state the state of an addon or module (enabled=true, disabled=false)
|
||||
function SetEnabledState(self, state)
|
||||
self.enabledState = state
|
||||
end
|
||||
|
||||
|
||||
--- Return an iterator of all modules associated to the addon.
|
||||
-- @name //addon//:IterateModules
|
||||
-- @paramsig
|
||||
-- @usage
|
||||
-- -- Enable all modules
|
||||
-- for name, module in MyAddon:IterateModules() do
|
||||
-- module:Enable()
|
||||
-- end
|
||||
local function IterateModules(self) return pairs(self.modules) end
|
||||
|
||||
-- Returns an iterator of all embeds in the addon
|
||||
-- @name //addon//:IterateEmbeds
|
||||
-- @paramsig
|
||||
local function IterateEmbeds(self) return pairs(AceAddon.embeds[self]) end
|
||||
|
||||
--- Query the enabledState of an addon.
|
||||
-- @name //addon//:IsEnabled
|
||||
-- @paramsig
|
||||
-- @usage
|
||||
-- if MyAddon:IsEnabled() then
|
||||
-- MyAddon:Disable()
|
||||
-- end
|
||||
local function IsEnabled(self) return self.enabledState end
|
||||
local mixins = {
|
||||
NewModule = NewModule,
|
||||
GetModule = GetModule,
|
||||
Enable = Enable,
|
||||
Disable = Disable,
|
||||
EnableModule = EnableModule,
|
||||
DisableModule = DisableModule,
|
||||
IsEnabled = IsEnabled,
|
||||
SetDefaultModuleLibraries = SetDefaultModuleLibraries,
|
||||
SetDefaultModuleState = SetDefaultModuleState,
|
||||
SetDefaultModulePrototype = SetDefaultModulePrototype,
|
||||
SetEnabledState = SetEnabledState,
|
||||
IterateModules = IterateModules,
|
||||
IterateEmbeds = IterateEmbeds,
|
||||
GetName = GetName,
|
||||
}
|
||||
local function IsModule(self) return false end
|
||||
local pmixins = {
|
||||
defaultModuleState = true,
|
||||
enabledState = true,
|
||||
IsModule = IsModule,
|
||||
}
|
||||
-- Embed( target )
|
||||
-- target (object) - target object to embed aceaddon in
|
||||
--
|
||||
-- this is a local function specifically since it's meant to be only called internally
|
||||
function Embed(target)
|
||||
for k, v in pairs(mixins) do
|
||||
target[k] = v
|
||||
end
|
||||
for k, v in pairs(pmixins) do
|
||||
target[k] = target[k] or v
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- - Initialize the addon after creation.
|
||||
-- This function is only used internally during the ADDON_LOADED event
|
||||
-- It will call the **OnInitialize** function on the addon object (if present),
|
||||
-- and the **OnEmbedInitialize** function on all embeded libraries.
|
||||
--
|
||||
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
|
||||
-- @param addon addon object to intialize
|
||||
function AceAddon:InitializeAddon(addon)
|
||||
safecall(addon.OnInitialize, addon)
|
||||
|
||||
local embeds = self.embeds[addon]
|
||||
for i = 1, #embeds do
|
||||
local lib = LibStub:GetLibrary(embeds[i], true)
|
||||
if lib then safecall(lib.OnEmbedInitialize, lib, addon) end
|
||||
end
|
||||
|
||||
-- we don't call InitializeAddon on modules specifically, this is handled
|
||||
-- from the event handler and only done _once_
|
||||
end
|
||||
|
||||
-- - Enable the addon after creation.
|
||||
-- Note: This function is only used internally during the PLAYER_LOGIN event, or during ADDON_LOADED,
|
||||
-- if IsLoggedIn() already returns true at that point, e.g. for LoD Addons.
|
||||
-- It will call the **OnEnable** function on the addon object (if present),
|
||||
-- and the **OnEmbedEnable** function on all embeded libraries.\\
|
||||
-- This function does not toggle the enable state of the addon itself, and will return early if the addon is disabled.
|
||||
--
|
||||
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
|
||||
-- Use :Enable on the addon itself instead.
|
||||
-- @param addon addon object to enable
|
||||
function AceAddon:EnableAddon(addon)
|
||||
if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
|
||||
if self.statuses[addon.name] or not addon.enabledState then return false end
|
||||
|
||||
-- set the statuses first, before calling the OnEnable. this allows for Disabling of the addon in OnEnable.
|
||||
self.statuses[addon.name] = true
|
||||
|
||||
safecall(addon.OnEnable, addon)
|
||||
|
||||
-- make sure we're still enabled before continueing
|
||||
if self.statuses[addon.name] then
|
||||
local embeds = self.embeds[addon]
|
||||
for i = 1, #embeds do
|
||||
local lib = LibStub:GetLibrary(embeds[i], true)
|
||||
if lib then safecall(lib.OnEmbedEnable, lib, addon) end
|
||||
end
|
||||
|
||||
-- enable possible modules.
|
||||
for name, module in pairs(addon.modules) do
|
||||
self:EnableAddon(module)
|
||||
end
|
||||
end
|
||||
return self.statuses[addon.name] -- return true if we're disabled
|
||||
end
|
||||
|
||||
-- - Disable the addon
|
||||
-- Note: This function is only used internally.
|
||||
-- It will call the **OnDisable** function on the addon object (if present),
|
||||
-- and the **OnEmbedDisable** function on all embeded libraries.\\
|
||||
-- This function does not toggle the enable state of the addon itself, and will return early if the addon is still enabled.
|
||||
--
|
||||
-- **Note:** Do not call this function manually, unless you're absolutely sure that you know what you are doing.
|
||||
-- Use :Disable on the addon itself instead.
|
||||
-- @param addon addon object to enable
|
||||
function AceAddon:DisableAddon(addon)
|
||||
if type(addon) == "string" then addon = AceAddon:GetAddon(addon) end
|
||||
if not self.statuses[addon.name] then return false end
|
||||
|
||||
-- set statuses first before calling OnDisable, this allows for aborting the disable in OnDisable.
|
||||
self.statuses[addon.name] = false
|
||||
|
||||
safecall( addon.OnDisable, addon )
|
||||
|
||||
-- make sure we're still disabling...
|
||||
if not self.statuses[addon.name] then
|
||||
local embeds = self.embeds[addon]
|
||||
for i = 1, #embeds do
|
||||
local lib = LibStub:GetLibrary(embeds[i], true)
|
||||
if lib then safecall(lib.OnEmbedDisable, lib, addon) end
|
||||
end
|
||||
-- disable possible modules.
|
||||
for name, module in pairs(addon.modules) do
|
||||
self:DisableAddon(module)
|
||||
end
|
||||
end
|
||||
|
||||
return not self.statuses[addon.name] -- return true if we're disabled
|
||||
end
|
||||
|
||||
--- Get an iterator over all registered addons.
|
||||
-- @usage
|
||||
-- -- Print a list of all installed AceAddon's
|
||||
-- for name, addon in AceAddon:IterateAddons() do
|
||||
-- print("Addon: " .. name)
|
||||
-- end
|
||||
function AceAddon:IterateAddons() return pairs(self.addons) end
|
||||
|
||||
--- Get an iterator over the internal status registry.
|
||||
-- @usage
|
||||
-- -- Print a list of all enabled addons
|
||||
-- for name, status in AceAddon:IterateAddonStatus() do
|
||||
-- if status then
|
||||
-- print("EnabledAddon: " .. name)
|
||||
-- end
|
||||
-- end
|
||||
function AceAddon:IterateAddonStatus() return pairs(self.statuses) end
|
||||
|
||||
-- Following Iterators are deprecated, and their addon specific versions should be used
|
||||
-- e.g. addon:IterateEmbeds() instead of :IterateEmbedsOnAddon(addon)
|
||||
function AceAddon:IterateEmbedsOnAddon(addon) return pairs(self.embeds[addon]) end
|
||||
function AceAddon:IterateModulesOfAddon(addon) return pairs(addon.modules) end
|
||||
|
||||
-- Event Handling
|
||||
local function onEvent(this, event, arg1)
|
||||
if event == "ADDON_LOADED" or event == "PLAYER_LOGIN" then
|
||||
-- if a addon loads another addon, recursion could happen here, so we need to validate the table on every iteration
|
||||
while(#AceAddon.initializequeue > 0) do
|
||||
local addon = tremove(AceAddon.initializequeue, 1)
|
||||
-- this might be an issue with recursion - TODO: validate
|
||||
if event == "ADDON_LOADED" then addon.baseName = arg1 end
|
||||
AceAddon:InitializeAddon(addon)
|
||||
tinsert(AceAddon.enablequeue, addon)
|
||||
end
|
||||
|
||||
if IsLoggedIn() then
|
||||
while(#AceAddon.enablequeue > 0) do
|
||||
local addon = tremove(AceAddon.enablequeue, 1)
|
||||
AceAddon:EnableAddon(addon)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
AceAddon.frame:RegisterEvent("ADDON_LOADED")
|
||||
AceAddon.frame:RegisterEvent("PLAYER_LOGIN")
|
||||
AceAddon.frame:SetScript("OnEvent", onEvent)
|
||||
|
||||
-- upgrade embeded
|
||||
for name, addon in pairs(AceAddon.addons) do
|
||||
Embed(addon)
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceAddon-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,57 @@
|
||||
--- AceConfig-3.0 wrapper library.
|
||||
-- Provides an API to register an options table with the config registry,
|
||||
-- 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 $
|
||||
|
||||
--[[
|
||||
AceConfig-3.0
|
||||
|
||||
Very light wrapper library that combines all the AceConfig subcomponents into one more easily used whole.
|
||||
|
||||
]]
|
||||
|
||||
local MAJOR, MINOR = "AceConfig-3.0", 2
|
||||
local AceConfig = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
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)
|
||||
|
||||
-- Lua APIs
|
||||
local pcall, error, type, pairs = pcall, error, type, pairs
|
||||
|
||||
-- -------------------------------------------------------------------
|
||||
-- :RegisterOptionsTable(appName, options, slashcmd, persist)
|
||||
--
|
||||
-- - appName - (string) application name
|
||||
-- - options - table or function ref, see AceConfigRegistry
|
||||
-- - slashcmd - slash command (string) or table with commands, or nil to NOT create a slash command
|
||||
|
||||
--- Register a option table with the AceConfig registry.
|
||||
-- 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 slashcmd A slash command to register for the option table, or a table of slash commands.
|
||||
-- @usage
|
||||
-- local AceConfig = LibStub("AceConfig-3.0")
|
||||
-- AceConfig:RegisterOptionsTable("MyAddon", myOptions, {"/myslash", "/my"})
|
||||
function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
|
||||
local ok,msg = pcall(cfgreg.RegisterOptionsTable, self, appName, options)
|
||||
if not ok then error(msg, 2) end
|
||||
|
||||
if slashcmd then
|
||||
if type(slashcmd) == "table" then
|
||||
for _,cmd in pairs(slashcmd) do
|
||||
cfgcmd:CreateChatCommand(cmd, appName)
|
||||
end
|
||||
else
|
||||
cfgcmd:CreateChatCommand(slashcmd, appName)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,8 @@
|
||||
<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">
|
||||
<Include file="AceConfigRegistry-3.0\AceConfigRegistry-3.0.xml"/>
|
||||
<Include file="AceConfigCmd-3.0\AceConfigCmd-3.0.xml"/>
|
||||
<Include file="AceConfigDialog-3.0\AceConfigDialog-3.0.xml"/>
|
||||
<!--<Include file="AceConfigDropdown-3.0\AceConfigDropdown-3.0.xml"/>-->
|
||||
<Script file="AceConfig-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,787 @@
|
||||
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
|
||||
-- @class file
|
||||
-- @name AceConfigCmd-3.0
|
||||
-- @release $Id: AceConfigCmd-3.0.lua 904 2009-12-13 11:56:37Z nevcairiel $
|
||||
|
||||
--[[
|
||||
AceConfigCmd-3.0
|
||||
|
||||
Handles commandline optionstable access
|
||||
|
||||
REQUIRES: AceConsole-3.0 for command registration (loaded on demand)
|
||||
|
||||
]]
|
||||
|
||||
-- TODO: plugin args
|
||||
|
||||
|
||||
local MAJOR, MINOR = "AceConfigCmd-3.0", 12
|
||||
local AceConfigCmd = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceConfigCmd then return end
|
||||
|
||||
AceConfigCmd.commands = AceConfigCmd.commands or {}
|
||||
local commands = AceConfigCmd.commands
|
||||
|
||||
local cfgreg = LibStub("AceConfigRegistry-3.0")
|
||||
local AceConsole -- LoD
|
||||
local AceConsoleName = "AceConsole-3.0"
|
||||
|
||||
-- Lua APIs
|
||||
local strsub, strsplit, strlower, strmatch, strtrim = string.sub, string.split, string.lower, string.match, string.trim
|
||||
local format, tonumber, tostring = string.format, tonumber, tostring
|
||||
local tsort, tinsert = table.sort, table.insert
|
||||
local select, pairs, next, type = select, pairs, next, type
|
||||
local error, assert = error, assert
|
||||
|
||||
-- WoW APIs
|
||||
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: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME
|
||||
|
||||
|
||||
local L = setmetatable({}, { -- TODO: replace with proper locale
|
||||
__index = function(self,k) return k end
|
||||
})
|
||||
|
||||
|
||||
|
||||
local function print(msg)
|
||||
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
|
||||
end
|
||||
|
||||
-- constants used by getparam() calls below
|
||||
|
||||
local handlertypes = {["table"]=true}
|
||||
local handlermsg = "expected a table"
|
||||
|
||||
local functypes = {["function"]=true, ["string"]=true}
|
||||
local funcmsg = "expected function or member name"
|
||||
|
||||
|
||||
-- pickfirstset() - picks the first non-nil value and returns it
|
||||
|
||||
local function pickfirstset(...)
|
||||
for i=1,select("#",...) do
|
||||
if select(i,...)~=nil then
|
||||
return select(i,...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- err() - produce real error() regarding malformed options tables etc
|
||||
|
||||
local function err(info,inputpos,msg )
|
||||
local cmdstr=" "..strsub(info.input, 1, inputpos-1)
|
||||
error(MAJOR..": /" ..info[0] ..cmdstr ..": "..(msg or "malformed options table"), 2)
|
||||
end
|
||||
|
||||
|
||||
-- usererr() - produce chatframe message regarding bad slash syntax etc
|
||||
|
||||
local function usererr(info,inputpos,msg )
|
||||
local cmdstr=strsub(info.input, 1, inputpos-1);
|
||||
print("/" ..info[0] .. " "..cmdstr ..": "..(msg or "malformed options table"))
|
||||
end
|
||||
|
||||
|
||||
-- callmethod() - call a given named method (e.g. "get", "set") with given arguments
|
||||
|
||||
local function callmethod(info, inputpos, tab, methodtype, ...)
|
||||
local method = info[methodtype]
|
||||
if not method then
|
||||
err(info, inputpos, "'"..methodtype.."': not set")
|
||||
end
|
||||
|
||||
info.arg = tab.arg
|
||||
info.option = tab
|
||||
info.type = tab.type
|
||||
|
||||
if type(method)=="function" then
|
||||
return method(info, ...)
|
||||
elseif type(method)=="string" then
|
||||
if type(info.handler[method])~="function" then
|
||||
err(info, inputpos, "'"..methodtype.."': '"..method.."' is not a member function of "..tostring(info.handler))
|
||||
end
|
||||
return info.handler[method](info.handler, info, ...)
|
||||
else
|
||||
assert(false) -- type should have already been checked on read
|
||||
end
|
||||
end
|
||||
|
||||
-- callfunction() - call a given named function (e.g. "name", "desc") with given arguments
|
||||
|
||||
local function callfunction(info, tab, methodtype, ...)
|
||||
local method = tab[methodtype]
|
||||
|
||||
info.arg = tab.arg
|
||||
info.option = tab
|
||||
info.type = tab.type
|
||||
|
||||
if type(method)=="function" then
|
||||
return method(info, ...)
|
||||
else
|
||||
assert(false) -- type should have already been checked on read
|
||||
end
|
||||
end
|
||||
|
||||
-- do_final() - do the final step (set/execute) along with validation and confirmation
|
||||
|
||||
local function do_final(info, inputpos, tab, methodtype, ...)
|
||||
if info.validate then
|
||||
local res = callmethod(info,inputpos,tab,"validate",...)
|
||||
if type(res)=="string" then
|
||||
usererr(info, inputpos, "'"..strsub(info.input, inputpos).."' - "..res)
|
||||
return
|
||||
end
|
||||
end
|
||||
-- console ignores .confirm
|
||||
|
||||
callmethod(info,inputpos,tab,methodtype, ...)
|
||||
end
|
||||
|
||||
|
||||
-- getparam() - used by handle() to retreive and store "handler", "get", "set", etc
|
||||
|
||||
local function getparam(info, inputpos, tab, depth, paramname, types, errormsg)
|
||||
local old,oldat = info[paramname], info[paramname.."_at"]
|
||||
local val=tab[paramname]
|
||||
if val~=nil then
|
||||
if val==false then
|
||||
val=nil
|
||||
elseif not types[type(val)] then
|
||||
err(info, inputpos, "'" .. paramname.. "' - "..errormsg)
|
||||
end
|
||||
info[paramname] = val
|
||||
info[paramname.."_at"] = depth
|
||||
end
|
||||
return old,oldat
|
||||
end
|
||||
|
||||
|
||||
-- iterateargs(tab) - custom iterator that iterates both t.args and t.plugins.*
|
||||
local dummytable={}
|
||||
|
||||
local function iterateargs(tab)
|
||||
if not tab.plugins then
|
||||
return pairs(tab.args)
|
||||
end
|
||||
|
||||
local argtabkey,argtab=next(tab.plugins)
|
||||
local v
|
||||
|
||||
return function(_, k)
|
||||
while argtab do
|
||||
k,v = next(argtab, k)
|
||||
if k then return k,v end
|
||||
if argtab==tab.args then
|
||||
argtab=nil
|
||||
else
|
||||
argtabkey,argtab = next(tab.plugins, argtabkey)
|
||||
if not argtabkey then
|
||||
argtab=tab.args
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function checkhidden(info, inputpos, tab)
|
||||
if tab.cmdHidden~=nil then
|
||||
return tab.cmdHidden
|
||||
end
|
||||
local hidden = tab.hidden
|
||||
if type(hidden) == "function" or type(hidden) == "string" then
|
||||
info.hidden = hidden
|
||||
hidden = callmethod(info, inputpos, tab, 'hidden')
|
||||
info.hidden = nil
|
||||
end
|
||||
return hidden
|
||||
end
|
||||
|
||||
local function showhelp(info, inputpos, tab, depth, noHead)
|
||||
if not noHead then
|
||||
print("|cff33ff99"..info.appName.."|r: Arguments to |cffffff78/"..info[0].."|r "..strsub(info.input,1,inputpos-1)..":")
|
||||
end
|
||||
|
||||
local sortTbl = {} -- [1..n]=name
|
||||
local refTbl = {} -- [name]=tableref
|
||||
|
||||
for k,v in iterateargs(tab) do
|
||||
if not refTbl[k] then -- a plugin overriding something in .args
|
||||
tinsert(sortTbl, k)
|
||||
refTbl[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
tsort(sortTbl, function(one, two)
|
||||
local o1 = refTbl[one].order or 100
|
||||
local o2 = refTbl[two].order or 100
|
||||
if type(o1) == "function" or type(o1) == "string" then
|
||||
info.order = o1
|
||||
info[#info+1] = one
|
||||
o1 = callmethod(info, inputpos, refTbl[one], "order")
|
||||
info[#info] = nil
|
||||
info.order = nil
|
||||
end
|
||||
if type(o2) == "function" or type(o1) == "string" then
|
||||
info.order = o2
|
||||
info[#info+1] = two
|
||||
o2 = callmethod(info, inputpos, refTbl[two], "order")
|
||||
info[#info] = nil
|
||||
info.order = nil
|
||||
end
|
||||
if o1<0 and o2<0 then return o1<o2 end
|
||||
if o2<0 then return true end
|
||||
if o1<0 then return false end
|
||||
if o1==o2 then return tostring(one)<tostring(two) end -- compare names
|
||||
return o1<o2
|
||||
end)
|
||||
|
||||
for i = 1, #sortTbl do
|
||||
local k = sortTbl[i]
|
||||
local v = refTbl[k]
|
||||
if not checkhidden(info, inputpos, v) then
|
||||
if v.type ~= "description" and v.type ~= "header" then
|
||||
-- recursively show all inline groups
|
||||
local name, desc = v.name, v.desc
|
||||
if type(name) == "function" then
|
||||
name = callfunction(info, v, 'name')
|
||||
end
|
||||
if type(desc) == "function" then
|
||||
desc = callfunction(info, v, 'desc')
|
||||
end
|
||||
if v.type == "group" and pickfirstset(v.cmdInline, v.inline, false) then
|
||||
print(" "..(desc or name)..":")
|
||||
local oldhandler,oldhandler_at = getparam(info, inputpos, v, depth, "handler", handlertypes, handlermsg)
|
||||
showhelp(info, inputpos, v, depth, true)
|
||||
info.handler,info.handler_at = oldhandler,oldhandler_at
|
||||
else
|
||||
local key = k:gsub(" ", "_")
|
||||
print(" |cffffff78"..key.."|r - "..(desc or name or ""))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local function keybindingValidateFunc(text)
|
||||
if text == nil or text == "NONE" then
|
||||
return nil
|
||||
end
|
||||
text = text:upper()
|
||||
local shift, ctrl, alt
|
||||
local modifier
|
||||
while true do
|
||||
if text == "-" then
|
||||
break
|
||||
end
|
||||
modifier, text = strsplit('-', text, 2)
|
||||
if text then
|
||||
if modifier ~= "SHIFT" and modifier ~= "CTRL" and modifier ~= "ALT" then
|
||||
return false
|
||||
end
|
||||
if modifier == "SHIFT" then
|
||||
if shift then
|
||||
return false
|
||||
end
|
||||
shift = true
|
||||
end
|
||||
if modifier == "CTRL" then
|
||||
if ctrl then
|
||||
return false
|
||||
end
|
||||
ctrl = true
|
||||
end
|
||||
if modifier == "ALT" then
|
||||
if alt then
|
||||
return false
|
||||
end
|
||||
alt = true
|
||||
end
|
||||
else
|
||||
text = modifier
|
||||
break
|
||||
end
|
||||
end
|
||||
if text == "" then
|
||||
return false
|
||||
end
|
||||
if not text:find("^F%d+$") and text ~= "CAPSLOCK" and text:len() ~= 1 and (text:byte() < 128 or text:len() > 4) and not _G["KEY_" .. text] then
|
||||
return false
|
||||
end
|
||||
local s = text
|
||||
if shift then
|
||||
s = "SHIFT-" .. s
|
||||
end
|
||||
if ctrl then
|
||||
s = "CTRL-" .. s
|
||||
end
|
||||
if alt then
|
||||
s = "ALT-" .. s
|
||||
end
|
||||
return s
|
||||
end
|
||||
|
||||
-- handle() - selfrecursing function that processes input->optiontable
|
||||
-- - depth - starts at 0
|
||||
-- - retfalse - return false rather than produce error if a match is not found (used by inlined groups)
|
||||
|
||||
local function handle(info, inputpos, tab, depth, retfalse)
|
||||
|
||||
if not(type(tab)=="table" and type(tab.type)=="string") then err(info,inputpos) end
|
||||
|
||||
-------------------------------------------------------------------
|
||||
-- Grab hold of handler,set,get,func,etc if set (and remember old ones)
|
||||
-- Note that we do NOT validate if method names are correct at this stage,
|
||||
-- the handler may change before they're actually used!
|
||||
|
||||
local oldhandler,oldhandler_at = getparam(info,inputpos,tab,depth,"handler",handlertypes,handlermsg)
|
||||
local oldset,oldset_at = getparam(info,inputpos,tab,depth,"set",functypes,funcmsg)
|
||||
local oldget,oldget_at = getparam(info,inputpos,tab,depth,"get",functypes,funcmsg)
|
||||
local oldfunc,oldfunc_at = getparam(info,inputpos,tab,depth,"func",functypes,funcmsg)
|
||||
local oldvalidate,oldvalidate_at = getparam(info,inputpos,tab,depth,"validate",functypes,funcmsg)
|
||||
--local oldconfirm,oldconfirm_at = getparam(info,inputpos,tab,depth,"confirm",functypes,funcmsg)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
-- Act according to .type of this table
|
||||
|
||||
if tab.type=="group" then
|
||||
------------ group --------------------------------------------
|
||||
|
||||
if type(tab.args)~="table" then err(info, inputpos) end
|
||||
if tab.plugins and type(tab.plugins)~="table" then err(info,inputpos) end
|
||||
|
||||
-- grab next arg from input
|
||||
local _,nextpos,arg = (info.input):find(" *([^ ]+) *", inputpos)
|
||||
if not arg then
|
||||
showhelp(info, inputpos, tab, depth)
|
||||
return
|
||||
end
|
||||
nextpos=nextpos+1
|
||||
|
||||
-- loop .args and try to find a key with a matching name
|
||||
for k,v in iterateargs(tab) do
|
||||
if not(type(k)=="string" and type(v)=="table" and type(v.type)=="string") then err(info,inputpos, "options table child '"..tostring(k).."' is malformed") end
|
||||
|
||||
-- is this child an inline group? if so, traverse into it
|
||||
if v.type=="group" and pickfirstset(v.cmdInline, v.inline, false) then
|
||||
info[depth+1] = k
|
||||
if handle(info, inputpos, v, depth+1, true)==false then
|
||||
info[depth+1] = nil
|
||||
-- wasn't found in there, but that's ok, we just keep looking down here
|
||||
else
|
||||
return -- done, name was found in inline group
|
||||
end
|
||||
-- matching name and not a inline group
|
||||
elseif strlower(arg)==strlower(k:gsub(" ", "_")) then
|
||||
info[depth+1] = k
|
||||
return handle(info,nextpos,v,depth+1)
|
||||
end
|
||||
end
|
||||
|
||||
-- no match
|
||||
if retfalse then
|
||||
-- restore old infotable members and return false to indicate failure
|
||||
info.handler,info.handler_at = oldhandler,oldhandler_at
|
||||
info.set,info.set_at = oldset,oldset_at
|
||||
info.get,info.get_at = oldget,oldget_at
|
||||
info.func,info.func_at = oldfunc,oldfunc_at
|
||||
info.validate,info.validate_at = oldvalidate,oldvalidate_at
|
||||
--info.confirm,info.confirm_at = oldconfirm,oldconfirm_at
|
||||
return false
|
||||
end
|
||||
|
||||
-- couldn't find the command, display error
|
||||
usererr(info, inputpos, "'"..arg.."' - " .. L["unknown argument"])
|
||||
return
|
||||
end
|
||||
|
||||
local str = strsub(info.input,inputpos);
|
||||
|
||||
if tab.type=="execute" then
|
||||
------------ execute --------------------------------------------
|
||||
do_final(info, inputpos, tab, "func")
|
||||
|
||||
|
||||
|
||||
elseif tab.type=="input" then
|
||||
------------ input --------------------------------------------
|
||||
|
||||
local res = true
|
||||
if tab.pattern then
|
||||
if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
|
||||
if not strmatch(str, tab.pattern) then
|
||||
usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", str)
|
||||
|
||||
|
||||
|
||||
elseif tab.type=="toggle" then
|
||||
------------ toggle --------------------------------------------
|
||||
local b
|
||||
local str = strtrim(strlower(str))
|
||||
if str=="" then
|
||||
b = callmethod(info, inputpos, tab, "get")
|
||||
|
||||
if tab.tristate then
|
||||
--cycle in true, nil, false order
|
||||
if b then
|
||||
b = nil
|
||||
elseif b == nil then
|
||||
b = false
|
||||
else
|
||||
b = true
|
||||
end
|
||||
else
|
||||
b = not b
|
||||
end
|
||||
|
||||
elseif str==L["on"] then
|
||||
b = true
|
||||
elseif str==L["off"] then
|
||||
b = false
|
||||
elseif tab.tristate and str==L["default"] then
|
||||
b = nil
|
||||
else
|
||||
if tab.tristate then
|
||||
usererr(info, inputpos, format(L["'%s' - expected 'on', 'off' or 'default', or no argument to toggle."], str))
|
||||
else
|
||||
usererr(info, inputpos, format(L["'%s' - expected 'on' or 'off', or no argument to toggle."], str))
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", b)
|
||||
|
||||
|
||||
elseif tab.type=="range" then
|
||||
------------ range --------------------------------------------
|
||||
local val = tonumber(str)
|
||||
if not val then
|
||||
usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
|
||||
return
|
||||
end
|
||||
if type(info.step)=="number" then
|
||||
val = val- (val % info.step)
|
||||
end
|
||||
if type(info.min)=="number" and val<info.min then
|
||||
usererr(info, inputpos, val.." - "..format(L["must be equal to or higher than %s"], tostring(info.min)) )
|
||||
return
|
||||
end
|
||||
if type(info.max)=="number" and val>info.max then
|
||||
usererr(info, inputpos, val.." - "..format(L["must be equal to or lower than %s"], tostring(info.max)) )
|
||||
return
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", val)
|
||||
|
||||
|
||||
elseif tab.type=="select" then
|
||||
------------ select ------------------------------------
|
||||
local str = strtrim(strlower(str))
|
||||
|
||||
local values = tab.values
|
||||
if type(values) == "function" or type(values) == "string" then
|
||||
info.values = values
|
||||
values = callmethod(info, inputpos, tab, "values")
|
||||
info.values = nil
|
||||
end
|
||||
|
||||
if str == "" then
|
||||
local b = callmethod(info, inputpos, tab, "get")
|
||||
local fmt = "|cffffff78- [%s]|r %s"
|
||||
local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
|
||||
print(L["Options for |cffffff78"..info[#info].."|r:"])
|
||||
for k, v in pairs(values) do
|
||||
if b == k then
|
||||
print(fmt_sel:format(k, v))
|
||||
else
|
||||
print(fmt:format(k, v))
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
local ok
|
||||
for k,v in pairs(values) do
|
||||
if strlower(k)==str then
|
||||
str = k -- overwrite with key (in case of case mismatches)
|
||||
ok = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not ok then
|
||||
usererr(info, inputpos, "'"..str.."' - "..L["unknown selection"])
|
||||
return
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", str)
|
||||
|
||||
elseif tab.type=="multiselect" then
|
||||
------------ multiselect -------------------------------------------
|
||||
local str = strtrim(strlower(str))
|
||||
|
||||
local values = tab.values
|
||||
if type(values) == "function" or type(values) == "string" then
|
||||
info.values = values
|
||||
values = callmethod(info, inputpos, tab, "values")
|
||||
info.values = nil
|
||||
end
|
||||
|
||||
if str == "" then
|
||||
local fmt = "|cffffff78- [%s]|r %s"
|
||||
local fmt_sel = "|cffffff78- [%s]|r %s |cffff0000*|r"
|
||||
print(L["Options for |cffffff78"..info[#info].."|r (multiple possible):"])
|
||||
for k, v in pairs(values) do
|
||||
if callmethod(info, inputpos, tab, "get", k) then
|
||||
print(fmt_sel:format(k, v))
|
||||
else
|
||||
print(fmt:format(k, v))
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
|
||||
--build a table of the selections, checking that they exist
|
||||
--parse for =on =off =default in the process
|
||||
--table will be key = true for options that should toggle, key = [on|off|default] for options to be set
|
||||
local sels = {}
|
||||
for v in str:gmatch("[^ ]+") do
|
||||
--parse option=on etc
|
||||
local opt, val = v:match('(.+)=(.+)')
|
||||
--get option if toggling
|
||||
if not opt then
|
||||
opt = v
|
||||
end
|
||||
|
||||
--check that the opt is valid
|
||||
local ok
|
||||
for k,v in pairs(values) do
|
||||
if strlower(k)==opt then
|
||||
opt = k -- overwrite with key (in case of case mismatches)
|
||||
ok = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if not ok then
|
||||
usererr(info, inputpos, "'"..opt.."' - "..L["unknown selection"])
|
||||
return
|
||||
end
|
||||
|
||||
--check that if val was supplied it is valid
|
||||
if val then
|
||||
if val == L["on"] or val == L["off"] or (tab.tristate and val == L["default"]) then
|
||||
--val is valid insert it
|
||||
sels[opt] = val
|
||||
else
|
||||
if tab.tristate then
|
||||
usererr(info, inputpos, format(L["'%s' '%s' - expected 'on', 'off' or 'default', or no argument to toggle."], v, val))
|
||||
else
|
||||
usererr(info, inputpos, format(L["'%s' '%s' - expected 'on' or 'off', or no argument to toggle."], v, val))
|
||||
end
|
||||
return
|
||||
end
|
||||
else
|
||||
-- no val supplied, toggle
|
||||
sels[opt] = true
|
||||
end
|
||||
end
|
||||
|
||||
for opt, val in pairs(sels) do
|
||||
local newval
|
||||
|
||||
if (val == true) then
|
||||
--toggle the option
|
||||
local b = callmethod(info, inputpos, tab, "get", opt)
|
||||
|
||||
if tab.tristate then
|
||||
--cycle in true, nil, false order
|
||||
if b then
|
||||
b = nil
|
||||
elseif b == nil then
|
||||
b = false
|
||||
else
|
||||
b = true
|
||||
end
|
||||
else
|
||||
b = not b
|
||||
end
|
||||
newval = b
|
||||
else
|
||||
--set the option as specified
|
||||
if val==L["on"] then
|
||||
newval = true
|
||||
elseif val==L["off"] then
|
||||
newval = false
|
||||
elseif val==L["default"] then
|
||||
newval = nil
|
||||
end
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", opt, newval)
|
||||
end
|
||||
|
||||
|
||||
elseif tab.type=="color" then
|
||||
------------ color --------------------------------------------
|
||||
local str = strtrim(strlower(str))
|
||||
if str == "" then
|
||||
--TODO: Show current value
|
||||
return
|
||||
end
|
||||
|
||||
local r, g, b, a
|
||||
|
||||
if tab.hasAlpha then
|
||||
if str:len() == 8 and str:find("^%x*$") then
|
||||
--parse a hex string
|
||||
r,g,b,a = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255, tonumber(str:sub(7, 8), 16) / 255
|
||||
else
|
||||
--parse seperate values
|
||||
r,g,b,a = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+) ([%d%.]+)$")
|
||||
r,g,b,a = tonumber(r), tonumber(g), tonumber(b), tonumber(a)
|
||||
end
|
||||
if not (r and g and b and a) then
|
||||
usererr(info, inputpos, format(L["'%s' - expected 'RRGGBBAA' or 'r g b a'."], str))
|
||||
return
|
||||
end
|
||||
|
||||
if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 and a >= 0.0 and a <= 1.0 then
|
||||
--values are valid
|
||||
elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 and a >= 0 and a <= 255 then
|
||||
--values are valid 0..255, convert to 0..1
|
||||
r = r / 255
|
||||
g = g / 255
|
||||
b = b / 255
|
||||
a = a / 255
|
||||
else
|
||||
--values are invalid
|
||||
usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0..1 or 0..255."], str))
|
||||
end
|
||||
else
|
||||
a = 1.0
|
||||
if str:len() == 6 and str:find("^%x*$") then
|
||||
--parse a hex string
|
||||
r,g,b = tonumber(str:sub(1, 2), 16) / 255, tonumber(str:sub(3, 4), 16) / 255, tonumber(str:sub(5, 6), 16) / 255
|
||||
else
|
||||
--parse seperate values
|
||||
r,g,b = str:match("^([%d%.]+) ([%d%.]+) ([%d%.]+)$")
|
||||
r,g,b = tonumber(r), tonumber(g), tonumber(b)
|
||||
end
|
||||
if not (r and g and b) then
|
||||
usererr(info, inputpos, format(L["'%s' - expected 'RRGGBB' or 'r g b'."], str))
|
||||
return
|
||||
end
|
||||
if r >= 0.0 and r <= 1.0 and g >= 0.0 and g <= 1.0 and b >= 0.0 and b <= 1.0 then
|
||||
--values are valid
|
||||
elseif r >= 0 and r <= 255 and g >= 0 and g <= 255 and b >= 0 and b <= 255 then
|
||||
--values are valid 0..255, convert to 0..1
|
||||
r = r / 255
|
||||
g = g / 255
|
||||
b = b / 255
|
||||
else
|
||||
--values are invalid
|
||||
usererr(info, inputpos, format(L["'%s' - values must all be either in the range 0-1 or 0-255."], str))
|
||||
end
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", r,g,b,a)
|
||||
|
||||
elseif tab.type=="keybinding" then
|
||||
------------ keybinding --------------------------------------------
|
||||
local str = strtrim(strlower(str))
|
||||
if str == "" then
|
||||
--TODO: Show current value
|
||||
return
|
||||
end
|
||||
local value = keybindingValidateFunc(str:upper())
|
||||
if value == false then
|
||||
usererr(info, inputpos, format(L["'%s' - Invalid Keybinding."], str))
|
||||
return
|
||||
end
|
||||
|
||||
do_final(info, inputpos, tab, "set", value)
|
||||
|
||||
elseif tab.type=="description" then
|
||||
------------ description --------------------
|
||||
-- ignore description, GUI config only
|
||||
else
|
||||
err(info, inputpos, "unknown options table item type '"..tostring(tab.type).."'")
|
||||
end
|
||||
end
|
||||
|
||||
--- Handle the chat command.
|
||||
-- This is usually called from a chat command handler to parse the command input as operations on an aceoptions table.\\
|
||||
-- AceConfigCmd uses this function internally when a slash command is registered with `:CreateChatCommand`
|
||||
-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
|
||||
-- @param appName The application name as given to `:RegisterOptionsTable()`
|
||||
-- @param input The commandline input (as given by the WoW handler, i.e. without the command itself)
|
||||
-- @usage
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("MyAddon", "AceConsole-3.0")
|
||||
-- -- Use AceConsole-3.0 to register a Chat Command
|
||||
-- MyAddon:RegisterChatCommand("mychat", "ChatCommand")
|
||||
--
|
||||
-- -- Show the GUI if no input is supplied, otherwise handle the chat input.
|
||||
-- function MyAddon:ChatCommand(input)
|
||||
-- -- Assuming "MyOptions" is the appName of a valid options table
|
||||
-- if not input or input:trim() == "" then
|
||||
-- LibStub("AceConfigDialog-3.0"):Open("MyOptions")
|
||||
-- else
|
||||
-- LibStub("AceConfigCmd-3.0").HandleCommand(MyAddon, "mychat", "MyOptions", input)
|
||||
-- end
|
||||
-- end
|
||||
function AceConfigCmd:HandleCommand(slashcmd, appName, input)
|
||||
|
||||
local optgetter = cfgreg:GetOptionsTable(appName)
|
||||
if not optgetter then
|
||||
error([[Usage: HandleCommand("slashcmd", "appName", "input"): 'appName' - no options table "]]..tostring(appName)..[[" has been registered]], 2)
|
||||
end
|
||||
local options = assert( optgetter("cmd", MAJOR) )
|
||||
|
||||
local info = { -- Don't try to recycle this, it gets handed off to callbacks and whatnot
|
||||
[0] = slashcmd,
|
||||
appName = appName,
|
||||
options = options,
|
||||
input = input,
|
||||
self = self,
|
||||
handler = self,
|
||||
uiType = "cmd",
|
||||
uiName = MAJOR,
|
||||
}
|
||||
|
||||
handle(info, 1, options, 0) -- (info, inputpos, table, depth)
|
||||
end
|
||||
|
||||
--- Utility function to create a slash command handler.
|
||||
-- Also registers tab completion with AceTab
|
||||
-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
|
||||
-- @param appName The application name as given to `:RegisterOptionsTable()`
|
||||
function AceConfigCmd:CreateChatCommand(slashcmd, appName)
|
||||
if not AceConsole then
|
||||
AceConsole = LibStub(AceConsoleName)
|
||||
end
|
||||
if AceConsole.RegisterChatCommand(self, slashcmd, function(input)
|
||||
AceConfigCmd.HandleCommand(self, slashcmd, appName, input) -- upgradable
|
||||
end,
|
||||
true) then -- succesfully registered so lets get the command -> app table in
|
||||
commands[slashcmd] = appName
|
||||
end
|
||||
end
|
||||
|
||||
--- Utility function that returns the options table that belongs to a slashcommand.
|
||||
-- Designed to be used for the AceTab interface.
|
||||
-- @param slashcmd The slash command WITHOUT leading slash (only used for error output)
|
||||
-- @return The options table associated with the slash command (or nil if the slash command was not registered)
|
||||
function AceConfigCmd:GetChatCommandOptions(slashcmd)
|
||||
return commands[slashcmd]
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceConfigCmd-3.0.lua"/>
|
||||
</Ui>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,4 @@
|
||||
<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="AceConfigDialog-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,346 @@
|
||||
--- AceConfigRegistry-3.0 handles central registration of options tables in use by addons and modules.\\
|
||||
-- Options tables can be registered as raw tables, OR as function refs that return a table.\\
|
||||
-- Such functions receive three arguments: "uiType", "uiName", "appName". \\
|
||||
-- * Valid **uiTypes**: "cmd", "dropdown", "dialog". This is verified by the library at call time. \\
|
||||
-- * The **uiName** field is expected to contain the full name of the calling addon, including version, e.g. "FooBar-1.0". This is verified by the library at call time.\\
|
||||
-- * The **appName** field is the options table name as given at registration time \\
|
||||
--
|
||||
-- :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
|
||||
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceConfigRegistry then return end
|
||||
|
||||
AceConfigRegistry.tables = AceConfigRegistry.tables or {}
|
||||
|
||||
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
|
||||
|
||||
if not AceConfigRegistry.callbacks then
|
||||
AceConfigRegistry.callbacks = CallbackHandler:New(AceConfigRegistry)
|
||||
end
|
||||
|
||||
-- Lua APIs
|
||||
local tinsert, tconcat = table.insert, table.concat
|
||||
local strfind, strmatch = string.find, string.match
|
||||
local type, tostring, select, pairs = type, tostring, select, pairs
|
||||
local error, assert = error, assert
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
-- Validating options table consistency:
|
||||
|
||||
|
||||
AceConfigRegistry.validated = {
|
||||
-- list of options table names ran through :ValidateOptionsTable automatically.
|
||||
-- CLEARED ON PURPOSE, since newer versions may have newer validators
|
||||
cmd = {},
|
||||
dropdown = {},
|
||||
dialog = {},
|
||||
}
|
||||
|
||||
|
||||
|
||||
local function err(msg, errlvl, ...)
|
||||
local t = {}
|
||||
for i=select("#",...),1,-1 do
|
||||
tinsert(t, (select(i, ...)))
|
||||
end
|
||||
error(MAJOR..":ValidateOptionsTable(): "..tconcat(t,".")..msg, errlvl+2)
|
||||
end
|
||||
|
||||
|
||||
local isstring={["string"]=true, _="string"}
|
||||
local isstringfunc={["string"]=true,["function"]=true, _="string or funcref"}
|
||||
local istable={["table"]=true, _="table"}
|
||||
local ismethodtable={["table"]=true,["string"]=true,["function"]=true, _="methodname, funcref or table"}
|
||||
local optstring={["nil"]=true,["string"]=true, _="string"}
|
||||
local optstringfunc={["nil"]=true,["string"]=true,["function"]=true, _="string or funcref"}
|
||||
local optnumber={["nil"]=true,["number"]=true, _="number"}
|
||||
local optmethod={["nil"]=true,["string"]=true,["function"]=true, _="methodname or funcref"}
|
||||
local optmethodfalse={["nil"]=true,["string"]=true,["function"]=true,["boolean"]={[false]=true}, _="methodname, funcref or false"}
|
||||
local optmethodnumber={["nil"]=true,["string"]=true,["function"]=true,["number"]=true, _="methodname, funcref or number"}
|
||||
local optmethodtable={["nil"]=true,["string"]=true,["function"]=true,["table"]=true, _="methodname, funcref or table"}
|
||||
local optmethodbool={["nil"]=true,["string"]=true,["function"]=true,["boolean"]=true, _="methodname, funcref or boolean"}
|
||||
local opttable={["nil"]=true,["table"]=true, _="table"}
|
||||
local optbool={["nil"]=true,["boolean"]=true, _="boolean"}
|
||||
local optboolnumber={["nil"]=true,["boolean"]=true,["number"]=true, _="boolean or number"}
|
||||
|
||||
local basekeys={
|
||||
type=isstring,
|
||||
name=isstringfunc,
|
||||
desc=optstringfunc,
|
||||
descStyle=optstring,
|
||||
order=optmethodnumber,
|
||||
validate=optmethodfalse,
|
||||
confirm=optmethodbool,
|
||||
confirmText=optstring,
|
||||
disabled=optmethodbool,
|
||||
hidden=optmethodbool,
|
||||
guiHidden=optmethodbool,
|
||||
dialogHidden=optmethodbool,
|
||||
dropdownHidden=optmethodbool,
|
||||
cmdHidden=optmethodbool,
|
||||
icon=optstringfunc,
|
||||
iconCoords=optmethodtable,
|
||||
handler=opttable,
|
||||
get=optmethodfalse,
|
||||
set=optmethodfalse,
|
||||
func=optmethodfalse,
|
||||
arg={["*"]=true},
|
||||
width=optstring,
|
||||
}
|
||||
|
||||
local typedkeys={
|
||||
header={},
|
||||
description={
|
||||
image=optstringfunc,
|
||||
imageCoords=optmethodtable,
|
||||
imageHeight=optnumber,
|
||||
imageWidth=optnumber,
|
||||
fontSize=optstringfunc,
|
||||
},
|
||||
group={
|
||||
args=istable,
|
||||
plugins=opttable,
|
||||
inline=optbool,
|
||||
cmdInline=optbool,
|
||||
guiInline=optbool,
|
||||
dropdownInline=optbool,
|
||||
dialogInline=optbool,
|
||||
childGroups=optstring,
|
||||
},
|
||||
execute={
|
||||
image=optstringfunc,
|
||||
imageCoords=optmethodtable,
|
||||
imageHeight=optnumber,
|
||||
imageWidth=optnumber,
|
||||
},
|
||||
input={
|
||||
pattern=optstring,
|
||||
usage=optstring,
|
||||
control=optstring,
|
||||
dialogControl=optstring,
|
||||
dropdownControl=optstring,
|
||||
multiline=optboolnumber,
|
||||
},
|
||||
toggle={
|
||||
tristate=optbool,
|
||||
image=optstringfunc,
|
||||
imageCoords=optmethodtable,
|
||||
},
|
||||
tristate={
|
||||
},
|
||||
range={
|
||||
min=optnumber,
|
||||
softMin=optnumber,
|
||||
max=optnumber,
|
||||
softMax=optnumber,
|
||||
step=optnumber,
|
||||
bigStep=optnumber,
|
||||
isPercent=optbool,
|
||||
},
|
||||
select={
|
||||
values=ismethodtable,
|
||||
style={
|
||||
["nil"]=true,
|
||||
["string"]={dropdown=true,radio=true},
|
||||
_="string: 'dropdown' or 'radio'"
|
||||
},
|
||||
control=optstring,
|
||||
dialogControl=optstring,
|
||||
dropdownControl=optstring,
|
||||
},
|
||||
multiselect={
|
||||
values=ismethodtable,
|
||||
style=optstring,
|
||||
tristate=optbool,
|
||||
control=optstring,
|
||||
dialogControl=optstring,
|
||||
dropdownControl=optstring,
|
||||
},
|
||||
color={
|
||||
hasAlpha=optbool,
|
||||
},
|
||||
keybinding={
|
||||
-- TODO
|
||||
},
|
||||
}
|
||||
|
||||
local function validateKey(k,errlvl,...)
|
||||
errlvl=(errlvl or 0)+1
|
||||
if type(k)~="string" then
|
||||
err("["..tostring(k).."] - key is not a string", errlvl,...)
|
||||
end
|
||||
if strfind(k, "[%c\127]") then
|
||||
err("["..tostring(k).."] - key name contained control characters", errlvl,...)
|
||||
end
|
||||
end
|
||||
|
||||
local function validateVal(v, oktypes, errlvl,...)
|
||||
errlvl=(errlvl or 0)+1
|
||||
local isok=oktypes[type(v)] or oktypes["*"]
|
||||
|
||||
if not isok then
|
||||
err(": expected a "..oktypes._..", got '"..tostring(v).."'", errlvl,...)
|
||||
end
|
||||
if type(isok)=="table" then -- isok was a table containing specific values to be tested for!
|
||||
if not isok[v] then
|
||||
err(": did not expect "..type(v).." value '"..tostring(v).."'", errlvl,...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function validate(options,errlvl,...)
|
||||
errlvl=(errlvl or 0)+1
|
||||
-- basic consistency
|
||||
if type(options)~="table" then
|
||||
err(": expected a table, got a "..type(options), errlvl,...)
|
||||
end
|
||||
if type(options.type)~="string" then
|
||||
err(".type: expected a string, got a "..type(options.type), errlvl,...)
|
||||
end
|
||||
|
||||
-- get type and 'typedkeys' member
|
||||
local tk = typedkeys[options.type]
|
||||
if not tk then
|
||||
err(".type: unknown type '"..options.type.."'", errlvl,...)
|
||||
end
|
||||
|
||||
-- make sure that all options[] are known parameters
|
||||
for k,v in pairs(options) do
|
||||
if not (tk[k] or basekeys[k]) then
|
||||
err(": unknown parameter", errlvl,tostring(k),...)
|
||||
end
|
||||
end
|
||||
|
||||
-- verify that required params are there, and that everything is the right type
|
||||
for k,oktypes in pairs(basekeys) do
|
||||
validateVal(options[k], oktypes, errlvl,k,...)
|
||||
end
|
||||
for k,oktypes in pairs(tk) do
|
||||
validateVal(options[k], oktypes, errlvl,k,...)
|
||||
end
|
||||
|
||||
-- extra logic for groups
|
||||
if options.type=="group" then
|
||||
for k,v in pairs(options.args) do
|
||||
validateKey(k,errlvl,"args",...)
|
||||
validate(v, errlvl,k,"args",...)
|
||||
end
|
||||
if options.plugins then
|
||||
for plugname,plugin in pairs(options.plugins) do
|
||||
if type(plugin)~="table" then
|
||||
err(": expected a table, got '"..tostring(plugin).."'", errlvl,tostring(plugname),"plugins",...)
|
||||
end
|
||||
for k,v in pairs(plugin) do
|
||||
validateKey(k,errlvl,tostring(plugname),"plugins",...)
|
||||
validate(v, errlvl,k,tostring(plugname),"plugins",...)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Validates basic structure and integrity of an options table \\
|
||||
-- Does NOT verify that get/set etc actually exist, since they can be defined at any depth
|
||||
-- @param options The table to be validated
|
||||
-- @param name The name of the table to be validated (shown in any error message)
|
||||
-- @param errlvl (optional number) error level offset, default 0 (=errors point to the function calling :ValidateOptionsTable)
|
||||
function AceConfigRegistry:ValidateOptionsTable(options,name,errlvl)
|
||||
errlvl=(errlvl or 0)+1
|
||||
name = name or "Optionstable"
|
||||
if not options.name then
|
||||
options.name=name -- bit of a hack, the root level doesn't really need a .name :-/
|
||||
end
|
||||
validate(options,errlvl,name)
|
||||
end
|
||||
|
||||
--- Fires a "ConfigTableChange" callback for those listening in on it, allowing config GUIs to refresh.
|
||||
-- You should call this function if your options table changed from any outside event, like a game event
|
||||
-- or a timer.
|
||||
-- @param appName The application name as given to `:RegisterOptionsTable()`
|
||||
function AceConfigRegistry:NotifyChange(appName)
|
||||
if not AceConfigRegistry.tables[appName] then return end
|
||||
AceConfigRegistry.callbacks:Fire("ConfigTableChange", appName)
|
||||
end
|
||||
|
||||
-- -------------------------------------------------------------------
|
||||
-- Registering and retreiving options tables:
|
||||
|
||||
|
||||
-- validateGetterArgs: helper function for :GetOptionsTable (or, rather, the getter functions returned by it)
|
||||
|
||||
local function validateGetterArgs(uiType, uiName, errlvl)
|
||||
errlvl=(errlvl or 0)+2
|
||||
if uiType~="cmd" and uiType~="dropdown" and uiType~="dialog" then
|
||||
error(MAJOR..": Requesting options table: 'uiType' - invalid configuration UI type, expected 'cmd', 'dropdown' or 'dialog'", errlvl)
|
||||
end
|
||||
if not strmatch(uiName, "[A-Za-z]%-[0-9]") then -- Expecting e.g. "MyLib-1.2"
|
||||
error(MAJOR..": Requesting options table: 'uiName' - badly formatted or missing version number. Expected e.g. 'MyLib-1.2'", errlvl)
|
||||
end
|
||||
end
|
||||
|
||||
--- Register an options table with the config registry.
|
||||
-- @param appName The application name as given to `:RegisterOptionsTable()`
|
||||
-- @param options The options table, OR a function reference that generates it on demand. \\
|
||||
-- See the top of the page for info on arguments passed to such functions.
|
||||
function AceConfigRegistry:RegisterOptionsTable(appName, options)
|
||||
if type(options)=="table" then
|
||||
if options.type~="group" then -- quick sanity checker
|
||||
error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
|
||||
end
|
||||
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
|
||||
errlvl=(errlvl or 0)+1
|
||||
validateGetterArgs(uiType, uiName, errlvl)
|
||||
if not AceConfigRegistry.validated[uiType][appName] then
|
||||
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
|
||||
AceConfigRegistry.validated[uiType][appName] = true
|
||||
end
|
||||
return options
|
||||
end
|
||||
elseif type(options)=="function" then
|
||||
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
|
||||
errlvl=(errlvl or 0)+1
|
||||
validateGetterArgs(uiType, uiName, errlvl)
|
||||
local tab = assert(options(uiType, uiName, appName))
|
||||
if not AceConfigRegistry.validated[uiType][appName] then
|
||||
AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl) -- upgradable
|
||||
AceConfigRegistry.validated[uiType][appName] = true
|
||||
end
|
||||
return tab
|
||||
end
|
||||
else
|
||||
error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - expected table or function reference", 2)
|
||||
end
|
||||
end
|
||||
|
||||
--- Returns an iterator of ["appName"]=funcref pairs
|
||||
function AceConfigRegistry:IterateOptionsTables()
|
||||
return pairs(AceConfigRegistry.tables)
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Query the registry for a specific options table.
|
||||
-- If only appName is given, a function is returned which you
|
||||
-- can call with (uiType,uiName) to get the table.\\
|
||||
-- If uiType&uiName are given, the table is returned.
|
||||
-- @param appName The application name as given to `:RegisterOptionsTable()`
|
||||
-- @param uiType The type of UI to get the table for, one of "cmd", "dropdown", "dialog"
|
||||
-- @param uiName The name of the library/addon querying for the table, e.g. "MyLib-1.0"
|
||||
function AceConfigRegistry:GetOptionsTable(appName, uiType, uiName)
|
||||
local f = AceConfigRegistry.tables[appName]
|
||||
if not f then
|
||||
return nil
|
||||
end
|
||||
|
||||
if uiType then
|
||||
return f(uiType,uiName,1) -- get the table for us
|
||||
else
|
||||
return f -- return the function
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceConfigRegistry-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,250 @@
|
||||
--- **AceConsole-3.0** provides registration facilities for slash commands.
|
||||
-- You can register slash commands to your custom functions and use the `GetArgs` function to parse them
|
||||
-- to your addons individual needs.
|
||||
--
|
||||
-- **AceConsole-3.0** can be embeded into your addon, either explicitly by calling AceConsole:Embed(MyAddon) or by
|
||||
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
|
||||
-- and can be accessed directly, without having to explicitly call AceConsole itself.\\
|
||||
-- It is recommended to embed AceConsole, otherwise you'll have to specify a custom `self` on all calls you
|
||||
-- make into AceConsole.
|
||||
-- @class file
|
||||
-- @name AceConsole-3.0
|
||||
-- @release $Id: AceConsole-3.0.lua 878 2009-11-02 18:51:58Z nevcairiel $
|
||||
local MAJOR,MINOR = "AceConsole-3.0", 7
|
||||
|
||||
local AceConsole, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceConsole then return end -- No upgrade needed
|
||||
|
||||
AceConsole.embeds = AceConsole.embeds or {} -- table containing objects AceConsole is embedded in.
|
||||
AceConsole.commands = AceConsole.commands or {} -- table containing commands registered
|
||||
AceConsole.weakcommands = AceConsole.weakcommands or {} -- table containing self, command => func references for weak commands that don't persist through enable/disable
|
||||
|
||||
-- Lua APIs
|
||||
local tconcat, tostring, select = table.concat, tostring, select
|
||||
local type, pairs, error = type, pairs, error
|
||||
local format, strfind, strsub = string.format, string.find, string.sub
|
||||
local max = math.max
|
||||
|
||||
-- WoW APIs
|
||||
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: DEFAULT_CHAT_FRAME, SlashCmdList, hash_SlashCmdList
|
||||
|
||||
local tmp={}
|
||||
local function Print(self,frame,...)
|
||||
local n=0
|
||||
if self ~= AceConsole then
|
||||
n=n+1
|
||||
tmp[n] = "|cff33ff99"..tostring( self ).."|r:"
|
||||
end
|
||||
for i=1, select("#", ...) do
|
||||
n=n+1
|
||||
tmp[n] = tostring(select(i, ...))
|
||||
end
|
||||
frame:AddMessage( tconcat(tmp," ",1,n) )
|
||||
end
|
||||
|
||||
--- Print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
|
||||
-- @paramsig [chatframe ,] ...
|
||||
-- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
|
||||
-- @param ... List of any values to be printed
|
||||
function AceConsole:Print(...)
|
||||
local frame = ...
|
||||
if type(frame) == "table" and frame.AddMessage then -- Is first argument something with an .AddMessage member?
|
||||
return Print(self, frame, select(2,...))
|
||||
else
|
||||
return Print(self, DEFAULT_CHAT_FRAME, ...)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Formatted (using format()) print to DEFAULT_CHAT_FRAME or given ChatFrame (anything with an .AddMessage function)
|
||||
-- @paramsig [chatframe ,] "format"[, ...]
|
||||
-- @param chatframe Custom ChatFrame to print to (or any frame with an .AddMessage function)
|
||||
-- @param format Format string - same syntax as standard Lua format()
|
||||
-- @param ... Arguments to the format string
|
||||
function AceConsole:Printf(...)
|
||||
local frame = ...
|
||||
if type(frame) == "table" and frame.AddMessage then -- Is first argument something with an .AddMessage member?
|
||||
return Print(self, frame, format(select(2,...)))
|
||||
else
|
||||
return Print(self, DEFAULT_CHAT_FRAME, format(...))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
--- Register a simple chat command
|
||||
-- @param command Chat command to be registered WITHOUT leading "/"
|
||||
-- @param func Function to call when the slash command is being used (funcref or methodname)
|
||||
-- @param persist if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
|
||||
function AceConsole:RegisterChatCommand( command, func, persist )
|
||||
if type(command)~="string" then error([[Usage: AceConsole:RegisterChatCommand( "command", func[, persist ]): 'command' - expected a string]], 2) end
|
||||
|
||||
if persist==nil then persist=true end -- I'd rather have my addon's "/addon enable" around if the author screws up. Having some extra slash regged when it shouldnt be isn't as destructive. True is a better default. /Mikk
|
||||
|
||||
local name = "ACECONSOLE_"..command:upper()
|
||||
|
||||
if type( func ) == "string" then
|
||||
SlashCmdList[name] = function(input, editBox)
|
||||
self[func](self, input, editBox)
|
||||
end
|
||||
else
|
||||
SlashCmdList[name] = func
|
||||
end
|
||||
_G["SLASH_"..name.."1"] = "/"..command:lower()
|
||||
AceConsole.commands[command] = name
|
||||
-- non-persisting commands are registered for enabling disabling
|
||||
if not persist then
|
||||
if not AceConsole.weakcommands[self] then AceConsole.weakcommands[self] = {} end
|
||||
AceConsole.weakcommands[self][command] = func
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
--- Unregister a chatcommand
|
||||
-- @param command Chat command to be unregistered WITHOUT leading "/"
|
||||
function AceConsole:UnregisterChatCommand( command )
|
||||
local name = AceConsole.commands[command]
|
||||
if name then
|
||||
SlashCmdList[name] = nil
|
||||
_G["SLASH_" .. name .. "1"] = nil
|
||||
hash_SlashCmdList["/" .. command:upper()] = nil
|
||||
AceConsole.commands[command] = nil
|
||||
end
|
||||
end
|
||||
|
||||
--- Get an iterator over all Chat Commands registered with AceConsole
|
||||
-- @return Iterator (pairs) over all commands
|
||||
function AceConsole:IterateChatCommands() return pairs(AceConsole.commands) end
|
||||
|
||||
|
||||
local function nils(n, ...)
|
||||
if n>1 then
|
||||
return nil, nils(n-1, ...)
|
||||
elseif n==1 then
|
||||
return nil, ...
|
||||
else
|
||||
return ...
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--- Retreive one or more space-separated arguments from a string.
|
||||
-- Treats quoted strings and itemlinks as non-spaced.
|
||||
-- @param string The raw argument string
|
||||
-- @param numargs How many arguments to get (default 1)
|
||||
-- @param startpos Where in the string to start scanning (default 1)
|
||||
-- @return Returns arg1, arg2, ..., nextposition\\
|
||||
-- Missing arguments will be returned as nils. 'nextposition' is returned as 1e9 at the end of the string.
|
||||
function AceConsole:GetArgs(str, numargs, startpos)
|
||||
numargs = numargs or 1
|
||||
startpos = max(startpos or 1, 1)
|
||||
|
||||
local pos=startpos
|
||||
|
||||
-- find start of new arg
|
||||
pos = strfind(str, "[^ ]", pos)
|
||||
if not pos then -- whoops, end of string
|
||||
return nils(numargs, 1e9)
|
||||
end
|
||||
|
||||
if numargs<1 then
|
||||
return pos
|
||||
end
|
||||
|
||||
-- quoted or space separated? find out which pattern to use
|
||||
local delim_or_pipe
|
||||
local ch = strsub(str, pos, pos)
|
||||
if ch=='"' then
|
||||
pos = pos + 1
|
||||
delim_or_pipe='([|"])'
|
||||
elseif ch=="'" then
|
||||
pos = pos + 1
|
||||
delim_or_pipe="([|'])"
|
||||
else
|
||||
delim_or_pipe="([| ])"
|
||||
end
|
||||
|
||||
startpos = pos
|
||||
|
||||
while true do
|
||||
-- find delimiter or hyperlink
|
||||
local ch,_
|
||||
pos,_,ch = strfind(str, delim_or_pipe, pos)
|
||||
|
||||
if not pos then break end
|
||||
|
||||
if ch=="|" then
|
||||
-- some kind of escape
|
||||
|
||||
if strsub(str,pos,pos+1)=="|H" then
|
||||
-- It's a |H....|hhyper link!|h
|
||||
pos=strfind(str, "|h", pos+2) -- first |h
|
||||
if not pos then break end
|
||||
|
||||
pos=strfind(str, "|h", pos+2) -- second |h
|
||||
if not pos then break end
|
||||
elseif strsub(str,pos, pos+1) == "|T" then
|
||||
-- It's a |T....|t texture
|
||||
pos=strfind(str, "|t", pos+2)
|
||||
if not pos then break end
|
||||
end
|
||||
|
||||
pos=pos+2 -- skip past this escape (last |h if it was a hyperlink)
|
||||
|
||||
else
|
||||
-- found delimiter, done with this arg
|
||||
return strsub(str, startpos, pos-1), AceConsole:GetArgs(str, numargs-1, pos+1)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- search aborted, we hit end of string. return it all as one argument. (yes, even if it's an unterminated quote or hyperlink)
|
||||
return strsub(str, startpos), nils(numargs-1, 1e9)
|
||||
end
|
||||
|
||||
|
||||
--- embedding and embed handling
|
||||
|
||||
local mixins = {
|
||||
"Print",
|
||||
"Printf",
|
||||
"RegisterChatCommand",
|
||||
"UnregisterChatCommand",
|
||||
"GetArgs",
|
||||
}
|
||||
|
||||
-- Embeds AceConsole into the target object making the functions from the mixins list available on target:..
|
||||
-- @param target target object to embed AceBucket in
|
||||
function AceConsole:Embed( target )
|
||||
for k, v in pairs( mixins ) do
|
||||
target[v] = self[v]
|
||||
end
|
||||
self.embeds[target] = true
|
||||
return target
|
||||
end
|
||||
|
||||
function AceConsole:OnEmbedEnable( target )
|
||||
if AceConsole.weakcommands[target] then
|
||||
for command, func in pairs( AceConsole.weakcommands[target] ) do
|
||||
target:RegisterChatCommand( command, func, false, true ) -- nonpersisting and silent registry
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function AceConsole:OnEmbedDisable( target )
|
||||
if AceConsole.weakcommands[target] then
|
||||
for command, func in pairs( AceConsole.weakcommands[target] ) do
|
||||
target:UnregisterChatCommand( command ) -- TODO: this could potentially unregister a command from another application in case of command conflicts. Do we care?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for addon in pairs(AceConsole.embeds) do
|
||||
AceConsole:Embed(addon)
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceConsole-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,728 @@
|
||||
--- **AceDB-3.0** manages the SavedVariables of your addon.
|
||||
-- It offers profile management, smart defaults and namespaces for modules.\\
|
||||
-- Data can be saved in different data-types, depending on its intended usage.
|
||||
-- The most common data-type is the `profile` type, which allows the user to choose
|
||||
-- the active profile, and manage the profiles of all of his characters.\\
|
||||
-- The following data types are available:
|
||||
-- * **char** Character-specific data. Every character has its own database.
|
||||
-- * **realm** Realm-specific data. All of the players characters on the same realm share this database.
|
||||
-- * **class** Class-specific data. All of the players characters of the same class share this database.
|
||||
-- * **race** Race-specific data. All of the players characters of the same race share this database.
|
||||
-- * **faction** Faction-specific data. All of the players characters of the same faction share this database.
|
||||
-- * **factionrealm** Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
|
||||
-- * **global** Global Data. All characters on the same account share this database.
|
||||
-- * **profile** Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
|
||||
--
|
||||
-- Creating a new Database using the `:New` function will return a new DBObject. A database will inherit all functions
|
||||
-- of the DBObjectLib listed here. \\
|
||||
-- If you create a new namespaced child-database (`:RegisterNamespace`), you'll get a DBObject as well, but note
|
||||
-- that the child-databases cannot individually change their profile, and are linked to their parents profile - and because of that,
|
||||
-- the profile related APIs are not available. Only `:RegisterDefaults` and `:ResetProfile` are available on child-databases.
|
||||
--
|
||||
-- For more details on how to use AceDB-3.0, see the [[AceDB-3.0 Tutorial]].
|
||||
--
|
||||
-- You may also be interested in [[libdualspec-1-0|LibDualSpec-1.0]] to do profile switching automatically when switching specs.
|
||||
--
|
||||
-- @usage
|
||||
-- MyAddon = LibStub("AceAddon-3.0"):NewAddon("DBExample")
|
||||
--
|
||||
-- -- declare defaults to be used in the DB
|
||||
-- local defaults = {
|
||||
-- profile = {
|
||||
-- setting = true,
|
||||
-- }
|
||||
-- }
|
||||
--
|
||||
-- function MyAddon:OnInitialize()
|
||||
-- -- Assuming the .toc says ## SavedVariables: MyAddonDB
|
||||
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
|
||||
-- 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
|
||||
local AceDB, oldminor = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
|
||||
|
||||
if not AceDB then return end -- No upgrade needed
|
||||
|
||||
-- Lua APIs
|
||||
local type, pairs, next, error = type, pairs, next, error
|
||||
local setmetatable, getmetatable, rawset, rawget = setmetatable, getmetatable, rawset, rawget
|
||||
|
||||
-- WoW APIs
|
||||
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: LibStub
|
||||
|
||||
AceDB.db_registry = AceDB.db_registry or {}
|
||||
AceDB.frame = AceDB.frame or CreateFrame("Frame")
|
||||
|
||||
local CallbackHandler
|
||||
local CallbackDummy = { Fire = function() end }
|
||||
|
||||
local DBObjectLib = {}
|
||||
|
||||
--[[-------------------------------------------------------------------------
|
||||
AceDB Utility Functions
|
||||
---------------------------------------------------------------------------]]
|
||||
|
||||
-- Simple shallow copy for copying defaults
|
||||
local function copyTable(src, dest)
|
||||
if type(dest) ~= "table" then dest = {} end
|
||||
if type(src) == "table" then
|
||||
for k,v in pairs(src) do
|
||||
if type(v) == "table" then
|
||||
-- try to index the key first so that the metatable creates the defaults, if set, and use that table
|
||||
v = copyTable(v, dest[k])
|
||||
end
|
||||
dest[k] = v
|
||||
end
|
||||
end
|
||||
return dest
|
||||
end
|
||||
|
||||
-- Called to add defaults to a section of the database
|
||||
--
|
||||
-- When a ["*"] default section is indexed with a new key, a table is returned
|
||||
-- and set in the host table. These tables must be cleaned up by removeDefaults
|
||||
-- in order to ensure we don't write empty default tables.
|
||||
local function copyDefaults(dest, src)
|
||||
-- this happens if some value in the SV overwrites our default value with a non-table
|
||||
--if type(dest) ~= "table" then return end
|
||||
for k, v in pairs(src) do
|
||||
if k == "*" or k == "**" then
|
||||
if type(v) == "table" then
|
||||
-- This is a metatable used for table defaults
|
||||
local mt = {
|
||||
-- This handles the lookup and creation of new subtables
|
||||
__index = function(t,k)
|
||||
if k == nil then return nil end
|
||||
local tbl = {}
|
||||
copyDefaults(tbl, v)
|
||||
rawset(t, k, tbl)
|
||||
return tbl
|
||||
end,
|
||||
}
|
||||
setmetatable(dest, mt)
|
||||
-- handle already existing tables in the SV
|
||||
for dk, dv in pairs(dest) do
|
||||
if not rawget(src, dk) and type(dv) == "table" then
|
||||
copyDefaults(dv, v)
|
||||
end
|
||||
end
|
||||
else
|
||||
-- Values are not tables, so this is just a simple return
|
||||
local mt = {__index = function(t,k) return k~=nil and v or nil end}
|
||||
setmetatable(dest, mt)
|
||||
end
|
||||
elseif type(v) == "table" then
|
||||
if not rawget(dest, k) then rawset(dest, k, {}) end
|
||||
if type(dest[k]) == "table" then
|
||||
copyDefaults(dest[k], v)
|
||||
if src['**'] then
|
||||
copyDefaults(dest[k], src['**'])
|
||||
end
|
||||
end
|
||||
else
|
||||
if rawget(dest, k) == nil then
|
||||
rawset(dest, k, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Called to remove all defaults in the default table from the database
|
||||
local function removeDefaults(db, defaults, blocker)
|
||||
-- remove all metatables from the db, so we don't accidentally create new sub-tables through them
|
||||
setmetatable(db, nil)
|
||||
-- loop through the defaults and remove their content
|
||||
for k,v in pairs(defaults) do
|
||||
if k == "*" or k == "**" then
|
||||
if type(v) == "table" then
|
||||
-- Loop through all the actual k,v pairs and remove
|
||||
for key, value in pairs(db) do
|
||||
if type(value) == "table" then
|
||||
-- if the key was not explicitly specified in the defaults table, just strip everything from * and ** tables
|
||||
if defaults[key] == nil and (not blocker or blocker[key] == nil) then
|
||||
removeDefaults(value, v)
|
||||
-- if the table is empty afterwards, remove it
|
||||
if next(value) == nil then
|
||||
db[key] = nil
|
||||
end
|
||||
-- if it was specified, only strip ** content, but block values which were set in the key table
|
||||
elseif k == "**" then
|
||||
removeDefaults(value, v, defaults[key])
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif k == "*" then
|
||||
-- check for non-table default
|
||||
for key, value in pairs(db) do
|
||||
if defaults[key] == nil and v == value then
|
||||
db[key] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif type(v) == "table" and type(db[k]) == "table" then
|
||||
-- if a blocker was set, dive into it, to allow multi-level defaults
|
||||
removeDefaults(db[k], v, blocker and blocker[k])
|
||||
if next(db[k]) == nil then
|
||||
db[k] = nil
|
||||
end
|
||||
else
|
||||
-- check if the current value matches the default, and that its not blocked by another defaults table
|
||||
if db[k] == defaults[k] and (not blocker or blocker[k] == nil) then
|
||||
db[k] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- This is called when a table section is first accessed, to set up the defaults
|
||||
local function initSection(db, section, svstore, key, defaults)
|
||||
local sv = rawget(db, "sv")
|
||||
|
||||
local tableCreated
|
||||
if not sv[svstore] then sv[svstore] = {} end
|
||||
if not sv[svstore][key] then
|
||||
sv[svstore][key] = {}
|
||||
tableCreated = true
|
||||
end
|
||||
|
||||
local tbl = sv[svstore][key]
|
||||
|
||||
if defaults then
|
||||
copyDefaults(tbl, defaults)
|
||||
end
|
||||
rawset(db, section, tbl)
|
||||
|
||||
return tableCreated, tbl
|
||||
end
|
||||
|
||||
-- Metatable to handle the dynamic creation of sections and copying of sections.
|
||||
local dbmt = {
|
||||
__index = function(t, section)
|
||||
local keys = rawget(t, "keys")
|
||||
local key = keys[section]
|
||||
if key then
|
||||
local defaultTbl = rawget(t, "defaults")
|
||||
local defaults = defaultTbl and defaultTbl[section]
|
||||
|
||||
if section == "profile" then
|
||||
local new = initSection(t, section, "profiles", key, defaults)
|
||||
if new then
|
||||
-- Callback: OnNewProfile, database, newProfileKey
|
||||
t.callbacks:Fire("OnNewProfile", t, key)
|
||||
end
|
||||
elseif section == "profiles" then
|
||||
local sv = rawget(t, "sv")
|
||||
if not sv.profiles then sv.profiles = {} end
|
||||
rawset(t, "profiles", sv.profiles)
|
||||
elseif section == "global" then
|
||||
local sv = rawget(t, "sv")
|
||||
if not sv.global then sv.global = {} end
|
||||
if defaults then
|
||||
copyDefaults(sv.global, defaults)
|
||||
end
|
||||
rawset(t, section, sv.global)
|
||||
else
|
||||
initSection(t, section, section, key, defaults)
|
||||
end
|
||||
end
|
||||
|
||||
return rawget(t, section)
|
||||
end
|
||||
}
|
||||
|
||||
local function validateDefaults(defaults, keyTbl, offset)
|
||||
if not defaults then return end
|
||||
offset = offset or 0
|
||||
for k in pairs(defaults) do
|
||||
if not keyTbl[k] or k == "profiles" then
|
||||
error(("Usage: AceDBObject:RegisterDefaults(defaults): '%s' is not a valid datatype."):format(k), 3 + offset)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local preserve_keys = {
|
||||
["callbacks"] = true,
|
||||
["RegisterCallback"] = true,
|
||||
["UnregisterCallback"] = true,
|
||||
["UnregisterAllCallbacks"] = true,
|
||||
["children"] = true,
|
||||
}
|
||||
|
||||
local realmKey = GetRealmName()
|
||||
local charKey = UnitName("player") .. " - " .. realmKey
|
||||
local _, classKey = UnitClass("player")
|
||||
local _, raceKey = UnitRace("player")
|
||||
local factionKey = UnitFactionGroup("player")
|
||||
local factionrealmKey = factionKey .. " - " .. realmKey
|
||||
-- Actual database initialization function
|
||||
local function initdb(sv, defaults, defaultProfile, olddb, parent)
|
||||
-- Generate the database keys for each section
|
||||
|
||||
-- map "true" to our "Default" profile
|
||||
if defaultProfile == true then defaultProfile = "Default" end
|
||||
|
||||
local profileKey
|
||||
if not parent then
|
||||
-- Make a container for profile keys
|
||||
if not sv.profileKeys then sv.profileKeys = {} end
|
||||
|
||||
-- Try to get the profile selected from the char db
|
||||
profileKey = sv.profileKeys[charKey] or defaultProfile or charKey
|
||||
|
||||
-- save the selected profile for later
|
||||
sv.profileKeys[charKey] = profileKey
|
||||
else
|
||||
-- Use the profile of the parents DB
|
||||
profileKey = parent.keys.profile or defaultProfile or charKey
|
||||
|
||||
-- clear the profileKeys in the DB, namespaces don't need to store them
|
||||
sv.profileKeys = nil
|
||||
end
|
||||
|
||||
-- This table contains keys that enable the dynamic creation
|
||||
-- of each section of the table. The 'global' and 'profiles'
|
||||
-- have a key of true, since they are handled in a special case
|
||||
local keyTbl= {
|
||||
["char"] = charKey,
|
||||
["realm"] = realmKey,
|
||||
["class"] = classKey,
|
||||
["race"] = raceKey,
|
||||
["faction"] = factionKey,
|
||||
["factionrealm"] = factionrealmKey,
|
||||
["profile"] = profileKey,
|
||||
["global"] = true,
|
||||
["profiles"] = true,
|
||||
}
|
||||
|
||||
validateDefaults(defaults, keyTbl, 1)
|
||||
|
||||
-- This allows us to use this function to reset an entire database
|
||||
-- Clear out the old database
|
||||
if olddb then
|
||||
for k,v in pairs(olddb) do if not preserve_keys[k] then olddb[k] = nil end end
|
||||
end
|
||||
|
||||
-- Give this database the metatable so it initializes dynamically
|
||||
local db = setmetatable(olddb or {}, dbmt)
|
||||
|
||||
if not rawget(db, "callbacks") then
|
||||
-- try to load CallbackHandler-1.0 if it loaded after our library
|
||||
if not CallbackHandler then CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0", true) end
|
||||
db.callbacks = CallbackHandler and CallbackHandler:New(db) or CallbackDummy
|
||||
end
|
||||
|
||||
-- Copy methods locally into the database object, to avoid hitting
|
||||
-- the metatable when calling methods
|
||||
|
||||
if not parent then
|
||||
for name, func in pairs(DBObjectLib) do
|
||||
db[name] = func
|
||||
end
|
||||
else
|
||||
-- hack this one in
|
||||
db.RegisterDefaults = DBObjectLib.RegisterDefaults
|
||||
db.ResetProfile = DBObjectLib.ResetProfile
|
||||
end
|
||||
|
||||
-- Set some properties in the database object
|
||||
db.profiles = sv.profiles
|
||||
db.keys = keyTbl
|
||||
db.sv = sv
|
||||
--db.sv_name = name
|
||||
db.defaults = defaults
|
||||
db.parent = parent
|
||||
|
||||
-- store the DB in the registry
|
||||
AceDB.db_registry[db] = true
|
||||
|
||||
return db
|
||||
end
|
||||
|
||||
-- handle PLAYER_LOGOUT
|
||||
-- strip all defaults from all databases
|
||||
-- and cleans up empty sections
|
||||
local function logoutHandler(frame, event)
|
||||
if event == "PLAYER_LOGOUT" then
|
||||
for db in pairs(AceDB.db_registry) do
|
||||
db.callbacks:Fire("OnDatabaseShutdown", db)
|
||||
db:RegisterDefaults(nil)
|
||||
|
||||
-- cleanup sections that are empty without defaults
|
||||
local sv = rawget(db, "sv")
|
||||
for section in pairs(db.keys) do
|
||||
if rawget(sv, section) then
|
||||
-- global is special, all other sections have sub-entrys
|
||||
-- also don't delete empty profiles on main dbs, only on namespaces
|
||||
if section ~= "global" and (section ~= "profiles" or rawget(db, "parent")) then
|
||||
for key in pairs(sv[section]) do
|
||||
if not next(sv[section][key]) then
|
||||
sv[section][key] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
if not next(sv[section]) then
|
||||
sv[section] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
AceDB.frame:RegisterEvent("PLAYER_LOGOUT")
|
||||
AceDB.frame:SetScript("OnEvent", logoutHandler)
|
||||
|
||||
|
||||
--[[-------------------------------------------------------------------------
|
||||
AceDB Object Method Definitions
|
||||
---------------------------------------------------------------------------]]
|
||||
|
||||
--- Sets the defaults table for the given database object by clearing any
|
||||
-- that are currently set, and then setting the new defaults.
|
||||
-- @param defaults A table of defaults for this database
|
||||
function DBObjectLib:RegisterDefaults(defaults)
|
||||
if defaults and type(defaults) ~= "table" then
|
||||
error("Usage: AceDBObject:RegisterDefaults(defaults): 'defaults' - table or nil expected.", 2)
|
||||
end
|
||||
|
||||
validateDefaults(defaults, self.keys)
|
||||
|
||||
-- Remove any currently set defaults
|
||||
if self.defaults then
|
||||
for section,key in pairs(self.keys) do
|
||||
if self.defaults[section] and rawget(self, section) then
|
||||
removeDefaults(self[section], self.defaults[section])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Set the DBObject.defaults table
|
||||
self.defaults = defaults
|
||||
|
||||
-- Copy in any defaults, only touching those sections already created
|
||||
if defaults then
|
||||
for section,key in pairs(self.keys) do
|
||||
if defaults[section] and rawget(self, section) then
|
||||
copyDefaults(self[section], defaults[section])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--- Changes the profile of the database and all of it's namespaces to the
|
||||
-- supplied named profile
|
||||
-- @param name The name of the profile to set as the current profile
|
||||
function DBObjectLib:SetProfile(name)
|
||||
if type(name) ~= "string" then
|
||||
error("Usage: AceDBObject:SetProfile(name): 'name' - string expected.", 2)
|
||||
end
|
||||
|
||||
-- changing to the same profile, dont do anything
|
||||
if name == self.keys.profile then return end
|
||||
|
||||
local oldProfile = self.profile
|
||||
local defaults = self.defaults and self.defaults.profile
|
||||
|
||||
-- Callback: OnProfileShutdown, database
|
||||
self.callbacks:Fire("OnProfileShutdown", self)
|
||||
|
||||
if oldProfile and defaults then
|
||||
-- Remove the defaults from the old profile
|
||||
removeDefaults(oldProfile, defaults)
|
||||
end
|
||||
|
||||
self.profile = nil
|
||||
self.keys["profile"] = name
|
||||
|
||||
-- if the storage exists, save the new profile
|
||||
-- this won't exist on namespaces.
|
||||
if self.sv.profileKeys then
|
||||
self.sv.profileKeys[charKey] = name
|
||||
end
|
||||
|
||||
-- populate to child namespaces
|
||||
if self.children then
|
||||
for _, db in pairs(self.children) do
|
||||
DBObjectLib.SetProfile(db, name)
|
||||
end
|
||||
end
|
||||
|
||||
-- Callback: OnProfileChanged, database, newProfileKey
|
||||
self.callbacks:Fire("OnProfileChanged", self, name)
|
||||
end
|
||||
|
||||
--- Returns a table with the names of the existing profiles in the database.
|
||||
-- You can optionally supply a table to re-use for this purpose.
|
||||
-- @param tbl A table to store the profile names in (optional)
|
||||
function DBObjectLib:GetProfiles(tbl)
|
||||
if tbl and type(tbl) ~= "table" then
|
||||
error("Usage: AceDBObject:GetProfiles(tbl): 'tbl' - table or nil expected.", 2)
|
||||
end
|
||||
|
||||
-- Clear the container table
|
||||
if tbl then
|
||||
for k,v in pairs(tbl) do tbl[k] = nil end
|
||||
else
|
||||
tbl = {}
|
||||
end
|
||||
|
||||
local curProfile = self.keys.profile
|
||||
|
||||
local i = 0
|
||||
for profileKey in pairs(self.profiles) do
|
||||
i = i + 1
|
||||
tbl[i] = profileKey
|
||||
if curProfile and profileKey == curProfile then curProfile = nil end
|
||||
end
|
||||
|
||||
-- Add the current profile, if it hasn't been created yet
|
||||
if curProfile then
|
||||
i = i + 1
|
||||
tbl[i] = curProfile
|
||||
end
|
||||
|
||||
return tbl, i
|
||||
end
|
||||
|
||||
--- Returns the current profile name used by the database
|
||||
function DBObjectLib:GetCurrentProfile()
|
||||
return self.keys.profile
|
||||
end
|
||||
|
||||
--- Deletes a named profile. This profile must not be the active profile.
|
||||
-- @param name The name of the profile to be deleted
|
||||
-- @param silent If true, do not raise an error when the profile does not exist
|
||||
function DBObjectLib:DeleteProfile(name, silent)
|
||||
if type(name) ~= "string" then
|
||||
error("Usage: AceDBObject:DeleteProfile(name): 'name' - string expected.", 2)
|
||||
end
|
||||
|
||||
if self.keys.profile == name then
|
||||
error("Cannot delete the active profile in an AceDBObject.", 2)
|
||||
end
|
||||
|
||||
if not rawget(self.profiles, name) and not silent then
|
||||
error("Cannot delete profile '" .. name .. "'. It does not exist.", 2)
|
||||
end
|
||||
|
||||
self.profiles[name] = nil
|
||||
|
||||
-- populate to child namespaces
|
||||
if self.children then
|
||||
for _, db in pairs(self.children) do
|
||||
DBObjectLib.DeleteProfile(db, name, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Callback: OnProfileDeleted, database, profileKey
|
||||
self.callbacks:Fire("OnProfileDeleted", self, name)
|
||||
end
|
||||
|
||||
--- Copies a named profile into the current profile, overwriting any conflicting
|
||||
-- settings.
|
||||
-- @param name The name of the profile to be copied into the current profile
|
||||
-- @param silent If true, do not raise an error when the profile does not exist
|
||||
function DBObjectLib:CopyProfile(name, silent)
|
||||
if type(name) ~= "string" then
|
||||
error("Usage: AceDBObject:CopyProfile(name): 'name' - string expected.", 2)
|
||||
end
|
||||
|
||||
if name == self.keys.profile then
|
||||
error("Cannot have the same source and destination profiles.", 2)
|
||||
end
|
||||
|
||||
if not rawget(self.profiles, name) and not silent then
|
||||
error("Cannot copy profile '" .. name .. "'. It does not exist.", 2)
|
||||
end
|
||||
|
||||
-- Reset the profile before copying
|
||||
DBObjectLib.ResetProfile(self, nil, true)
|
||||
|
||||
local profile = self.profile
|
||||
local source = self.profiles[name]
|
||||
|
||||
copyTable(source, profile)
|
||||
|
||||
-- populate to child namespaces
|
||||
if self.children then
|
||||
for _, db in pairs(self.children) do
|
||||
DBObjectLib.CopyProfile(db, name, true)
|
||||
end
|
||||
end
|
||||
|
||||
-- Callback: OnProfileCopied, database, sourceProfileKey
|
||||
self.callbacks:Fire("OnProfileCopied", self, name)
|
||||
end
|
||||
|
||||
--- Resets the current profile to the default values (if specified).
|
||||
-- @param noChildren if set to true, the reset will not be populated to the child namespaces of this DB object
|
||||
-- @param noCallbacks if set to true, won't fire the OnProfileReset callback
|
||||
function DBObjectLib:ResetProfile(noChildren, noCallbacks)
|
||||
local profile = self.profile
|
||||
|
||||
for k,v in pairs(profile) do
|
||||
profile[k] = nil
|
||||
end
|
||||
|
||||
local defaults = self.defaults and self.defaults.profile
|
||||
if defaults then
|
||||
copyDefaults(profile, defaults)
|
||||
end
|
||||
|
||||
-- populate to child namespaces
|
||||
if self.children and not noChildren then
|
||||
for _, db in pairs(self.children) do
|
||||
DBObjectLib.ResetProfile(db, nil, noCallbacks)
|
||||
end
|
||||
end
|
||||
|
||||
-- Callback: OnProfileReset, database
|
||||
if not noCallbacks then
|
||||
self.callbacks:Fire("OnProfileReset", self)
|
||||
end
|
||||
end
|
||||
|
||||
--- Resets the entire database, using the string defaultProfile as the new default
|
||||
-- profile.
|
||||
-- @param defaultProfile The profile name to use as the default
|
||||
function DBObjectLib:ResetDB(defaultProfile)
|
||||
if defaultProfile and type(defaultProfile) ~= "string" then
|
||||
error("Usage: AceDBObject:ResetDB(defaultProfile): 'defaultProfile' - string or nil expected.", 2)
|
||||
end
|
||||
|
||||
local sv = self.sv
|
||||
for k,v in pairs(sv) do
|
||||
sv[k] = nil
|
||||
end
|
||||
|
||||
local parent = self.parent
|
||||
|
||||
initdb(sv, self.defaults, defaultProfile, self)
|
||||
|
||||
-- fix the child namespaces
|
||||
if self.children then
|
||||
if not sv.namespaces then sv.namespaces = {} end
|
||||
for name, db in pairs(self.children) do
|
||||
if not sv.namespaces[name] then sv.namespaces[name] = {} end
|
||||
initdb(sv.namespaces[name], db.defaults, self.keys.profile, db, self)
|
||||
end
|
||||
end
|
||||
|
||||
-- Callback: OnDatabaseReset, database
|
||||
self.callbacks:Fire("OnDatabaseReset", self)
|
||||
-- Callback: OnProfileChanged, database, profileKey
|
||||
self.callbacks:Fire("OnProfileChanged", self, self.keys["profile"])
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--- Creates a new database namespace, directly tied to the database. This
|
||||
-- is a full scale database in it's own rights other than the fact that
|
||||
-- it cannot control its profile individually
|
||||
-- @param name The name of the new namespace
|
||||
-- @param defaults A table of values to use as defaults
|
||||
function DBObjectLib:RegisterNamespace(name, defaults)
|
||||
if type(name) ~= "string" then
|
||||
error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - string expected.", 2)
|
||||
end
|
||||
if defaults and type(defaults) ~= "table" then
|
||||
error("Usage: AceDBObject:RegisterNamespace(name, defaults): 'defaults' - table or nil expected.", 2)
|
||||
end
|
||||
if self.children and self.children[name] then
|
||||
error ("Usage: AceDBObject:RegisterNamespace(name, defaults): 'name' - a namespace with that name already exists.", 2)
|
||||
end
|
||||
|
||||
local sv = self.sv
|
||||
if not sv.namespaces then sv.namespaces = {} end
|
||||
if not sv.namespaces[name] then
|
||||
sv.namespaces[name] = {}
|
||||
end
|
||||
|
||||
local newDB = initdb(sv.namespaces[name], defaults, self.keys.profile, nil, self)
|
||||
|
||||
if not self.children then self.children = {} end
|
||||
self.children[name] = newDB
|
||||
return newDB
|
||||
end
|
||||
|
||||
--- Returns an already existing namespace from the database object.
|
||||
-- @param name The name of the new namespace
|
||||
-- @param silent if true, the addon is optional, silently return nil if its not found
|
||||
-- @usage
|
||||
-- local namespace = self.db:GetNamespace('namespace')
|
||||
-- @return the namespace object if found
|
||||
function DBObjectLib:GetNamespace(name, silent)
|
||||
if type(name) ~= "string" then
|
||||
error("Usage: AceDBObject:GetNamespace(name): 'name' - string expected.", 2)
|
||||
end
|
||||
if not silent and not (self.children and self.children[name]) then
|
||||
error ("Usage: AceDBObject:GetNamespace(name): 'name' - namespace does not exist.", 2)
|
||||
end
|
||||
if not self.children then self.children = {} end
|
||||
return self.children[name]
|
||||
end
|
||||
|
||||
--[[-------------------------------------------------------------------------
|
||||
AceDB Exposed Methods
|
||||
---------------------------------------------------------------------------]]
|
||||
|
||||
--- Creates a new database object that can be used to handle database settings and profiles.
|
||||
-- By default, an empty DB is created, using a character specific profile.
|
||||
--
|
||||
-- You can override the default profile used by passing any profile name as the third argument,
|
||||
-- or by passing //true// as the third argument to use a globally shared profile called "Default".
|
||||
--
|
||||
-- Note that there is no token replacement in the default profile name, passing a defaultProfile as "char"
|
||||
-- will use a profile named "char", and not a character-specific profile.
|
||||
-- @param tbl The name of variable, or table to use for the database
|
||||
-- @param defaults A table of database defaults
|
||||
-- @param defaultProfile The name of the default profile. If not set, a character specific profile will be used as the default.
|
||||
-- You can also pass //true// to use a shared global profile called "Default".
|
||||
-- @usage
|
||||
-- -- Create an empty DB using a character-specific default profile.
|
||||
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB")
|
||||
-- @usage
|
||||
-- -- Create a DB using defaults and using a shared default profile
|
||||
-- self.db = LibStub("AceDB-3.0"):New("MyAddonDB", defaults, true)
|
||||
function AceDB:New(tbl, defaults, defaultProfile)
|
||||
if type(tbl) == "string" then
|
||||
local name = tbl
|
||||
tbl = _G[name]
|
||||
if not tbl then
|
||||
tbl = {}
|
||||
_G[name] = tbl
|
||||
end
|
||||
end
|
||||
|
||||
if type(tbl) ~= "table" then
|
||||
error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'tbl' - table expected.", 2)
|
||||
end
|
||||
|
||||
if defaults and type(defaults) ~= "table" then
|
||||
error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaults' - table expected.", 2)
|
||||
end
|
||||
|
||||
if defaultProfile and type(defaultProfile) ~= "string" and defaultProfile ~= true then
|
||||
error("Usage: AceDB:New(tbl, defaults, defaultProfile): 'defaultProfile' - string or true expected.", 2)
|
||||
end
|
||||
|
||||
return initdb(tbl, defaults, defaultProfile)
|
||||
end
|
||||
|
||||
-- upgrade existing databases
|
||||
for db in pairs(AceDB.db_registry) do
|
||||
if not db.parent then
|
||||
for name,func in pairs(DBObjectLib) do
|
||||
db[name] = func
|
||||
end
|
||||
else
|
||||
db.RegisterDefaults = DBObjectLib.RegisterDefaults
|
||||
db.ResetProfile = DBObjectLib.ResetProfile
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceDB-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,420 @@
|
||||
--- 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
|
||||
local AceDBOptions, oldminor = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
|
||||
|
||||
if not AceDBOptions then return end -- No upgrade needed
|
||||
|
||||
-- Lua APIs
|
||||
local pairs, next = pairs, next
|
||||
|
||||
-- WoW APIs
|
||||
local UnitClass = UnitClass
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: NORMAL_FONT_COLOR_CODE, FONT_COLOR_CODE_CLOSE
|
||||
|
||||
AceDBOptions.optionTables = AceDBOptions.optionTables or {}
|
||||
AceDBOptions.handlers = AceDBOptions.handlers or {}
|
||||
|
||||
--[[
|
||||
Localization of AceDBOptions-3.0
|
||||
]]
|
||||
|
||||
local L = {
|
||||
default = "Default",
|
||||
intro = "You can change the active database profile, so you can have different settings for every character.",
|
||||
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.",
|
||||
new = "New",
|
||||
new_sub = "Create a new empty profile.",
|
||||
choose = "Existing Profiles",
|
||||
choose_sub = "Select one of your currently available profiles.",
|
||||
copy_desc = "Copy the settings from one existing profile into the currently active profile.",
|
||||
copy = "Copy From",
|
||||
delete_desc = "Delete existing and unused profiles from the database to save space, and cleanup the SavedVariables file.",
|
||||
delete = "Delete a Profile",
|
||||
delete_sub = "Deletes a profile from the database.",
|
||||
delete_confirm = "Are you sure you want to delete the selected profile?",
|
||||
profiles = "Profiles",
|
||||
profiles_sub = "Manage Profiles",
|
||||
current = "Current Profile:",
|
||||
}
|
||||
|
||||
local LOCALE = GetLocale()
|
||||
if LOCALE == "deDE" then
|
||||
L["default"] = "Standard"
|
||||
L["intro"] = "Hier kannst du das aktive Datenbankprofile \195\164ndern, damit du verschiedene Einstellungen f\195\188r jeden Charakter erstellen kannst, wodurch eine sehr flexible Konfiguration m\195\182glich wird."
|
||||
L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zur\195\188ck, f\195\188r den Fall das mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst."
|
||||
L["reset"] = "Profil zur\195\188cksetzen"
|
||||
L["reset_sub"] = "Das aktuelle Profil auf Standard zur\195\188cksetzen."
|
||||
L["choose_desc"] = "Du kannst ein neues Profil erstellen, indem du einen neuen Namen in der Eingabebox 'Neu' eingibst, oder w\195\164hle eines der vorhandenen Profile aus."
|
||||
L["new"] = "Neu"
|
||||
L["new_sub"] = "Ein neues Profil erstellen."
|
||||
L["choose"] = "Vorhandene Profile"
|
||||
L["choose_sub"] = "W\195\164hlt ein bereits vorhandenes Profil aus."
|
||||
L["copy_desc"] = "Kopiere die Einstellungen von einem vorhandenen Profil in das aktive Profil."
|
||||
L["copy"] = "Kopieren von..."
|
||||
L["delete_desc"] = "L\195\182sche vorhandene oder unbenutzte Profile aus der Datenbank um Platz zu sparen und um die SavedVariables Datei 'sauber' zu halten."
|
||||
L["delete"] = "Profil l\195\182schen"
|
||||
L["delete_sub"] = "L\195\182scht ein Profil aus der Datenbank."
|
||||
L["delete_confirm"] = "Willst du das ausgew\195\164hlte Profil wirklich l\195\182schen?"
|
||||
L["profiles"] = "Profile"
|
||||
L["profiles_sub"] = "Profile verwalten"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "frFR" then
|
||||
L["default"] = "D\195\169faut"
|
||||
L["intro"] = "Vous pouvez changer le profil actuel afin d'avoir des param\195\168tres diff\195\169rents pour chaque personnage, permettant ainsi d'avoir une configuration tr\195\168s flexible."
|
||||
L["reset_desc"] = "R\195\169initialise le profil actuel au cas o\195\185 votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
|
||||
L["reset"] = "R\195\169initialiser le profil"
|
||||
L["reset_sub"] = "R\195\169initialise le profil actuel avec les param\195\168tres par d\195\169faut."
|
||||
L["choose_desc"] = "Vous pouvez cr\195\169er un nouveau profil en entrant un nouveau nom dans la bo\195\174te de saisie, ou en choississant un des profils d\195\169j\195\160 existants."
|
||||
L["new"] = "Nouveau"
|
||||
L["new_sub"] = "Cr\195\169\195\169e un nouveau profil vierge."
|
||||
L["choose"] = "Profils existants"
|
||||
L["choose_sub"] = "Permet de choisir un des profils d\195\169j\195\160 disponibles."
|
||||
L["copy_desc"] = "Copie les param\195\168tres d'un profil d\195\169j\195\160 existant dans le profil actuellement actif."
|
||||
L["copy"] = "Copier \195\160 partir de"
|
||||
L["delete_desc"] = "Supprime les profils existants inutilis\195\169s de la base de donn\195\169es afin de gagner de la place et de nettoyer le fichier SavedVariables."
|
||||
L["delete"] = "Supprimer un profil"
|
||||
L["delete_sub"] = "Supprime un profil de la base de donn\195\169es."
|
||||
L["delete_confirm"] = "Etes-vous s\195\187r de vouloir supprimer le profil s\195\169lectionn\195\169 ?"
|
||||
L["profiles"] = "Profils"
|
||||
L["profiles_sub"] = "Gestion des profils"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "koKR" then
|
||||
L["default"] = "기본값"
|
||||
L["intro"] = "모든 캐릭터의 다양한 설정과 사용중인 데이터베이스 프로필, 어느것이던지 매우 다루기 쉽게 바꿀수 있습니다."
|
||||
L["reset_desc"] = "단순히 다시 새롭게 구성을 원하는 경우, 현재 프로필을 기본값으로 초기화 합니다."
|
||||
L["reset"] = "프로필 초기화"
|
||||
L["reset_sub"] = "현재의 프로필을 기본값으로 초기화 합니다"
|
||||
L["choose_desc"] = "새로운 이름을 입력하거나, 이미 있는 프로필중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
|
||||
L["new"] = "새로운 프로필"
|
||||
L["new_sub"] = "새로운 프로필을 만듭니다."
|
||||
L["choose"] = "프로필 선택"
|
||||
L["choose_sub"] = "당신이 현재 이용할수 있는 프로필을 선택합니다."
|
||||
L["copy_desc"] = "현재 사용중인 프로필에, 선택한 프로필의 설정을 복사합니다."
|
||||
L["copy"] = "복사"
|
||||
L["delete_desc"] = "데이터베이스에 사용중이거나 저장된 프로파일 삭제로 SavedVariables 파일의 정리와 공간 절약이 됩니다."
|
||||
L["delete"] = "프로필 삭제"
|
||||
L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
|
||||
L["delete_confirm"] = "정말로 선택한 프로필의 삭제를 원하십니까?"
|
||||
L["profiles"] = "프로필"
|
||||
L["profiles_sub"] = "프로필 설정"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "esES" or LOCALE == "esMX" then
|
||||
L["default"] = "Por defecto"
|
||||
L["intro"] = "Puedes cambiar el perfil activo de tal manera que cada personaje tenga diferentes configuraciones."
|
||||
L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo."
|
||||
L["reset"] = "Reiniciar Perfil"
|
||||
L["reset_sub"] = "Reinicar el perfil actual al de por defecto"
|
||||
L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
|
||||
L["new"] = "Nuevo"
|
||||
L["new_sub"] = "Crear un nuevo perfil vacio."
|
||||
L["choose"] = "Perfiles existentes"
|
||||
L["choose_sub"] = "Selecciona uno de los perfiles disponibles."
|
||||
L["copy_desc"] = "Copia los ajustes de un perfil existente al perfil actual."
|
||||
L["copy"] = "Copiar de"
|
||||
L["delete_desc"] = "Borra los perfiles existentes y sin uso de la base de datos para ganar espacio y limpiar el archivo SavedVariables."
|
||||
L["delete"] = "Borrar un Perfil"
|
||||
L["delete_sub"] = "Borra un perfil de la base de datos."
|
||||
L["delete_confirm"] = "¿Estas seguro que quieres borrar el perfil seleccionado?"
|
||||
L["profiles"] = "Perfiles"
|
||||
L["profiles_sub"] = "Manejar Perfiles"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "zhTW" then
|
||||
L["default"] = "預設"
|
||||
L["intro"] = "你可以選擇一個活動的資料設定檔,這樣你的每個角色就可以擁有不同的設定值,可以給你的插件設定帶來極大的靈活性。"
|
||||
L["reset_desc"] = "將當前的設定檔恢復到它的預設值,用於你的設定檔損壞,或者你只是想重來的情況。"
|
||||
L["reset"] = "重置設定檔"
|
||||
L["reset_sub"] = "將當前的設定檔恢復為預設值"
|
||||
L["choose_desc"] = "你可以通過在文本框內輸入一個名字創立一個新的設定檔,也可以選擇一個已經存在的設定檔。"
|
||||
L["new"] = "新建"
|
||||
L["new_sub"] = "新建一個空的設定檔。"
|
||||
L["choose"] = "現有的設定檔"
|
||||
L["choose_sub"] = "從當前可用的設定檔裏面選擇一個。"
|
||||
L["copy_desc"] = "從當前某個已保存的設定檔複製到當前正使用的設定檔。"
|
||||
L["copy"] = "複製自"
|
||||
L["delete_desc"] = "從資料庫裏刪除不再使用的設定檔,以節省空間,並且清理SavedVariables檔。"
|
||||
L["delete"] = "刪除一個設定檔"
|
||||
L["delete_sub"] = "從資料庫裏刪除一個設定檔。"
|
||||
L["delete_confirm"] = "你確定要刪除所選擇的設定檔嗎?"
|
||||
L["profiles"] = "設定檔"
|
||||
L["profiles_sub"] = "管理設定檔"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "zhCN" then
|
||||
L["default"] = "默认"
|
||||
L["intro"] = "你可以选择一个活动的数据配置文件,这样你的每个角色就可以拥有不同的设置值,可以给你的插件配置带来极大的灵活性。"
|
||||
L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。"
|
||||
L["reset"] = "重置配置文件"
|
||||
L["reset_sub"] = "将当前的配置文件恢复为默认值"
|
||||
L["choose_desc"] = "你可以通过在文本框内输入一个名字创立一个新的配置文件,也可以选择一个已经存在的配置文件。"
|
||||
L["new"] = "新建"
|
||||
L["new_sub"] = "新建一个空的配置文件。"
|
||||
L["choose"] = "现有的配置文件"
|
||||
L["choose_sub"] = "从当前可用的配置文件里面选择一个。"
|
||||
L["copy_desc"] = "从当前某个已保存的配置文件复制到当前正使用的配置文件。"
|
||||
L["copy"] = "复制自"
|
||||
L["delete_desc"] = "从数据库里删除不再使用的配置文件,以节省空间,并且清理SavedVariables文件。"
|
||||
L["delete"] = "删除一个配置文件"
|
||||
L["delete_sub"] = "从数据库里删除一个配置文件。"
|
||||
L["delete_confirm"] = "你确定要删除所选择的配置文件么?"
|
||||
L["profiles"] = "配置文件"
|
||||
L["profiles_sub"] = "管理配置文件"
|
||||
--L["current"] = "Current Profile:"
|
||||
elseif LOCALE == "ruRU" then
|
||||
L["default"] = "По умолчанию"
|
||||
L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
|
||||
L["reset_desc"] = "Если ваша конфигурации испорчена или если вы хотите настроить всё заново - сбросьте текущий профиль на стандартные значения."
|
||||
L["reset"] = "Сброс профиля"
|
||||
L["reset_sub"] = "Сброс текущего профиля на стандартный"
|
||||
L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
|
||||
L["new"] = "Новый"
|
||||
L["new_sub"] = "Создать новый чистый профиль"
|
||||
L["choose"] = "Существующие профили"
|
||||
L["choose_sub"] = "Выбор одиного из уже доступных профилей"
|
||||
L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
|
||||
L["copy"] = "Скопировать из"
|
||||
L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
|
||||
L["delete"] = "Удалить профиль"
|
||||
L["delete_sub"] = "Удаление профиля из БД"
|
||||
L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
|
||||
L["profiles"] = "Профили"
|
||||
L["profiles_sub"] = "Управление профилями"
|
||||
--L["current"] = "Current Profile:"
|
||||
end
|
||||
|
||||
local defaultProfiles
|
||||
local tmpprofiles = {}
|
||||
|
||||
-- Get a list of available profiles for the specified database.
|
||||
-- You can specify which profiles to include/exclude in the list using the two boolean parameters listed below.
|
||||
-- @param db The db object to retrieve the profiles from
|
||||
-- @param common If true, getProfileList will add the default profiles to the return list, even if they have not been created yet
|
||||
-- @param nocurrent If true, then getProfileList will not display the current profile in the list
|
||||
-- @return Hashtable of all profiles with the internal name as keys and the display name as value.
|
||||
local function getProfileList(db, common, nocurrent)
|
||||
local profiles = {}
|
||||
|
||||
-- copy existing profiles into the table
|
||||
local currentProfile = db:GetCurrentProfile()
|
||||
for i,v in pairs(db:GetProfiles(tmpprofiles)) do
|
||||
if not (nocurrent and v == currentProfile) then
|
||||
profiles[v] = v
|
||||
end
|
||||
end
|
||||
|
||||
-- add our default profiles to choose from ( or rename existing profiles)
|
||||
for k,v in pairs(defaultProfiles) do
|
||||
if (common or profiles[k]) and not (nocurrent and k == currentProfile) then
|
||||
profiles[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
return profiles
|
||||
end
|
||||
|
||||
--[[
|
||||
OptionsHandlerPrototype
|
||||
prototype class for handling the options in a sane way
|
||||
]]
|
||||
local OptionsHandlerPrototype = {}
|
||||
|
||||
--[[ Reset the profile ]]
|
||||
function OptionsHandlerPrototype:Reset()
|
||||
self.db:ResetProfile()
|
||||
end
|
||||
|
||||
--[[ Set the profile to value ]]
|
||||
function OptionsHandlerPrototype:SetProfile(info, value)
|
||||
self.db:SetProfile(value)
|
||||
end
|
||||
|
||||
--[[ returns the currently active profile ]]
|
||||
function OptionsHandlerPrototype:GetCurrentProfile()
|
||||
return self.db:GetCurrentProfile()
|
||||
end
|
||||
|
||||
--[[
|
||||
List all active profiles
|
||||
you can control the output with the .arg variable
|
||||
currently four modes are supported
|
||||
|
||||
(empty) - return all available profiles
|
||||
"nocurrent" - returns all available profiles except the currently active profile
|
||||
"common" - returns all avaialble profiles + some commonly used profiles ("char - realm", "realm", "class", "Default")
|
||||
"both" - common except the active profile
|
||||
]]
|
||||
function OptionsHandlerPrototype:ListProfiles(info)
|
||||
local arg = info.arg
|
||||
local profiles
|
||||
if arg == "common" and not self.noDefaultProfiles then
|
||||
profiles = getProfileList(self.db, true, nil)
|
||||
elseif arg == "nocurrent" then
|
||||
profiles = getProfileList(self.db, nil, true)
|
||||
elseif arg == "both" then -- currently not used
|
||||
profiles = getProfileList(self.db, (not self.noDefaultProfiles) and true, true)
|
||||
else
|
||||
profiles = getProfileList(self.db)
|
||||
end
|
||||
|
||||
return profiles
|
||||
end
|
||||
|
||||
function OptionsHandlerPrototype:HasNoProfiles(info)
|
||||
local profiles = self:ListProfiles(info)
|
||||
return ((not next(profiles)) and true or false)
|
||||
end
|
||||
|
||||
--[[ Copy a profile ]]
|
||||
function OptionsHandlerPrototype:CopyProfile(info, value)
|
||||
self.db:CopyProfile(value)
|
||||
end
|
||||
|
||||
--[[ Delete a profile from the db ]]
|
||||
function OptionsHandlerPrototype:DeleteProfile(info, value)
|
||||
self.db:DeleteProfile(value)
|
||||
end
|
||||
|
||||
--[[ fill defaultProfiles with some generic values ]]
|
||||
local function generateDefaultProfiles(db)
|
||||
defaultProfiles = {
|
||||
["Default"] = L["default"],
|
||||
[db.keys.char] = db.keys.char,
|
||||
[db.keys.realm] = db.keys.realm,
|
||||
[db.keys.class] = UnitClass("player")
|
||||
}
|
||||
end
|
||||
|
||||
--[[ create and return a handler object for the db, or upgrade it if it already existed ]]
|
||||
local function getOptionsHandler(db, noDefaultProfiles)
|
||||
if not defaultProfiles then
|
||||
generateDefaultProfiles(db)
|
||||
end
|
||||
|
||||
local handler = AceDBOptions.handlers[db] or { db = db, noDefaultProfiles = noDefaultProfiles }
|
||||
|
||||
for k,v in pairs(OptionsHandlerPrototype) do
|
||||
handler[k] = v
|
||||
end
|
||||
|
||||
AceDBOptions.handlers[db] = handler
|
||||
return handler
|
||||
end
|
||||
|
||||
--[[
|
||||
the real options table
|
||||
]]
|
||||
local optionsTable = {
|
||||
desc = {
|
||||
order = 1,
|
||||
type = "description",
|
||||
name = L["intro"] .. "\n",
|
||||
},
|
||||
descreset = {
|
||||
order = 9,
|
||||
type = "description",
|
||||
name = L["reset_desc"],
|
||||
},
|
||||
reset = {
|
||||
order = 10,
|
||||
type = "execute",
|
||||
name = L["reset"],
|
||||
desc = L["reset_sub"],
|
||||
func = "Reset",
|
||||
},
|
||||
current = {
|
||||
order = 11,
|
||||
type = "description",
|
||||
name = function(info) return L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. info.handler:GetCurrentProfile() .. FONT_COLOR_CODE_CLOSE end,
|
||||
width = "default",
|
||||
},
|
||||
choosedesc = {
|
||||
order = 20,
|
||||
type = "description",
|
||||
name = "\n" .. L["choose_desc"],
|
||||
},
|
||||
new = {
|
||||
name = L["new"],
|
||||
desc = L["new_sub"],
|
||||
type = "input",
|
||||
order = 30,
|
||||
get = false,
|
||||
set = "SetProfile",
|
||||
},
|
||||
choose = {
|
||||
name = L["choose"],
|
||||
desc = L["choose_sub"],
|
||||
type = "select",
|
||||
order = 40,
|
||||
get = "GetCurrentProfile",
|
||||
set = "SetProfile",
|
||||
values = "ListProfiles",
|
||||
arg = "common",
|
||||
},
|
||||
copydesc = {
|
||||
order = 50,
|
||||
type = "description",
|
||||
name = "\n" .. L["copy_desc"],
|
||||
},
|
||||
copyfrom = {
|
||||
order = 60,
|
||||
type = "select",
|
||||
name = L["copy"],
|
||||
desc = L["copy_desc"],
|
||||
get = false,
|
||||
set = "CopyProfile",
|
||||
values = "ListProfiles",
|
||||
disabled = "HasNoProfiles",
|
||||
arg = "nocurrent",
|
||||
},
|
||||
deldesc = {
|
||||
order = 70,
|
||||
type = "description",
|
||||
name = "\n" .. L["delete_desc"],
|
||||
},
|
||||
delete = {
|
||||
order = 80,
|
||||
type = "select",
|
||||
name = L["delete"],
|
||||
desc = L["delete_sub"],
|
||||
get = false,
|
||||
set = "DeleteProfile",
|
||||
values = "ListProfiles",
|
||||
disabled = "HasNoProfiles",
|
||||
arg = "nocurrent",
|
||||
confirm = true,
|
||||
confirmText = L["delete_confirm"],
|
||||
},
|
||||
}
|
||||
|
||||
--- Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
|
||||
-- @param db The database object to create the options table for.
|
||||
-- @return The options table to be used in AceConfig-3.0
|
||||
-- @usage
|
||||
-- -- Assuming `options` is your top-level options table and `self.db` is your database:
|
||||
-- options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)
|
||||
function AceDBOptions:GetOptionsTable(db, noDefaultProfiles)
|
||||
local tbl = AceDBOptions.optionTables[db] or {
|
||||
type = "group",
|
||||
name = L["profiles"],
|
||||
desc = L["profiles_sub"],
|
||||
}
|
||||
|
||||
tbl.handler = getOptionsHandler(db, noDefaultProfiles)
|
||||
tbl.args = optionsTable
|
||||
|
||||
AceDBOptions.optionTables[db] = tbl
|
||||
return tbl
|
||||
end
|
||||
|
||||
-- upgrade existing tables
|
||||
for db,tbl in pairs(AceDBOptions.optionTables) do
|
||||
tbl.handler = getOptionsHandler(db)
|
||||
tbl.args = optionsTable
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceDBOptions-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,126 @@
|
||||
--- AceEvent-3.0 provides event registration and secure dispatching.
|
||||
-- All dispatching is done using **CallbackHandler-1.0**. AceEvent is a simple wrapper around
|
||||
-- CallbackHandler, and dispatches all game events or addon message to the registrees.
|
||||
--
|
||||
-- **AceEvent-3.0** can be embeded into your addon, either explicitly by calling AceEvent:Embed(MyAddon) or by
|
||||
-- specifying it as an embeded library in your AceAddon. All functions will be available on your addon object
|
||||
-- and can be accessed directly, without having to explicitly call AceEvent itself.\\
|
||||
-- It is recommended to embed AceEvent, otherwise you'll have to specify a custom `self` on all calls you
|
||||
-- make into AceEvent.
|
||||
-- @class file
|
||||
-- @name AceEvent-3.0
|
||||
-- @release $Id: AceEvent-3.0.lua 877 2009-11-02 15:56:50Z nevcairiel $
|
||||
local MAJOR, MINOR = "AceEvent-3.0", 3
|
||||
local AceEvent = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceEvent then return end
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
local CallbackHandler = LibStub:GetLibrary("CallbackHandler-1.0")
|
||||
|
||||
AceEvent.frame = AceEvent.frame or CreateFrame("Frame", "AceEvent30Frame") -- our event frame
|
||||
AceEvent.embeds = AceEvent.embeds or {} -- what objects embed this lib
|
||||
|
||||
-- APIs and registry for blizzard events, using CallbackHandler lib
|
||||
if not AceEvent.events then
|
||||
AceEvent.events = CallbackHandler:New(AceEvent,
|
||||
"RegisterEvent", "UnregisterEvent", "UnregisterAllEvents")
|
||||
end
|
||||
|
||||
function AceEvent.events:OnUsed(target, eventname)
|
||||
AceEvent.frame:RegisterEvent(eventname)
|
||||
end
|
||||
|
||||
function AceEvent.events:OnUnused(target, eventname)
|
||||
AceEvent.frame:UnregisterEvent(eventname)
|
||||
end
|
||||
|
||||
|
||||
-- APIs and registry for IPC messages, using CallbackHandler lib
|
||||
if not AceEvent.messages then
|
||||
AceEvent.messages = CallbackHandler:New(AceEvent,
|
||||
"RegisterMessage", "UnregisterMessage", "UnregisterAllMessages"
|
||||
)
|
||||
AceEvent.SendMessage = AceEvent.messages.Fire
|
||||
end
|
||||
|
||||
--- embedding and embed handling
|
||||
local mixins = {
|
||||
"RegisterEvent", "UnregisterEvent",
|
||||
"RegisterMessage", "UnregisterMessage",
|
||||
"SendMessage",
|
||||
"UnregisterAllEvents", "UnregisterAllMessages",
|
||||
}
|
||||
|
||||
--- Register for a Blizzard Event.
|
||||
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
|
||||
-- Any arguments to the event will be passed on after that.
|
||||
-- @name AceEvent:RegisterEvent
|
||||
-- @class function
|
||||
-- @paramsig event[, callback [, arg]]
|
||||
-- @param event The event to register for
|
||||
-- @param callback The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
|
||||
-- @param arg An optional argument to pass to the callback function
|
||||
|
||||
--- Unregister an event.
|
||||
-- @name AceEvent:UnregisterEvent
|
||||
-- @class function
|
||||
-- @paramsig event
|
||||
-- @param event The event to unregister
|
||||
|
||||
--- Register for a custom AceEvent-internal message.
|
||||
-- The callback will always be called with the event as the first argument, and if supplied, the `arg` as second argument.
|
||||
-- Any arguments to the event will be passed on after that.
|
||||
-- @name AceEvent:RegisterMessage
|
||||
-- @class function
|
||||
-- @paramsig message[, callback [, arg]]
|
||||
-- @param message The message to register for
|
||||
-- @param callback The callback function to call when the message is triggered (funcref or method, defaults to a method with the event name)
|
||||
-- @param arg An optional argument to pass to the callback function
|
||||
|
||||
--- Unregister a message
|
||||
-- @name AceEvent:UnregisterMessage
|
||||
-- @class function
|
||||
-- @paramsig message
|
||||
-- @param message The message to unregister
|
||||
|
||||
--- Send a message over the AceEvent-3.0 internal message system to other addons registered for this message.
|
||||
-- @name AceEvent:SendMessage
|
||||
-- @class function
|
||||
-- @paramsig message, ...
|
||||
-- @param message The message to send
|
||||
-- @param ... Any arguments to the message
|
||||
|
||||
|
||||
-- Embeds AceEvent into the target object making the functions from the mixins list available on target:..
|
||||
-- @param target target object to embed AceEvent in
|
||||
function AceEvent:Embed(target)
|
||||
for k, v in pairs(mixins) do
|
||||
target[v] = self[v]
|
||||
end
|
||||
self.embeds[target] = true
|
||||
return target
|
||||
end
|
||||
|
||||
-- AceEvent:OnEmbedDisable( target )
|
||||
-- target (object) - target object that is being disabled
|
||||
--
|
||||
-- Unregister all events messages etc when the target disables.
|
||||
-- this method should be called by the target manually or by an addon framework
|
||||
function AceEvent:OnEmbedDisable(target)
|
||||
target:UnregisterAllEvents()
|
||||
target:UnregisterAllMessages()
|
||||
end
|
||||
|
||||
-- Script to fire blizzard events into the event listeners
|
||||
local events = AceEvent.events
|
||||
AceEvent.frame:SetScript("OnEvent", function(this, event, ...)
|
||||
events:Fire(event, ...)
|
||||
end)
|
||||
|
||||
--- Finally: upgrade our old embeds
|
||||
for target, v in pairs(AceEvent.embeds) do
|
||||
AceEvent:Embed(target)
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceEvent-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,805 @@
|
||||
--- **AceGUI-3.0** provides access to numerous widgets which can be used to create GUIs.
|
||||
-- AceGUI is used by AceConfigDialog to create the option GUIs, but you can use it by itself
|
||||
-- to create any custom GUI. There are more extensive examples in the test suite in the Ace3
|
||||
-- stand-alone distribution.
|
||||
--
|
||||
-- **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
|
||||
-- implement a proper API to modify it.
|
||||
-- @usage
|
||||
-- local AceGUI = LibStub("AceGUI-3.0")
|
||||
-- -- Create a container frame
|
||||
-- local f = AceGUI:Create("Frame")
|
||||
-- f:SetCallback("OnClose",function(widget) AceGUI:Release(widget) end)
|
||||
-- f:SetTitle("AceGUI-3.0 Example")
|
||||
-- f:SetStatusText("Status Bar")
|
||||
-- f:SetLayout("Flow")
|
||||
-- -- Create a button
|
||||
-- local btn = AceGUI:Create("Button")
|
||||
-- btn:SetWidth(170)
|
||||
-- btn:SetText("Button !")
|
||||
-- btn:SetCallback("OnClick", function() print("Click!") end)
|
||||
-- -- Add the button to the container
|
||||
-- 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
|
||||
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
|
||||
|
||||
if not AceGUI then return end -- No upgrade needed
|
||||
|
||||
-- Lua APIs
|
||||
local tconcat, tremove, tinsert = table.concat, table.remove, table.insert
|
||||
local select, pairs, next, type = select, pairs, next, type
|
||||
local error, assert, loadstring = error, assert, loadstring
|
||||
local setmetatable, rawget, rawset = setmetatable, rawget, rawset
|
||||
local math_max = math.max
|
||||
|
||||
-- WoW APIs
|
||||
local UIParent = 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: geterrorhandler, LibStub
|
||||
|
||||
--local con = LibStub("AceConsole-3.0",true)
|
||||
|
||||
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
|
||||
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
|
||||
AceGUI.WidgetBase = AceGUI.WidgetBase or {}
|
||||
AceGUI.WidgetContainerBase = AceGUI.WidgetContainerBase or {}
|
||||
AceGUI.WidgetVersions = AceGUI.WidgetVersions or {}
|
||||
|
||||
-- local upvalues
|
||||
local WidgetRegistry = AceGUI.WidgetRegistry
|
||||
local LayoutRegistry = AceGUI.LayoutRegistry
|
||||
local WidgetVersions = AceGUI.WidgetVersions
|
||||
|
||||
--[[
|
||||
xpcall safecall implementation
|
||||
]]
|
||||
local xpcall = xpcall
|
||||
|
||||
local function errorhandler(err)
|
||||
return geterrorhandler()(err)
|
||||
end
|
||||
|
||||
local function CreateDispatcher(argCount)
|
||||
local code = [[
|
||||
local xpcall, eh = ...
|
||||
local method, ARGS
|
||||
local function call() return method(ARGS) end
|
||||
|
||||
local function dispatch(func, ...)
|
||||
method = func
|
||||
if not method then return end
|
||||
ARGS = ...
|
||||
return xpcall(call, eh)
|
||||
end
|
||||
|
||||
return dispatch
|
||||
]]
|
||||
|
||||
local ARGS = {}
|
||||
for i = 1, argCount do ARGS[i] = "arg"..i end
|
||||
code = code:gsub("ARGS", tconcat(ARGS, ", "))
|
||||
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(xpcall, errorhandler)
|
||||
end
|
||||
|
||||
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
|
||||
local dispatcher = CreateDispatcher(argCount)
|
||||
rawset(self, argCount, dispatcher)
|
||||
return dispatcher
|
||||
end})
|
||||
Dispatchers[0] = function(func)
|
||||
return xpcall(func, errorhandler)
|
||||
end
|
||||
|
||||
local function safecall(func, ...)
|
||||
return Dispatchers[select("#", ...)](func, ...)
|
||||
end
|
||||
|
||||
-- Recycling functions
|
||||
local newWidget, delWidget
|
||||
do
|
||||
-- Version Upgrade in Minor 29
|
||||
-- Internal Storage of the objects changed, from an array table
|
||||
-- to a hash table, and additionally we introduced versioning on
|
||||
-- the widgets which would discard all widgets from a pre-29 version
|
||||
-- anyway, so we just clear the storage now, and don't try to
|
||||
-- convert the storage tables to the new format.
|
||||
-- This should generally not cause *many* widgets to end up in trash,
|
||||
-- since once dialogs are opened, all addons should be loaded already
|
||||
-- and AceGUI should be on the latest version available on the users
|
||||
-- setup.
|
||||
-- -- nevcairiel - Nov 2nd, 2009
|
||||
if oldminor and oldminor < 29 and AceGUI.objPools then
|
||||
AceGUI.objPools = nil
|
||||
end
|
||||
|
||||
AceGUI.objPools = AceGUI.objPools or {}
|
||||
local objPools = AceGUI.objPools
|
||||
--Returns a new instance, if none are available either returns a new table or calls the given contructor
|
||||
function newWidget(type)
|
||||
if not WidgetRegistry[type] then
|
||||
error("Attempt to instantiate unknown widget type", 2)
|
||||
end
|
||||
|
||||
if not objPools[type] then
|
||||
objPools[type] = {}
|
||||
end
|
||||
|
||||
local newObj = next(objPools[type])
|
||||
if not newObj then
|
||||
newObj = WidgetRegistry[type]()
|
||||
newObj.AceGUIWidgetVersion = WidgetVersions[type]
|
||||
else
|
||||
objPools[type][newObj] = nil
|
||||
-- if the widget is older then the latest, don't even try to reuse it
|
||||
-- just forget about it, and grab a new one.
|
||||
if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[type] then
|
||||
return newWidget(type)
|
||||
end
|
||||
end
|
||||
return newObj
|
||||
end
|
||||
-- Releases an instance to the Pool
|
||||
function delWidget(obj,type)
|
||||
if not objPools[type] then
|
||||
objPools[type] = {}
|
||||
end
|
||||
if objPools[type][obj] then
|
||||
error("Attempt to Release Widget that is already released", 2)
|
||||
end
|
||||
objPools[type][obj] = true
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-------------------
|
||||
-- API Functions --
|
||||
-------------------
|
||||
|
||||
-- Gets a widget Object
|
||||
|
||||
--- Create a new Widget of the given type.
|
||||
-- This function will instantiate a new widget (or use one from the widget pool), and call the
|
||||
-- OnAcquire function on it, before returning.
|
||||
-- @param type The type of the widget.
|
||||
-- @return The newly created widget.
|
||||
function AceGUI:Create(type)
|
||||
if WidgetRegistry[type] then
|
||||
local widget = newWidget(type)
|
||||
|
||||
if rawget(widget, "Acquire") then
|
||||
widget.OnAcquire = widget.Acquire
|
||||
widget.Acquire = nil
|
||||
elseif rawget(widget, "Aquire") then
|
||||
widget.OnAcquire = widget.Aquire
|
||||
widget.Aquire = nil
|
||||
end
|
||||
|
||||
if rawget(widget, "Release") then
|
||||
widget.OnRelease = rawget(widget, "Release")
|
||||
widget.Release = nil
|
||||
end
|
||||
|
||||
if widget.OnAcquire then
|
||||
widget:OnAcquire()
|
||||
else
|
||||
error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
|
||||
end
|
||||
-- Set the default Layout ("List")
|
||||
safecall(widget.SetLayout, widget, "List")
|
||||
safecall(widget.ResumeLayout, widget)
|
||||
return widget
|
||||
end
|
||||
end
|
||||
|
||||
--- Releases a widget Object.
|
||||
-- This function calls OnRelease on the widget and places it back in the widget pool.
|
||||
-- Any data on the widget is being erased, and the widget will be hidden.\\
|
||||
-- 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)
|
||||
widget:Fire("OnRelease")
|
||||
safecall(widget.ReleaseChildren, widget)
|
||||
|
||||
if widget.OnRelease then
|
||||
widget:OnRelease()
|
||||
-- else
|
||||
-- error(("Widget type %s doesn't supply an OnRelease Function"):format(widget.type))
|
||||
end
|
||||
for k in pairs(widget.userdata) do
|
||||
widget.userdata[k] = nil
|
||||
end
|
||||
for k in pairs(widget.events) do
|
||||
widget.events[k] = nil
|
||||
end
|
||||
widget.width = nil
|
||||
widget.relWidth = nil
|
||||
widget.height = nil
|
||||
widget.relHeight = nil
|
||||
widget.noAutoHeight = nil
|
||||
widget.frame:ClearAllPoints()
|
||||
widget.frame:Hide()
|
||||
widget.frame:SetParent(UIParent)
|
||||
widget.frame.width = nil
|
||||
widget.frame.height = nil
|
||||
if widget.content then
|
||||
widget.content.width = nil
|
||||
widget.content.height = nil
|
||||
end
|
||||
delWidget(widget, widget.type)
|
||||
end
|
||||
|
||||
-----------
|
||||
-- Focus --
|
||||
-----------
|
||||
|
||||
|
||||
--- Called when a widget has taken focus.
|
||||
-- e.g. Dropdowns opening, Editboxes gaining kb focus
|
||||
-- @param widget The widget that should be focused
|
||||
function AceGUI:SetFocus(widget)
|
||||
if self.FocusedWidget and self.FocusedWidget ~= widget then
|
||||
safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
|
||||
end
|
||||
self.FocusedWidget = widget
|
||||
end
|
||||
|
||||
|
||||
--- Called when something has happened that could cause widgets with focus to drop it
|
||||
-- e.g. titlebar of a frame being clicked
|
||||
function AceGUI:ClearFocus()
|
||||
if self.FocusedWidget then
|
||||
safecall(self.FocusedWidget.ClearFocus, self.FocusedWidget)
|
||||
self.FocusedWidget = nil
|
||||
end
|
||||
end
|
||||
|
||||
-------------
|
||||
-- Widgets --
|
||||
-------------
|
||||
--[[
|
||||
Widgets must provide the following functions
|
||||
OnAcquire() - Called when the object is acquired, should set everything to a default hidden state
|
||||
|
||||
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
|
||||
: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
|
||||
AceGUI already sets a handler to the event
|
||||
:LayoutFinished(width, height) - called after a layout has finished, the width and height will be the width and height of the
|
||||
area used for controls. These can be nil if the layout used the existing size to layout the controls.
|
||||
|
||||
]]
|
||||
|
||||
--------------------------
|
||||
-- Widget Base Template --
|
||||
--------------------------
|
||||
do
|
||||
local WidgetBase = AceGUI.WidgetBase
|
||||
|
||||
WidgetBase.SetParent = function(self, parent)
|
||||
local frame = self.frame
|
||||
frame:SetParent(nil)
|
||||
frame:SetParent(parent.content)
|
||||
self.parent = parent
|
||||
end
|
||||
|
||||
WidgetBase.SetCallback = function(self, name, func)
|
||||
if type(func) == "function" then
|
||||
self.events[name] = func
|
||||
end
|
||||
end
|
||||
|
||||
WidgetBase.Fire = function(self, name, ...)
|
||||
if self.events[name] then
|
||||
local success, ret = safecall(self.events[name], self, name, ...)
|
||||
if success then
|
||||
return ret
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
WidgetBase.SetWidth = function(self, width)
|
||||
self.frame:SetWidth(width)
|
||||
self.frame.width = width
|
||||
if self.OnWidthSet then
|
||||
self:OnWidthSet(width)
|
||||
end
|
||||
end
|
||||
|
||||
WidgetBase.SetRelativeWidth = function(self, width)
|
||||
if width <= 0 or width > 1 then
|
||||
error(":SetRelativeWidth(width): Invalid relative width.", 2)
|
||||
end
|
||||
self.relWidth = width
|
||||
self.width = "relative"
|
||||
end
|
||||
|
||||
WidgetBase.SetHeight = function(self, height)
|
||||
self.frame:SetHeight(height)
|
||||
self.frame.height = height
|
||||
if self.OnHeightSet then
|
||||
self:OnHeightSet(height)
|
||||
end
|
||||
end
|
||||
|
||||
--[[ WidgetBase.SetRelativeHeight = function(self, height)
|
||||
if height <= 0 or height > 1 then
|
||||
error(":SetRelativeHeight(height): Invalid relative height.", 2)
|
||||
end
|
||||
self.relHeight = height
|
||||
self.height = "relative"
|
||||
end ]]
|
||||
|
||||
WidgetBase.IsVisible = function(self)
|
||||
return self.frame:IsVisible()
|
||||
end
|
||||
|
||||
WidgetBase.IsShown= function(self)
|
||||
return self.frame:IsShown()
|
||||
end
|
||||
|
||||
WidgetBase.Release = function(self)
|
||||
AceGUI:Release(self)
|
||||
end
|
||||
|
||||
WidgetBase.SetPoint = function(self, ...)
|
||||
return self.frame:SetPoint(...)
|
||||
end
|
||||
|
||||
WidgetBase.ClearAllPoints = function(self)
|
||||
return self.frame:ClearAllPoints()
|
||||
end
|
||||
|
||||
WidgetBase.GetNumPoints = function(self)
|
||||
return self.frame:GetNumPoints()
|
||||
end
|
||||
|
||||
WidgetBase.GetPoint = function(self, ...)
|
||||
return self.frame:GetPoint(...)
|
||||
end
|
||||
|
||||
WidgetBase.GetUserDataTable = function(self)
|
||||
return self.userdata
|
||||
end
|
||||
|
||||
WidgetBase.SetUserData = function(self, key, value)
|
||||
self.userdata[key] = value
|
||||
end
|
||||
|
||||
WidgetBase.GetUserData = function(self, key)
|
||||
return self.userdata[key]
|
||||
end
|
||||
|
||||
WidgetBase.IsFullHeight = function(self)
|
||||
return self.height == "fill"
|
||||
end
|
||||
|
||||
WidgetBase.SetFullHeight = function(self, isFull)
|
||||
if isFull then
|
||||
self.height = "fill"
|
||||
else
|
||||
self.height = nil
|
||||
end
|
||||
end
|
||||
|
||||
WidgetBase.IsFullWidth = function(self)
|
||||
return self.width == "fill"
|
||||
end
|
||||
|
||||
WidgetBase.SetFullWidth = function(self, isFull)
|
||||
if isFull then
|
||||
self.width = "fill"
|
||||
else
|
||||
self.width = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- local function LayoutOnUpdate(this)
|
||||
-- this:SetScript("OnUpdate",nil)
|
||||
-- this.obj:PerformLayout()
|
||||
-- end
|
||||
|
||||
local WidgetContainerBase = AceGUI.WidgetContainerBase
|
||||
|
||||
WidgetContainerBase.PauseLayout = function(self)
|
||||
self.LayoutPaused = true
|
||||
end
|
||||
|
||||
WidgetContainerBase.ResumeLayout = function(self)
|
||||
self.LayoutPaused = nil
|
||||
end
|
||||
|
||||
WidgetContainerBase.PerformLayout = function(self)
|
||||
if self.LayoutPaused then
|
||||
return
|
||||
end
|
||||
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
|
||||
WidgetContainerBase.DoLayout = function(self)
|
||||
self:PerformLayout()
|
||||
-- if not self.parent then
|
||||
-- self.frame:SetScript("OnUpdate", LayoutOnUpdate)
|
||||
-- end
|
||||
end
|
||||
|
||||
WidgetContainerBase.AddChild = function(self, child, beforeWidget)
|
||||
if beforeWidget then
|
||||
local siblingIndex = 1
|
||||
for _, widget in pairs(self.children) do
|
||||
if widget == beforeWidget then
|
||||
break
|
||||
end
|
||||
siblingIndex = siblingIndex + 1
|
||||
end
|
||||
tinsert(self.children, siblingIndex, child)
|
||||
else
|
||||
tinsert(self.children, child)
|
||||
end
|
||||
child:SetParent(self)
|
||||
child.frame:Show()
|
||||
self:DoLayout()
|
||||
end
|
||||
|
||||
WidgetContainerBase.AddChildren = function(self, ...)
|
||||
for i = 1, select("#", ...) do
|
||||
local child = select(i, ...)
|
||||
tinsert(self.children, child)
|
||||
child:SetParent(self)
|
||||
child.frame:Show()
|
||||
end
|
||||
self:DoLayout()
|
||||
end
|
||||
|
||||
WidgetContainerBase.ReleaseChildren = function(self)
|
||||
local children = self.children
|
||||
for i = 1,#children do
|
||||
AceGUI:Release(children[i])
|
||||
children[i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
WidgetContainerBase.SetLayout = function(self, Layout)
|
||||
self.LayoutFunc = AceGUI:GetLayout(Layout)
|
||||
end
|
||||
|
||||
WidgetContainerBase.SetAutoAdjustHeight = function(self, adjust)
|
||||
if adjust then
|
||||
self.noAutoHeight = nil
|
||||
else
|
||||
self.noAutoHeight = true
|
||||
end
|
||||
end
|
||||
|
||||
local function FrameResize(this)
|
||||
local self = this.obj
|
||||
if this:GetWidth() and this:GetHeight() then
|
||||
if self.OnWidthSet then
|
||||
self:OnWidthSet(this:GetWidth())
|
||||
end
|
||||
if self.OnHeightSet then
|
||||
self:OnHeightSet(this:GetHeight())
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function ContentResize(this)
|
||||
if this:GetWidth() and this:GetHeight() then
|
||||
this.width = this:GetWidth()
|
||||
this.height = this:GetHeight()
|
||||
this.obj:DoLayout()
|
||||
end
|
||||
end
|
||||
|
||||
setmetatable(WidgetContainerBase, {__index=WidgetBase})
|
||||
|
||||
--One of these function should be called on each Widget Instance as part of its creation process
|
||||
|
||||
--- Register a widget-class as a container for newly created widgets.
|
||||
-- @param widget The widget class
|
||||
function AceGUI:RegisterAsContainer(widget)
|
||||
widget.children = {}
|
||||
widget.userdata = {}
|
||||
widget.events = {}
|
||||
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:SetLayout("List")
|
||||
return widget
|
||||
end
|
||||
|
||||
--- Register a widget-class as a widget.
|
||||
-- @param widget The widget class
|
||||
function AceGUI:RegisterAsWidget(widget)
|
||||
widget.userdata = {}
|
||||
widget.events = {}
|
||||
widget.base = WidgetBase
|
||||
widget.frame.obj = widget
|
||||
widget.frame:SetScript("OnSizeChanged", FrameResize)
|
||||
setmetatable(widget, {__index = WidgetBase})
|
||||
return widget
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
------------------
|
||||
-- Widget API --
|
||||
------------------
|
||||
|
||||
--- Registers a widget Constructor, this function returns a new instance of the Widget
|
||||
-- @param Name The name of the widget
|
||||
-- @param Constructor The widget constructor function
|
||||
-- @param Version The version of the widget
|
||||
function AceGUI:RegisterWidgetType(Name, Constructor, Version)
|
||||
assert(type(Constructor) == "function")
|
||||
assert(type(Version) == "number")
|
||||
|
||||
local oldVersion = WidgetVersions[Name]
|
||||
if oldVersion and oldVersion >= Version then return end
|
||||
|
||||
WidgetVersions[Name] = Version
|
||||
WidgetRegistry[Name] = Constructor
|
||||
end
|
||||
|
||||
--- Registers a Layout Function
|
||||
-- @param Name The name of the layout
|
||||
-- @param LayoutFunc Reference to the layout function
|
||||
function AceGUI:RegisterLayout(Name, LayoutFunc)
|
||||
assert(type(LayoutFunc) == "function")
|
||||
if type(Name) == "string" then
|
||||
Name = Name:upper()
|
||||
end
|
||||
LayoutRegistry[Name] = LayoutFunc
|
||||
end
|
||||
|
||||
--- Get a Layout Function from the registry
|
||||
-- @param Name The name of the layout
|
||||
function AceGUI:GetLayout(Name)
|
||||
if type(Name) == "string" then
|
||||
Name = Name:upper()
|
||||
end
|
||||
return LayoutRegistry[Name]
|
||||
end
|
||||
|
||||
AceGUI.counts = AceGUI.counts or {}
|
||||
|
||||
--- A type-based counter to count the number of widgets created.
|
||||
-- This is used by widgets that require a named frame, e.g. when a Blizzard
|
||||
-- Template requires it.
|
||||
-- @param type The widget type
|
||||
function AceGUI:GetNextWidgetNum(type)
|
||||
if not self.counts[type] then
|
||||
self.counts[type] = 0
|
||||
end
|
||||
self.counts[type] = self.counts[type] + 1
|
||||
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
|
||||
end
|
||||
|
||||
--- Return the version of the currently registered widget type.
|
||||
-- @param type The widget type
|
||||
function AceGUI:GetWidgetVersion(type)
|
||||
return WidgetVersions[type]
|
||||
end
|
||||
|
||||
-------------
|
||||
-- Layouts --
|
||||
-------------
|
||||
|
||||
--[[
|
||||
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
|
||||
local child = children[i]
|
||||
|
||||
local frame = child.frame
|
||||
frame:ClearAllPoints()
|
||||
frame:Show()
|
||||
if i == 1 then
|
||||
frame:SetPoint("TOPLEFT", content)
|
||||
else
|
||||
frame:SetPoint("TOPLEFT", children[i-1].frame, "BOTTOMLEFT")
|
||||
end
|
||||
|
||||
if child.width == "fill" then
|
||||
child:SetWidth(width)
|
||||
frame:SetPoint("RIGHT", content)
|
||||
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
elseif child.width == "relative" then
|
||||
child:SetWidth(width * child.relWidth)
|
||||
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
end
|
||||
|
||||
height = height + (frame.height or frame:GetHeight() or 0)
|
||||
end
|
||||
safecall(content.obj.LayoutFinished, content.obj, nil, height)
|
||||
end)
|
||||
|
||||
-- A single control fills the whole content area
|
||||
AceGUI:RegisterLayout("Fill",
|
||||
function(content, children)
|
||||
if children[1] then
|
||||
children[1]:SetWidth(content:GetWidth() or 0)
|
||||
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())
|
||||
end
|
||||
end)
|
||||
|
||||
AceGUI:RegisterLayout("Flow",
|
||||
function(content, children)
|
||||
--used height so far
|
||||
local height = 0
|
||||
--width used in the current row
|
||||
local usedwidth = 0
|
||||
--height of the current row
|
||||
local rowheight = 0
|
||||
local rowoffset = 0
|
||||
local lastrowoffset
|
||||
|
||||
local width = content.width or content:GetWidth() or 0
|
||||
|
||||
--control at the start of the row
|
||||
local rowstart
|
||||
local rowstartoffset
|
||||
local lastrowstart
|
||||
local isfullheight
|
||||
|
||||
local frameoffset
|
||||
local lastframeoffset
|
||||
local oversize
|
||||
for i = 1, #children do
|
||||
local child = children[i]
|
||||
oversize = nil
|
||||
local frame = child.frame
|
||||
local frameheight = frame.height or frame:GetHeight() or 0
|
||||
local framewidth = frame.width or frame:GetWidth() or 0
|
||||
lastframeoffset = frameoffset
|
||||
-- HACK: Why did we set a frameoffset of (frameheight / 2) ?
|
||||
-- That was moving all widgets half the widgets size down, is that intended?
|
||||
-- Actually, it seems to be neccessary for many cases, we'll leave it in for now.
|
||||
-- If widgets seem to anchor weirdly with this, provide a valid alignoffset for them.
|
||||
-- TODO: Investigate moar!
|
||||
frameoffset = child.alignoffset or (frameheight / 2)
|
||||
|
||||
if child.width == "relative" then
|
||||
framewidth = width * child.relWidth
|
||||
end
|
||||
|
||||
frame:Show()
|
||||
frame:ClearAllPoints()
|
||||
if i == 1 then
|
||||
-- anchor the first control to the top left
|
||||
frame:SetPoint("TOPLEFT", content)
|
||||
rowheight = frameheight
|
||||
rowoffset = frameoffset
|
||||
rowstart = frame
|
||||
rowstartoffset = frameoffset
|
||||
usedwidth = framewidth
|
||||
if usedwidth > width then
|
||||
oversize = true
|
||||
end
|
||||
else
|
||||
-- if there isn't available width for the control start a new row
|
||||
-- if a control is "fill" it will be on a row of its own full width
|
||||
if usedwidth == 0 or ((framewidth) + usedwidth > width) or child.width == "fill" then
|
||||
if isfullheight then
|
||||
-- a previous row has already filled the entire height, there's nothing we can usefully do anymore
|
||||
-- (maybe error/warn about this?)
|
||||
break
|
||||
end
|
||||
--anchor the previous row, we will now know its height and offset
|
||||
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
|
||||
rowstartoffset = frameoffset
|
||||
rowheight = frameheight
|
||||
rowoffset = frameoffset
|
||||
usedwidth = framewidth
|
||||
if usedwidth > width then
|
||||
oversize = true
|
||||
end
|
||||
-- put the control on the current row, adding it to the width and checking if the height needs to be increased
|
||||
else
|
||||
--handles cases where the new height is higher than either control because of the offsets
|
||||
--math.max(rowheight-rowoffset+frameoffset, frameheight-frameoffset+rowoffset)
|
||||
|
||||
--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)
|
||||
usedwidth = framewidth + usedwidth
|
||||
end
|
||||
end
|
||||
|
||||
if child.width == "fill" then
|
||||
child:SetWidth(width)
|
||||
frame:SetPoint("RIGHT", content)
|
||||
|
||||
usedwidth = 0
|
||||
rowstart = frame
|
||||
rowstartoffset = frameoffset
|
||||
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
rowheight = frame.height or frame:GetHeight() or 0
|
||||
rowoffset = child.alignoffset or (rowheight / 2)
|
||||
rowstartoffset = rowoffset
|
||||
elseif child.width == "relative" then
|
||||
child:SetWidth(width * child.relWidth)
|
||||
|
||||
if child.DoLayout then
|
||||
child:DoLayout()
|
||||
end
|
||||
elseif oversize then
|
||||
if width > 1 then
|
||||
frame:SetPoint("RIGHT", content)
|
||||
end
|
||||
end
|
||||
|
||||
if child.height == "fill" then
|
||||
frame:SetPoint("BOTTOM", content)
|
||||
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)
|
||||
elseif rowstart then
|
||||
rowstart:SetPoint("TOPLEFT", content, "TOPLEFT", 0, -(height + (rowoffset - rowstartoffset) + 3))
|
||||
end
|
||||
|
||||
height = height + rowheight + 3
|
||||
safecall(content.obj.LayoutFinished, content.obj, nil, height)
|
||||
end)
|
||||
@@ -0,0 +1,28 @@
|
||||
<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-DropDown.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-DropDown-Items.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-EditBox.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Heading.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Icon.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-InteractiveLabel.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Keybinding.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Label.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-MultiLineEditBox.lua"/>
|
||||
<Script file="widgets\AceGUIWidget-Slider.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,133 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
BlizOptionsGroup Container
|
||||
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "BlizOptionsGroup", 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
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
local function OnShow(frame)
|
||||
frame.obj:Fire("OnShow")
|
||||
end
|
||||
|
||||
local function OnHide(frame)
|
||||
frame.obj:Fire("OnHide")
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
local function okay(frame)
|
||||
frame.obj:Fire("okay")
|
||||
end
|
||||
|
||||
local function cancel(frame)
|
||||
frame.obj:Fire("cancel")
|
||||
end
|
||||
|
||||
local function defaults(frame)
|
||||
frame.obj:Fire("defaults")
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetName()
|
||||
self:SetTitle()
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 63
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 26
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end,
|
||||
|
||||
["SetName"] = function(self, name, parent)
|
||||
self.frame.name = name
|
||||
self.frame.parent = parent
|
||||
end,
|
||||
|
||||
["SetTitle"] = function(self, title)
|
||||
local content = self.content
|
||||
content:ClearAllPoints()
|
||||
if not title or title == "" then
|
||||
content:SetPoint("TOPLEFT", 10, -10)
|
||||
self.label:SetText("")
|
||||
else
|
||||
content:SetPoint("TOPLEFT", 10, -40)
|
||||
self.label:SetText(title)
|
||||
end
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame")
|
||||
frame:Hide()
|
||||
|
||||
-- support functions for the Blizzard Interface Options
|
||||
frame.okay = okay
|
||||
frame.cancel = cancel
|
||||
frame.defaults = defaults
|
||||
|
||||
frame:SetScript("OnHide", OnHide)
|
||||
frame:SetScript("OnShow", OnShow)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
|
||||
label:SetPoint("TOPLEFT", 10, -15)
|
||||
label:SetPoint("BOTTOMRIGHT", frame, "TOPRIGHT", 10, -45)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetJustifyV("TOP")
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame", nil, frame)
|
||||
content:SetPoint("TOPLEFT", 10, -10)
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
|
||||
local widget = {
|
||||
label = label,
|
||||
frame = frame,
|
||||
content = content,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,157 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
DropdownGroup Container
|
||||
Container controlled by a dropdown on the top.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "DropdownGroup", 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 assert, pairs, type = assert, pairs, type
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self.dropdown:SetText("")
|
||||
self:SetDropdownWidth(200)
|
||||
self:SetTitle("")
|
||||
end,
|
||||
|
||||
["OnRelease"] = function(self)
|
||||
self.dropdown.list = nil
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
end,
|
||||
|
||||
["SetTitle"] = function(self, title)
|
||||
self.titletext:SetText(title)
|
||||
self.dropdown.frame:ClearAllPoints()
|
||||
if title and title ~= "" then
|
||||
self.dropdown.frame:SetPoint("TOPRIGHT", -2, 0)
|
||||
else
|
||||
self.dropdown.frame:SetPoint("TOPLEFT", -1, 0)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetGroupList"] = function(self,list)
|
||||
self.dropdown:SetList(list)
|
||||
end,
|
||||
|
||||
["SetStatusTable"] = function(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
end,
|
||||
|
||||
["SetGroup"] = function(self,group)
|
||||
self.dropdown:SetValue(group)
|
||||
local status = self.status or self.localstatus
|
||||
status.selected = group
|
||||
self:Fire("OnGroupSelected", group)
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 26
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 63
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end,
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
self:SetHeight((height or 0) + 63)
|
||||
end,
|
||||
|
||||
["SetDropdownWidth"] = function(self, width)
|
||||
self.dropdown:SetWidth(width)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 Constructor()
|
||||
local frame = CreateFrame("Frame")
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT", 4, -5)
|
||||
titletext:SetPoint("TOPRIGHT", -4, -5)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
|
||||
local dropdown = AceGUI:Create("Dropdown")
|
||||
dropdown.frame:SetParent(frame)
|
||||
dropdown.frame:SetFrameLevel(dropdown.frame:GetFrameLevel() + 2)
|
||||
dropdown:SetCallback("OnValueChanged", SelectedGroup)
|
||||
dropdown.frame:SetPoint("TOPLEFT", -1, 0)
|
||||
dropdown.frame:Show()
|
||||
dropdown:SetLabel("")
|
||||
|
||||
local border = CreateFrame("Frame", nil, frame)
|
||||
border:SetPoint("TOPLEFT", 0, -26)
|
||||
border:SetPoint("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)
|
||||
content:SetPoint("TOPLEFT", 10, -10)
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
|
||||
local widget = {
|
||||
frame = frame,
|
||||
localstatus = {},
|
||||
titletext = titletext,
|
||||
dropdown = dropdown,
|
||||
border = border,
|
||||
content = content,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
dropdown.parentgroup = widget
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,298 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Frame Container
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "Frame", 21
|
||||
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, assert, type = pairs, assert, type
|
||||
local wipe = table.wipe
|
||||
|
||||
-- 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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Button_OnClick(frame)
|
||||
PlaySound("gsTitleOptionExit")
|
||||
frame.obj:Hide()
|
||||
end
|
||||
|
||||
local function Frame_OnClose(frame)
|
||||
frame.obj:Fire("OnClose")
|
||||
end
|
||||
|
||||
local function Frame_OnMouseDown(frame)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function Title_OnMouseDown(frame)
|
||||
frame:GetParent():StartMoving()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function MoverSizer_OnMouseUp(mover)
|
||||
local frame = mover: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 SizerSE_OnMouseDown(frame)
|
||||
frame:GetParent():StartSizing("BOTTOMRIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function SizerS_OnMouseDown(frame)
|
||||
frame:GetParent():StartSizing("BOTTOM")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function SizerE_OnMouseDown(frame)
|
||||
frame:GetParent():StartSizing("RIGHT")
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function StatusBar_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnterStatusBar")
|
||||
end
|
||||
|
||||
local function StatusBar_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeaveStatusBar")
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self.frame:SetParent(UIParent)
|
||||
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
self:SetTitle()
|
||||
self:SetStatusText()
|
||||
self:ApplyStatus()
|
||||
self:Show()
|
||||
end,
|
||||
|
||||
["OnRelease"] = function(self)
|
||||
self.status = nil
|
||||
wipe(self.localstatus)
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 34
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 57
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end,
|
||||
|
||||
["SetTitle"] = function(self, title)
|
||||
self.titletext:SetText(title)
|
||||
end,
|
||||
|
||||
["SetStatusText"] = function(self, text)
|
||||
self.statustext:SetText(text)
|
||||
end,
|
||||
|
||||
["Hide"] = function(self)
|
||||
self.frame:Hide()
|
||||
end,
|
||||
|
||||
["Show"] = function(self)
|
||||
self.frame:Show()
|
||||
end,
|
||||
|
||||
-- called to set an external table to store status in
|
||||
["SetStatusTable"] = function(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
self:ApplyStatus()
|
||||
end,
|
||||
|
||||
["ApplyStatus"] = function(self)
|
||||
local status = self.status or self.localstatus
|
||||
local frame = self.frame
|
||||
self:SetWidth(status.width or 700)
|
||||
self:SetHeight(status.height or 500)
|
||||
frame:ClearAllPoints()
|
||||
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")
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetMovable(true)
|
||||
frame:SetResizable(true)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
frame:SetBackdrop(FrameBackdrop)
|
||||
frame:SetBackdropColor(0, 0, 0, 1)
|
||||
frame:SetMinResize(400, 200)
|
||||
frame:SetToplevel(true)
|
||||
frame:SetScript("OnHide", Frame_OnClose)
|
||||
frame:SetScript("OnMouseDown", Frame_OnMouseDown)
|
||||
|
||||
local closebutton = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate")
|
||||
closebutton:SetScript("OnClick", Button_OnClick)
|
||||
closebutton:SetPoint("BOTTOMRIGHT", -27, 17)
|
||||
closebutton:SetHeight(20)
|
||||
closebutton:SetWidth(100)
|
||||
closebutton:SetText(CLOSE)
|
||||
|
||||
local statusbg = CreateFrame("Button", nil, frame)
|
||||
statusbg:SetPoint("BOTTOMLEFT", 15, 15)
|
||||
statusbg:SetPoint("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)
|
||||
statusbg:SetScript("OnEnter", StatusBar_OnEnter)
|
||||
statusbg:SetScript("OnLeave", StatusBar_OnLeave)
|
||||
|
||||
local statustext = statusbg:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
statustext:SetPoint("TOPLEFT", 7, -2)
|
||||
statustext:SetPoint("BOTTOMRIGHT", -7, 2)
|
||||
statustext:SetHeight(20)
|
||||
statustext:SetJustifyH("LEFT")
|
||||
statustext:SetText("")
|
||||
|
||||
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", 0, 12)
|
||||
titlebg:SetWidth(100)
|
||||
titlebg:SetHeight(40)
|
||||
|
||||
local title = CreateFrame("Frame", nil, frame)
|
||||
title:EnableMouse(true)
|
||||
title:SetScript("OnMouseDown", Title_OnMouseDown)
|
||||
title:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
|
||||
title:SetAllPoints(titlebg)
|
||||
|
||||
local titletext = title:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
titletext:SetPoint("TOP", titlebg, "TOP", 0, -14)
|
||||
|
||||
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")
|
||||
titlebg_l:SetWidth(30)
|
||||
titlebg_l:SetHeight(40)
|
||||
|
||||
local titlebg_r = frame:CreateTexture(nil, "OVERLAY")
|
||||
titlebg_r:SetTexture("Interface\\DialogFrame\\UI-DialogBox-Header")
|
||||
titlebg_r:SetTexCoord(0.67, 0.77, 0, 0.63)
|
||||
titlebg_r:SetPoint("LEFT", titlebg, "RIGHT")
|
||||
titlebg_r:SetWidth(30)
|
||||
titlebg_r:SetHeight(40)
|
||||
|
||||
local sizer_se = CreateFrame("Frame", nil, frame)
|
||||
sizer_se:SetPoint("BOTTOMRIGHT")
|
||||
sizer_se:SetWidth(25)
|
||||
sizer_se:SetHeight(25)
|
||||
sizer_se:EnableMouse()
|
||||
sizer_se:SetScript("OnMouseDown",SizerSE_OnMouseDown)
|
||||
sizer_se:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
|
||||
|
||||
local line1 = sizer_se:CreateTexture(nil, "BACKGROUND")
|
||||
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")
|
||||
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", -25, 0)
|
||||
sizer_s:SetPoint("BOTTOMLEFT")
|
||||
sizer_s:SetHeight(25)
|
||||
sizer_s:EnableMouse(true)
|
||||
sizer_s:SetScript("OnMouseDown", SizerS_OnMouseDown)
|
||||
sizer_s:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
|
||||
|
||||
local sizer_e = CreateFrame("Frame", nil, frame)
|
||||
sizer_e:SetPoint("BOTTOMRIGHT", 0, 25)
|
||||
sizer_e:SetPoint("TOPRIGHT")
|
||||
sizer_e:SetWidth(25)
|
||||
sizer_e:EnableMouse(true)
|
||||
sizer_e:SetScript("OnMouseDown", SizerE_OnMouseDown)
|
||||
sizer_e:SetScript("OnMouseUp", MoverSizer_OnMouseUp)
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame", nil, frame)
|
||||
content:SetPoint("TOPLEFT", 17, -27)
|
||||
content:SetPoint("BOTTOMRIGHT", -17, 40)
|
||||
|
||||
local widget = {
|
||||
localstatus = {},
|
||||
titletext = titletext,
|
||||
statustext = statustext,
|
||||
content = content,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
closebutton.obj, statusbg.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,102 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
InlineGroup Container
|
||||
Simple container widget that creates a visible "box" with an optional title.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "InlineGroup", 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
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetWidth(300)
|
||||
self:SetHeight(100)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetTitle"] = function(self,title)
|
||||
self.titletext:SetText(title)
|
||||
end,
|
||||
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + 40)
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 20
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 20
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local titletext = frame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT", 14, 0)
|
||||
titletext:SetPoint("TOPRIGHT", -14, 0)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
|
||||
local border = CreateFrame("Frame", nil, frame)
|
||||
border:SetPoint("TOPLEFT", 0, -17)
|
||||
border:SetPoint("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)
|
||||
content:SetPoint("TOPLEFT", 10, -10)
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
|
||||
local widget = {
|
||||
frame = frame,
|
||||
content = content,
|
||||
titletext = titletext,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,203 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
ScrollFrame Container
|
||||
Plain container that scrolls its content and doesn't grow in height.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "ScrollFrame", 21
|
||||
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, assert, type = pairs, assert, type
|
||||
local min, max, floor, abs = math.min, math.max, math.floor, math.abs
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function FixScrollOnUpdate(frame)
|
||||
frame:SetScript("OnUpdate", nil)
|
||||
frame.obj:FixScroll()
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function ScrollFrame_OnMouseWheel(frame, value)
|
||||
frame.obj:MoveScroll(value)
|
||||
end
|
||||
|
||||
local function ScrollFrame_OnSizeChanged(frame)
|
||||
frame:SetScript("OnUpdate", FixScrollOnUpdate)
|
||||
end
|
||||
|
||||
local function ScrollBar_OnScrollValueChanged(frame, value)
|
||||
frame.obj:SetScroll(value)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetScroll(0)
|
||||
end,
|
||||
|
||||
["OnRelease"] = function(self)
|
||||
self.status = nil
|
||||
for k in pairs(self.localstatus) do
|
||||
self.localstatus[k] = nil
|
||||
end
|
||||
self.scrollframe:SetPoint("BOTTOMRIGHT")
|
||||
self.scrollbar:Hide()
|
||||
self.scrollBarShown = nil
|
||||
self.content.height, self.content.width = nil, nil
|
||||
end,
|
||||
|
||||
["SetScroll"] = function(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", 0, offset)
|
||||
self.content:SetPoint("TOPRIGHT", 0, offset)
|
||||
status.offset = offset
|
||||
status.scrollvalue = value
|
||||
end,
|
||||
|
||||
["MoveScroll"] = function(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight()
|
||||
|
||||
if self.scrollBarShown then
|
||||
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,
|
||||
|
||||
["FixScroll"] = function(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()
|
||||
-- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys
|
||||
-- No-one is going to miss 2 pixels at the bottom of the frame, anyhow!
|
||||
if viewheight < height + 2 then
|
||||
if self.scrollBarShown then
|
||||
self.scrollBarShown = nil
|
||||
self.scrollbar:Hide()
|
||||
self.scrollbar:SetValue(0)
|
||||
self.scrollframe:SetPoint("BOTTOMRIGHT")
|
||||
self:DoLayout()
|
||||
end
|
||||
else
|
||||
if not self.scrollBarShown then
|
||||
self.scrollBarShown = true
|
||||
self.scrollbar:Show()
|
||||
self.scrollframe:SetPoint("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", 0, offset)
|
||||
self.content:SetPoint("TOPRIGHT", 0, offset)
|
||||
status.offset = offset
|
||||
end
|
||||
end
|
||||
self.updateLock = nil
|
||||
end,
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
self.content:SetHeight(height or 0 + 20)
|
||||
self.scrollframe:SetScript("OnUpdate", FixScrollOnUpdate)
|
||||
end,
|
||||
|
||||
["SetStatusTable"] = function(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
if not status.scrollvalue then
|
||||
status.scrollvalue = 0
|
||||
end
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
content.width = width
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
content.height = height
|
||||
end
|
||||
}
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
|
||||
local scrollframe = CreateFrame("ScrollFrame", nil, frame)
|
||||
scrollframe:SetPoint("TOPLEFT")
|
||||
scrollframe:SetPoint("BOTTOMRIGHT")
|
||||
scrollframe:EnableMouseWheel(true)
|
||||
scrollframe:SetScript("OnMouseWheel", ScrollFrame_OnMouseWheel)
|
||||
scrollframe:SetScript("OnSizeChanged", ScrollFrame_OnSizeChanged)
|
||||
|
||||
local scrollbar = CreateFrame("Slider", ("AceConfigDialogScrollFrame%dScrollBar"):format(num), scrollframe, "UIPanelScrollBarTemplate")
|
||||
scrollbar:SetPoint("TOPLEFT", scrollframe, "TOPRIGHT", 4, -16)
|
||||
scrollbar:SetPoint("BOTTOMLEFT", scrollframe, "BOTTOMRIGHT", 4, 16)
|
||||
scrollbar:SetMinMaxValues(0, 1000)
|
||||
scrollbar:SetValueStep(1)
|
||||
scrollbar:SetValue(0)
|
||||
scrollbar:SetWidth(16)
|
||||
scrollbar:Hide()
|
||||
-- set the script as the last step, so it doesn't fire yet
|
||||
scrollbar:SetScript("OnValueChanged", ScrollBar_OnScrollValueChanged)
|
||||
|
||||
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetTexture(0, 0, 0, 0.4)
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame", nil, scrollframe)
|
||||
content:SetPoint("TOPLEFT")
|
||||
content:SetPoint("TOPRIGHT")
|
||||
content:SetHeight(400)
|
||||
scrollframe:SetScrollChild(content)
|
||||
|
||||
local widget = {
|
||||
localstatus = { scrollvalue = 0 },
|
||||
scrollframe = scrollframe,
|
||||
scrollbar = scrollbar,
|
||||
content = content,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
scrollframe.obj, scrollbar.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,69 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
SimpleGroup Container
|
||||
Simple container widget that just groups widgets.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "SimpleGroup", 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
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetWidth(300)
|
||||
self:SetHeight(100)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight(height or 0)
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
content:SetWidth(width)
|
||||
content.width = width
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
content:SetHeight(height)
|
||||
content.height = height
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
--Container Support
|
||||
local content = CreateFrame("Frame", nil, frame)
|
||||
content:SetPoint("TOPLEFT")
|
||||
content:SetPoint("BOTTOMRIGHT")
|
||||
|
||||
local widget = {
|
||||
frame = frame,
|
||||
content = content,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,348 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
TabGroup Container
|
||||
Container that uses tabs on top to switch between groups.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "TabGroup", 30
|
||||
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, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
|
||||
|
||||
-- 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
|
||||
|
||||
-- local upvalue storage used by BuildTabs
|
||||
local widths = {}
|
||||
local rowwidths = {}
|
||||
local rowends = {}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function UpdateTabLook(frame)
|
||||
if frame.disabled then
|
||||
PanelTemplates_SetDisabledTabState(frame)
|
||||
elseif frame.selected then
|
||||
PanelTemplates_SelectTab(frame)
|
||||
else
|
||||
PanelTemplates_DeselectTab(frame)
|
||||
end
|
||||
end
|
||||
|
||||
local function Tab_SetText(frame, text)
|
||||
frame:_SetText(text)
|
||||
local width = frame.obj.frame.width or frame.obj.frame:GetWidth() or 0
|
||||
PanelTemplates_TabResize(frame, 0, nil, width)
|
||||
end
|
||||
|
||||
local function Tab_SetSelected(frame, selected)
|
||||
frame.selected = selected
|
||||
UpdateTabLook(frame)
|
||||
end
|
||||
|
||||
local function Tab_SetDisabled(frame, disabled)
|
||||
frame.disabled = disabled
|
||||
UpdateTabLook(frame)
|
||||
end
|
||||
|
||||
local function BuildTabsOnUpdate(frame)
|
||||
local self = frame.obj
|
||||
self:BuildTabs()
|
||||
frame:SetScript("OnUpdate", nil)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Tab_OnClick(frame)
|
||||
if not (frame.selected or frame.disabled) then
|
||||
PlaySound("igCharacterInfoTab")
|
||||
frame.obj:SelectTab(frame.value)
|
||||
end
|
||||
end
|
||||
|
||||
local function Tab_OnEnter(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnTabEnter", self.tabs[frame.id].value, frame)
|
||||
end
|
||||
|
||||
local function Tab_OnLeave(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnTabLeave", self.tabs[frame.id].value, frame)
|
||||
end
|
||||
|
||||
local function Tab_OnShow(frame)
|
||||
_G[frame:GetName().."HighlightTexture"]:SetWidth(frame:GetTextWidth() + 30)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetTitle()
|
||||
end,
|
||||
|
||||
["OnRelease"] = function(self)
|
||||
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
|
||||
end,
|
||||
|
||||
["CreateTab"] = function(self, id)
|
||||
local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, 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", 14, -3)
|
||||
tab.text:SetPoint("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,
|
||||
|
||||
["SetTitle"] = function(self, text)
|
||||
self.titletext:SetText(text or "")
|
||||
if text and text ~= "" then
|
||||
self.alignoffset = 25
|
||||
else
|
||||
self.alignoffset = 18
|
||||
end
|
||||
self:BuildTabs()
|
||||
end,
|
||||
|
||||
["SetStatusTable"] = function(self, status)
|
||||
assert(type(status) == "table")
|
||||
self.status = status
|
||||
end,
|
||||
|
||||
["SelectTab"] = function(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,
|
||||
|
||||
["SetTabs"] = function(self, tabs)
|
||||
self.tablist = tabs
|
||||
self:BuildTabs()
|
||||
end,
|
||||
|
||||
|
||||
["BuildTabs"] = function(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
|
||||
|
||||
wipe(widths)
|
||||
wipe(rowwidths)
|
||||
wipe(rowends)
|
||||
|
||||
--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", 1, -self.borderoffset)
|
||||
end,
|
||||
|
||||
["OnWidthSet"] = function(self, width)
|
||||
local content = self.content
|
||||
local contentwidth = width - 60
|
||||
if contentwidth < 0 then
|
||||
contentwidth = 0
|
||||
end
|
||||
content:SetWidth(contentwidth)
|
||||
content.width = contentwidth
|
||||
self:BuildTabs(self)
|
||||
self.frame:SetScript("OnUpdate", BuildTabsOnUpdate)
|
||||
end,
|
||||
|
||||
["OnHeightSet"] = function(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,
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + (self.borderoffset + 23))
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame",nil,UIParent)
|
||||
frame:SetHeight(100)
|
||||
frame:SetWidth(100)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local titletext = frame:CreateFontString(nil,"OVERLAY","GameFontNormal")
|
||||
titletext:SetPoint("TOPLEFT", 14, 0)
|
||||
titletext:SetPoint("TOPRIGHT", -14, 0)
|
||||
titletext:SetJustifyH("LEFT")
|
||||
titletext:SetHeight(18)
|
||||
titletext:SetText("")
|
||||
|
||||
local border = CreateFrame("Frame", nil, frame)
|
||||
border:SetPoint("TOPLEFT", 1, -27)
|
||||
border:SetPoint("BOTTOMRIGHT", -1, 3)
|
||||
border:SetBackdrop(PaneBackdrop)
|
||||
border:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
|
||||
border:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
|
||||
local content = CreateFrame("Frame", nil, border)
|
||||
content:SetPoint("TOPLEFT", 10, -7)
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 7)
|
||||
|
||||
local widget = {
|
||||
num = num,
|
||||
frame = frame,
|
||||
localstatus = {},
|
||||
alignoffset = 18,
|
||||
titletext = titletext,
|
||||
border = border,
|
||||
borderoffset = 27,
|
||||
tabs = {},
|
||||
content = content,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,670 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
TreeGroup Container
|
||||
Container that uses a tree control to switch between groups.
|
||||
-------------------------------------------------------------------------------]]
|
||||
local Type, Version = "TreeGroup", 30
|
||||
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 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
|
||||
|
||||
local DEFAULT_TREE_WIDTH = 175
|
||||
local DEFAULT_TREE_SIZABLE = true
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 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", 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 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
|
||||
|
||||
--fire an update after one frame to catch the treeframes height
|
||||
local function FirstFrameUpdate(frame)
|
||||
local self = frame.obj
|
||||
frame:SetScript("OnUpdate", nil)
|
||||
self:RefreshTree()
|
||||
end
|
||||
|
||||
local function BuildUniqueValue(...)
|
||||
local n = select('#', ...)
|
||||
if n == 1 then
|
||||
return ...
|
||||
else
|
||||
return (...).."\001"..BuildUniqueValue(select(2,...))
|
||||
end
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Expand_OnClick(frame)
|
||||
local button = frame.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 Button_OnClick(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnClick", frame.uniquevalue, frame.selected)
|
||||
if not frame.selected then
|
||||
self:SetSelected(frame.uniquevalue)
|
||||
frame.selected = true
|
||||
frame:LockHighlight()
|
||||
self:RefreshTree()
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function Button_OnDoubleClick(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 Button_OnEnter(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnButtonEnter", frame.uniquevalue, frame)
|
||||
|
||||
if self.enabletooltips then
|
||||
GameTooltip:SetOwner(frame, "ANCHOR_NONE")
|
||||
GameTooltip:SetPoint("LEFT",frame,"RIGHT")
|
||||
GameTooltip:SetText(frame.text:GetText() or "", 1, .82, 0, 1)
|
||||
|
||||
GameTooltip:Show()
|
||||
end
|
||||
end
|
||||
|
||||
local function Button_OnLeave(frame)
|
||||
local self = frame.obj
|
||||
self:Fire("OnButtonLeave", frame.uniquevalue, frame)
|
||||
|
||||
if self.enabletooltips then
|
||||
GameTooltip:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local function OnScrollValueChanged(frame, value)
|
||||
if frame.obj.noupdate then return end
|
||||
local self = frame.obj
|
||||
local status = self.status or self.localstatus
|
||||
status.scrollvalue = value
|
||||
self:RefreshTree()
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function Tree_OnSizeChanged(frame)
|
||||
frame.obj:RefreshTree()
|
||||
end
|
||||
|
||||
local function Tree_OnMouseWheel(frame, delta)
|
||||
local self = frame.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 Dragger_OnLeave(frame)
|
||||
frame:SetBackdropColor(1, 1, 1, 0)
|
||||
end
|
||||
|
||||
local function Dragger_OnEnter(frame)
|
||||
frame:SetBackdropColor(1, 1, 1, 0.8)
|
||||
end
|
||||
|
||||
local function Dragger_OnMouseDown(frame)
|
||||
local treeframe = frame:GetParent()
|
||||
treeframe:StartSizing("RIGHT")
|
||||
end
|
||||
|
||||
local function Dragger_OnMouseUp(frame)
|
||||
local treeframe = frame: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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetTreeWidth(DEFAULT_TREE_WIDTH, DEFAULT_TREE_SIZABLE)
|
||||
self:EnableButtonTooltips(true)
|
||||
end,
|
||||
|
||||
["OnRelease"] = function(self)
|
||||
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,
|
||||
|
||||
["EnableButtonTooltips"] = function(self, enable)
|
||||
self.enabletooltips = enable
|
||||
end,
|
||||
|
||||
["CreateButton"] = function(self)
|
||||
local num = AceGUI:GetNextWidgetNum("TreeGroupButton")
|
||||
local button = CreateFrame("Button", ("AceGUI30TreeButton%d"):format(num), self.treeframe, "OptionsListButtonTemplate")
|
||||
button.obj = self
|
||||
|
||||
local icon = button:CreateTexture(nil, "OVERLAY")
|
||||
icon:SetWidth(14)
|
||||
icon:SetHeight(14)
|
||||
button.icon = icon
|
||||
|
||||
button:SetScript("OnClick",Button_OnClick)
|
||||
button:SetScript("OnDoubleClick", Button_OnDoubleClick)
|
||||
button:SetScript("OnEnter",Button_OnEnter)
|
||||
button:SetScript("OnLeave",Button_OnLeave)
|
||||
|
||||
button.toggle.button = button
|
||||
button.toggle:SetScript("OnClick",Expand_OnClick)
|
||||
|
||||
return button
|
||||
end,
|
||||
|
||||
["SetStatusTable"] = function(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
|
||||
["SetTree"] = function(self, tree, filter)
|
||||
self.filter = filter
|
||||
if tree then
|
||||
assert(type(tree) == "table")
|
||||
end
|
||||
self.tree = tree
|
||||
self:RefreshTree()
|
||||
end,
|
||||
|
||||
["BuildLevel"] = function(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,
|
||||
|
||||
["RefreshTree"] = function(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,
|
||||
|
||||
["SetSelected"] = function(self, value)
|
||||
local status = self.status or self.localstatus
|
||||
if status.selected ~= value then
|
||||
status.selected = value
|
||||
self:Fire("OnGroupSelected", value)
|
||||
end
|
||||
end,
|
||||
|
||||
["Select"] = function(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,
|
||||
|
||||
["SelectByPath"] = function(self, ...)
|
||||
self:Select(BuildUniqueValue(...), ...)
|
||||
end,
|
||||
|
||||
["SelectByValue"] = function(self, uniquevalue)
|
||||
self:Select(uniquevalue, ("\001"):split(uniquevalue))
|
||||
end,
|
||||
|
||||
["ShowScroll"] = function(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,
|
||||
|
||||
["OnWidthSet"] = function(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,
|
||||
|
||||
["OnHeightSet"] = function(self, height)
|
||||
local content = self.content
|
||||
local contentheight = height - 20
|
||||
if contentheight < 0 then
|
||||
contentheight = 0
|
||||
end
|
||||
content:SetHeight(contentheight)
|
||||
content.height = contentheight
|
||||
end,
|
||||
|
||||
["SetTreeWidth"] = function(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,
|
||||
|
||||
["LayoutFinished"] = function(self, width, height)
|
||||
if self.noAutoHeight then return end
|
||||
self:SetHeight((height or 0) + 20)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 Constructor()
|
||||
local num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
|
||||
local treeframe = CreateFrame("Frame", nil, frame)
|
||||
treeframe:SetPoint("TOPLEFT")
|
||||
treeframe:SetPoint("BOTTOMLEFT")
|
||||
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
||||
treeframe:EnableMouseWheel(true)
|
||||
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)
|
||||
treeframe:SetScript("OnUpdate", FirstFrameUpdate)
|
||||
treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
|
||||
treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
|
||||
|
||||
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("OnEnter", Dragger_OnEnter)
|
||||
dragger:SetScript("OnLeave", Dragger_OnLeave)
|
||||
dragger:SetScript("OnMouseDown", Dragger_OnMouseDown)
|
||||
dragger:SetScript("OnMouseUp", Dragger_OnMouseUp)
|
||||
|
||||
local scrollbar = CreateFrame("Slider", ("AceConfigDialogTreeGroup%dScrollBar"):format(num), treeframe, "UIPanelScrollBarTemplate")
|
||||
scrollbar:SetScript("OnValueChanged", nil)
|
||||
scrollbar:SetPoint("TOPRIGHT", -10, -26)
|
||||
scrollbar:SetPoint("BOTTOMRIGHT", -10, 26)
|
||||
scrollbar:SetMinMaxValues(0,0)
|
||||
scrollbar:SetValueStep(1)
|
||||
scrollbar:SetValue(0)
|
||||
scrollbar:SetWidth(16)
|
||||
scrollbar:SetScript("OnValueChanged", OnScrollValueChanged)
|
||||
|
||||
local scrollbg = scrollbar:CreateTexture(nil, "BACKGROUND")
|
||||
scrollbg:SetAllPoints(scrollbar)
|
||||
scrollbg:SetTexture(0,0,0,0.4)
|
||||
|
||||
local border = CreateFrame("Frame",nil,frame)
|
||||
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
|
||||
border:SetPoint("BOTTOMRIGHT")
|
||||
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)
|
||||
content:SetPoint("TOPLEFT", 10, -10)
|
||||
content:SetPoint("BOTTOMRIGHT", -10, 10)
|
||||
|
||||
local widget = {
|
||||
frame = frame,
|
||||
lines = {},
|
||||
levels = {},
|
||||
buttons = {},
|
||||
hasChildren = {},
|
||||
localstatus = { groups = {}, scrollvalue = 0 },
|
||||
filter = false,
|
||||
treeframe = treeframe,
|
||||
dragger = dragger,
|
||||
scrollbar = scrollbar,
|
||||
border = border,
|
||||
content = content,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
treeframe.obj, dragger.obj, scrollbar.obj = widget, widget, widget
|
||||
|
||||
return AceGUI:RegisterAsContainer(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -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
|
||||
@@ -0,0 +1,92 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- WoW APIs
|
||||
local _G = _G
|
||||
local PlaySound, CreateFrame, UIParent = PlaySound, CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Button_OnClick(frame, ...)
|
||||
PlaySound("igMainMenuOption")
|
||||
frame.obj:Fire("OnClick", ...)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
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)
|
||||
-- restore default values
|
||||
self:SetHeight(24)
|
||||
self:SetWidth(200)
|
||||
self:SetDisabled(false)
|
||||
self:SetText()
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
self.text:SetText(text)
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
else
|
||||
self.frame:Enable()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local name = "AceGUI30Button" .. AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Button", name, UIParent, "UIPanelButtonTemplate2")
|
||||
frame:Hide()
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnClick", Button_OnClick)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
|
||||
local text = frame:GetFontString()
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("TOPLEFT", 15, -1)
|
||||
text:SetPoint("BOTTOMRIGHT", -15, 1)
|
||||
text:SetJustifyV("MIDDLE")
|
||||
|
||||
local widget = {
|
||||
text = text,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,289 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs = select, pairs
|
||||
|
||||
-- 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: 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")
|
||||
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)
|
||||
end
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function CheckBox_OnMouseUp(frame)
|
||||
local self = frame.obj
|
||||
if not self.disabled then
|
||||
self:ToggleChecked()
|
||||
|
||||
if self.checked then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
else -- for both nil and false (tristate)
|
||||
PlaySound("igMainMenuOptionCheckBoxOff")
|
||||
end
|
||||
|
||||
self:Fire("OnValueChanged", self.checked)
|
||||
AlignImage(self)
|
||||
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())
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
self.text:SetTextColor(0.5, 0.5, 0.5)
|
||||
SetDesaturation(self.check, true)
|
||||
else
|
||||
self.frame:Enable()
|
||||
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,
|
||||
|
||||
["SetValue"] = function(self,value)
|
||||
local check = self.check
|
||||
self.checked = value
|
||||
if value then
|
||||
SetDesaturation(self.check, false)
|
||||
self.check:Show()
|
||||
else
|
||||
--Nil is the unknown tristate value
|
||||
if self.tristate and value == nil then
|
||||
SetDesaturation(self.check, true)
|
||||
self.check:Show()
|
||||
else
|
||||
SetDesaturation(self.check, false)
|
||||
self.check:Hide()
|
||||
end
|
||||
end
|
||||
self:SetDisabled(self.disabled)
|
||||
end,
|
||||
|
||||
["GetValue"] = function(self)
|
||||
return self.checked
|
||||
end,
|
||||
|
||||
["SetTriState"] = function(self, enabled)
|
||||
self.tristate = enabled
|
||||
self:SetValue(self:GetValue())
|
||||
end,
|
||||
|
||||
["SetType"] = function(self, type)
|
||||
local checkbg = self.checkbg
|
||||
local check = self.check
|
||||
local highlight = self.highlight
|
||||
|
||||
local size
|
||||
if type == "radio" then
|
||||
size = 16
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-RadioButton")
|
||||
checkbg:SetTexCoord(0, 0.25, 0, 1)
|
||||
check:SetTexture("Interface\\Buttons\\UI-RadioButton")
|
||||
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)
|
||||
else
|
||||
size = 24
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
|
||||
checkbg:SetTexCoord(0, 1, 0, 1)
|
||||
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
|
||||
check:SetTexCoord(0, 1, 0, 1)
|
||||
check:SetBlendMode("BLEND")
|
||||
highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
|
||||
highlight:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
checkbg:SetHeight(size)
|
||||
checkbg:SetWidth(size)
|
||||
end,
|
||||
|
||||
["ToggleChecked"] = function(self)
|
||||
local value = self:GetValue()
|
||||
if self.tristate then
|
||||
--cycle in true, nil, false order
|
||||
if value then
|
||||
self:SetValue(nil)
|
||||
elseif value == nil then
|
||||
self:SetValue(false)
|
||||
else
|
||||
self:SetValue(true)
|
||||
end
|
||||
else
|
||||
self:SetValue(not self:GetValue())
|
||||
end
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, label)
|
||||
self.text:SetText(label)
|
||||
end,
|
||||
|
||||
["SetDescription"] = function(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:SetWidth(self.frame.width - 30)
|
||||
desc:SetJustifyH("LEFT")
|
||||
desc:SetJustifyV("TOP")
|
||||
self.desc = desc
|
||||
end
|
||||
self.desc:Show()
|
||||
--self.text:SetFontObject(GameFontNormal)
|
||||
self.desc:SetText(desc)
|
||||
self:SetHeight(28 + self.desc:GetHeight())
|
||||
else
|
||||
if self.desc then
|
||||
self.desc:SetText("")
|
||||
self.desc:Hide()
|
||||
end
|
||||
--self.text:SetFontObject(GameFontHighlight)
|
||||
self:SetHeight(24)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetImage"] = function(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = select("#", ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
AlignImage(self)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnMouseDown", CheckBox_OnMouseDown)
|
||||
frame:SetScript("OnMouseUp", CheckBox_OnMouseUp)
|
||||
|
||||
local checkbg = frame:CreateTexture(nil, "ARTWORK")
|
||||
checkbg:SetWidth(24)
|
||||
checkbg:SetHeight(24)
|
||||
checkbg:SetPoint("TOPLEFT")
|
||||
checkbg:SetTexture("Interface\\Buttons\\UI-CheckBox-Up")
|
||||
|
||||
local check = frame:CreateTexture(nil, "OVERLAY")
|
||||
check:SetAllPoints(checkbg)
|
||||
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")
|
||||
highlight:SetTexture("Interface\\Buttons\\UI-CheckBox-Highlight")
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:SetAllPoints(checkbg)
|
||||
|
||||
local image = frame:CreateTexture(nil, "OVERLAY")
|
||||
image:SetHeight(16)
|
||||
image:SetWidth(16)
|
||||
image:SetPoint("LEFT", checkbg, "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
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,186 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- 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: ShowUIPanel, HideUIPanel, ColorPickerFrame, OpacitySliderFrame
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function ColorCallback(self, r, g, b, a, isAlpha)
|
||||
if not self.HasAlpha then
|
||||
a = 1
|
||||
end
|
||||
self:SetColor(r, g, b, a)
|
||||
if ColorPickerFrame:IsVisible() then
|
||||
--colorpicker is still open
|
||||
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)
|
||||
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)
|
||||
HideUIPanel(ColorPickerFrame)
|
||||
local self = frame.obj
|
||||
if not self.disabled then
|
||||
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
ColorPickerFrame.func = function()
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
local a = 1 - OpacitySliderFrame:GetValue()
|
||||
ColorCallback(self, r, g, b, a)
|
||||
end
|
||||
|
||||
ColorPickerFrame.hasOpacity = self.HasAlpha
|
||||
ColorPickerFrame.opacityFunc = function()
|
||||
local r, g, b = ColorPickerFrame:GetColorRGB()
|
||||
local a = 1 - OpacitySliderFrame:GetValue()
|
||||
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)
|
||||
end
|
||||
ColorPickerFrame:SetColorRGB(r, g, b)
|
||||
|
||||
ColorPickerFrame.cancelFunc = function()
|
||||
ColorCallback(self, r, g, b, a, true)
|
||||
end
|
||||
|
||||
ShowUIPanel(ColorPickerFrame)
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
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,
|
||||
|
||||
-- ["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)
|
||||
self.disabled = disabled
|
||||
if self.disabled then
|
||||
self.frame:Disable()
|
||||
self.text:SetTextColor(0.5, 0.5, 0.5)
|
||||
else
|
||||
self.frame:Enable()
|
||||
self.text:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnClick", ColorSwatch_OnClick)
|
||||
|
||||
local colorSwatch = frame:CreateTexture(nil, "OVERLAY")
|
||||
colorSwatch:SetWidth(19)
|
||||
colorSwatch:SetHeight(19)
|
||||
colorSwatch:SetTexture("Interface\\ChatFrame\\ChatFrameColorSwatch")
|
||||
colorSwatch:SetPoint("LEFT")
|
||||
|
||||
local texture = frame:CreateTexture(nil, "BACKGROUND")
|
||||
texture:SetWidth(16)
|
||||
texture:SetHeight(16)
|
||||
texture:SetTexture(1, 1, 1)
|
||||
texture:SetPoint("CENTER", colorSwatch)
|
||||
texture:Show()
|
||||
|
||||
local checkers = frame:CreateTexture(nil, "BACKGROUND")
|
||||
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, "HIGHLIGHT")
|
||||
--highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
|
||||
--highlight:SetBlendMode("ADD")
|
||||
--highlight:SetAllPoints(frame)
|
||||
|
||||
local widget = {
|
||||
colorSwatch = colorSwatch,
|
||||
text = text,
|
||||
frame = frame,
|
||||
type = Type
|
||||
}
|
||||
for method, func in pairs(methods) do
|
||||
widget[method] = func
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,465 @@
|
||||
--[[ $Id: AceGUIWidget-DropDown-Items.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
|
||||
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local select, assert = select, assert
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local CreateFrame = CreateFrame
|
||||
|
||||
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 function fixstrata(strata, parent, ...)
|
||||
local i = 1
|
||||
local child = select(i, ...)
|
||||
parent:SetFrameStrata(strata)
|
||||
while child do
|
||||
fixstrata(strata, child, child:GetChildren())
|
||||
i = i + 1
|
||||
child = select(i, ...)
|
||||
end
|
||||
end
|
||||
|
||||
-- ItemBase is the base "class" for all dropdown items.
|
||||
-- Each item has to use ItemBase.Create(widgetType) to
|
||||
-- create an initial 'self' value.
|
||||
-- ItemBase will add common functions and ui event handlers.
|
||||
-- Be sure to keep basic usage when you override functions.
|
||||
|
||||
local ItemBase = {
|
||||
-- NOTE: The ItemBase version is added to each item's version number
|
||||
-- to ensure proper updates on ItemBase changes.
|
||||
-- Use at least 1000er steps.
|
||||
version = 1000,
|
||||
counter = 0,
|
||||
}
|
||||
|
||||
function ItemBase.Frame_OnEnter(this)
|
||||
local self = this.obj
|
||||
|
||||
if self.useHighlight then
|
||||
self.highlight:Show()
|
||||
end
|
||||
self:Fire("OnEnter")
|
||||
|
||||
if self.specialOnEnter then
|
||||
self.specialOnEnter(self)
|
||||
end
|
||||
end
|
||||
|
||||
function ItemBase.Frame_OnLeave(this)
|
||||
local self = this.obj
|
||||
|
||||
self.highlight:Hide()
|
||||
self:Fire("OnLeave")
|
||||
|
||||
if self.specialOnLeave then
|
||||
self.specialOnLeave(self)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported, AceGUI callback
|
||||
function ItemBase.OnAcquire(self)
|
||||
self.frame:SetToplevel(true)
|
||||
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
end
|
||||
|
||||
-- exported, AceGUI callback
|
||||
function ItemBase.OnRelease(self)
|
||||
self:SetDisabled(false)
|
||||
self.pullout = nil
|
||||
self.frame:SetParent(nil)
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- exported
|
||||
-- NOTE: this is called by a Dropdown-Pullout.
|
||||
-- Do not call this method directly
|
||||
function ItemBase.SetPullout(self, pullout)
|
||||
self.pullout = pullout
|
||||
|
||||
self.frame:SetParent(nil)
|
||||
self.frame:SetParent(pullout.itemFrame)
|
||||
self.parent = pullout.itemFrame
|
||||
fixlevels(pullout.itemFrame, pullout.itemFrame:GetChildren())
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.SetText(self, text)
|
||||
self.text:SetText(text or "")
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.GetText(self)
|
||||
return self.text:GetText()
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.SetPoint(self, ...)
|
||||
self.frame:SetPoint(...)
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.Show(self)
|
||||
self.frame:Show()
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.Hide(self)
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- exported
|
||||
function ItemBase.SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.useHighlight = false
|
||||
self.text:SetTextColor(.5, .5, .5)
|
||||
else
|
||||
self.useHighlight = true
|
||||
self.text:SetTextColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
-- NOTE: this is called by a Dropdown-Pullout.
|
||||
-- Do not call this method directly
|
||||
function ItemBase.SetOnLeave(self, func)
|
||||
self.specialOnLeave = func
|
||||
end
|
||||
|
||||
-- exported
|
||||
-- NOTE: this is called by a Dropdown-Pullout.
|
||||
-- Do not call this method directly
|
||||
function ItemBase.SetOnEnter(self, func)
|
||||
self.specialOnEnter = func
|
||||
end
|
||||
|
||||
function ItemBase.Create(type)
|
||||
-- NOTE: Most of the following code is copied from AceGUI-3.0/Dropdown widget
|
||||
local count = AceGUI:GetNextWidgetNum(type)
|
||||
local frame = CreateFrame("Button", "AceGUI30DropDownItem"..count)
|
||||
local self = {}
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
self.type = type
|
||||
|
||||
self.useHighlight = true
|
||||
|
||||
frame:SetHeight(17)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
local text = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
||||
text:SetTextColor(1,1,1)
|
||||
text:SetJustifyH("LEFT")
|
||||
text:SetPoint("TOPLEFT",frame,"TOPLEFT",18,0)
|
||||
text:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-8,0)
|
||||
self.text = text
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "OVERLAY")
|
||||
highlight:SetTexture("Interface\\QuestFrame\\UI-QuestTitleHighlight")
|
||||
highlight:SetBlendMode("ADD")
|
||||
highlight:SetHeight(14)
|
||||
highlight:ClearAllPoints()
|
||||
highlight:SetPoint("RIGHT",frame,"RIGHT",-3,0)
|
||||
highlight:SetPoint("LEFT",frame,"LEFT",5,0)
|
||||
highlight:Hide()
|
||||
self.highlight = highlight
|
||||
|
||||
local check = frame:CreateTexture("OVERLAY")
|
||||
check:SetWidth(16)
|
||||
check:SetHeight(16)
|
||||
check:SetPoint("LEFT",frame,"LEFT",3,-1)
|
||||
check:SetTexture("Interface\\Buttons\\UI-CheckBox-Check")
|
||||
check:Hide()
|
||||
self.check = check
|
||||
|
||||
local sub = frame:CreateTexture("OVERLAY")
|
||||
sub:SetWidth(16)
|
||||
sub:SetHeight(16)
|
||||
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
|
||||
sub:SetTexture("Interface\\ChatFrame\\ChatFrameExpandArrow")
|
||||
sub:Hide()
|
||||
self.sub = sub
|
||||
|
||||
frame:SetScript("OnEnter", ItemBase.Frame_OnEnter)
|
||||
frame:SetScript("OnLeave", ItemBase.Frame_OnLeave)
|
||||
|
||||
self.OnAcquire = ItemBase.OnAcquire
|
||||
self.OnRelease = ItemBase.OnRelease
|
||||
|
||||
self.SetPullout = ItemBase.SetPullout
|
||||
self.GetText = ItemBase.GetText
|
||||
self.SetText = ItemBase.SetText
|
||||
self.SetDisabled = ItemBase.SetDisabled
|
||||
|
||||
self.SetPoint = ItemBase.SetPoint
|
||||
self.Show = ItemBase.Show
|
||||
self.Hide = ItemBase.Hide
|
||||
|
||||
self.SetOnLeave = ItemBase.SetOnLeave
|
||||
self.SetOnEnter = ItemBase.SetOnEnter
|
||||
|
||||
return self
|
||||
end
|
||||
|
||||
--[[
|
||||
Template for items:
|
||||
|
||||
-- Item:
|
||||
--
|
||||
do
|
||||
local widgetType = "Dropdown-Item-"
|
||||
local widgetVersion = 1
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
--]]
|
||||
|
||||
-- Item: Header
|
||||
-- A single text entry.
|
||||
-- Special: Different text color and no highlight
|
||||
do
|
||||
local widgetType = "Dropdown-Item-Header"
|
||||
local widgetVersion = 1
|
||||
|
||||
local function OnEnter(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnEnter")
|
||||
|
||||
if self.specialOnEnter then
|
||||
self.specialOnEnter(self)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnLeave(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnLeave")
|
||||
|
||||
if self.specialOnLeave then
|
||||
self.specialOnLeave(self)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported, override
|
||||
local function SetDisabled(self, disabled)
|
||||
ItemBase.SetDisabled(self, disabled)
|
||||
if not disabled then
|
||||
self.text:SetTextColor(1, 1, 0)
|
||||
end
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
self.SetDisabled = SetDisabled
|
||||
|
||||
self.frame:SetScript("OnEnter", OnEnter)
|
||||
self.frame:SetScript("OnLeave", OnLeave)
|
||||
|
||||
self.text:SetTextColor(1, 1, 0)
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
|
||||
-- Item: Execute
|
||||
-- A simple button
|
||||
do
|
||||
local widgetType = "Dropdown-Item-Execute"
|
||||
local widgetVersion = 1
|
||||
|
||||
local function Frame_OnClick(this, button)
|
||||
local self = this.obj
|
||||
if self.disabled then return end
|
||||
self:Fire("OnClick")
|
||||
if self.pullout then
|
||||
self.pullout:Close()
|
||||
end
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
self.frame:SetScript("OnClick", Frame_OnClick)
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
|
||||
-- Item: Toggle
|
||||
-- Some sort of checkbox for dropdown menus.
|
||||
-- Does not close the pullout on click.
|
||||
do
|
||||
local widgetType = "Dropdown-Item-Toggle"
|
||||
local widgetVersion = 3
|
||||
|
||||
local function UpdateToggle(self)
|
||||
if self.value then
|
||||
self.check:Show()
|
||||
else
|
||||
self.check:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
local function OnRelease(self)
|
||||
ItemBase.OnRelease(self)
|
||||
self:SetValue(nil)
|
||||
end
|
||||
|
||||
local function Frame_OnClick(this, button)
|
||||
local self = this.obj
|
||||
if self.disabled then return end
|
||||
self.value = not self.value
|
||||
if self.value then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
else
|
||||
PlaySound("igMainMenuOptionCheckBoxOff")
|
||||
end
|
||||
UpdateToggle(self)
|
||||
self:Fire("OnValueChanged", self.value)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetValue(self, value)
|
||||
self.value = value
|
||||
UpdateToggle(self)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function GetValue(self)
|
||||
return self.value
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
self.frame:SetScript("OnClick", Frame_OnClick)
|
||||
|
||||
self.SetValue = SetValue
|
||||
self.GetValue = GetValue
|
||||
self.OnRelease = OnRelease
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
|
||||
-- Item: Menu
|
||||
-- Shows a submenu on mouse over
|
||||
-- Does not close the pullout on click
|
||||
do
|
||||
local widgetType = "Dropdown-Item-Menu"
|
||||
local widgetVersion = 2
|
||||
|
||||
local function OnEnter(this)
|
||||
local self = this.obj
|
||||
self:Fire("OnEnter")
|
||||
|
||||
if self.specialOnEnter then
|
||||
self.specialOnEnter(self)
|
||||
end
|
||||
|
||||
self.highlight:Show()
|
||||
|
||||
if not self.disabled and self.submenu then
|
||||
self.submenu:Open("TOPLEFT", self.frame, "TOPRIGHT", self.pullout:GetRightBorderWidth(), 0, self.frame:GetFrameLevel() + 100)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnHide(this)
|
||||
local self = this.obj
|
||||
if self.submenu then
|
||||
self.submenu:Close()
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetMenu(self, menu)
|
||||
assert(menu.type == "Dropdown-Pullout")
|
||||
self.submenu = menu
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function CloseMenu(self)
|
||||
self.submenu:Close()
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
self.sub:Show()
|
||||
|
||||
self.frame:SetScript("OnEnter", OnEnter)
|
||||
self.frame:SetScript("OnHide", OnHide)
|
||||
|
||||
self.SetMenu = SetMenu
|
||||
self.CloseMenu = CloseMenu
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
|
||||
-- Item: Separator
|
||||
-- A single line to separate items
|
||||
do
|
||||
local widgetType = "Dropdown-Item-Separator"
|
||||
local widgetVersion = 1
|
||||
|
||||
-- exported, override
|
||||
local function SetDisabled(self, disabled)
|
||||
ItemBase.SetDisabled(self, disabled)
|
||||
self.useHighlight = false
|
||||
end
|
||||
|
||||
local function Constructor()
|
||||
local self = ItemBase.Create(widgetType)
|
||||
|
||||
self.SetDisabled = SetDisabled
|
||||
|
||||
local line = self.frame:CreateTexture(nil, "OVERLAY")
|
||||
line:SetHeight(1)
|
||||
line:SetTexture(.5, .5, .5)
|
||||
line:SetPoint("LEFT", self.frame, "LEFT", 10, 0)
|
||||
line:SetPoint("RIGHT", self.frame, "RIGHT", -10, 0)
|
||||
|
||||
self.text:Hide()
|
||||
|
||||
self.useHighlight = false
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion + ItemBase.version)
|
||||
end
|
||||
@@ -0,0 +1,707 @@
|
||||
--[[ $Id: AceGUIWidget-DropDown.lua 916 2010-03-15 12:24:36Z nevcairiel $ ]]--
|
||||
local AceGUI = LibStub("AceGUI-3.0")
|
||||
|
||||
-- Lua APIs
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
local select, pairs, ipairs = select, pairs, ipairs
|
||||
local tsort = table.sort
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local UIParent, CreateFrame = UIParent, CreateFrame
|
||||
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: CLOSE
|
||||
|
||||
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 function fixstrata(strata, parent, ...)
|
||||
local i = 1
|
||||
local child = select(i, ...)
|
||||
parent:SetFrameStrata(strata)
|
||||
while child do
|
||||
fixstrata(strata, child, child:GetChildren())
|
||||
i = i + 1
|
||||
child = select(i, ...)
|
||||
end
|
||||
end
|
||||
|
||||
do
|
||||
local widgetType = "Dropdown-Pullout"
|
||||
local widgetVersion = 3
|
||||
|
||||
--[[ Static data ]]--
|
||||
|
||||
local backdrop = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\DialogFrame\\UI-DialogBox-Border",
|
||||
edgeSize = 32,
|
||||
tileSize = 32,
|
||||
tile = true,
|
||||
insets = { left = 11, right = 12, top = 12, bottom = 11 },
|
||||
}
|
||||
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 = 3, bottom = 3 }
|
||||
}
|
||||
|
||||
local defaultWidth = 200
|
||||
local defaultMaxHeight = 600
|
||||
|
||||
--[[ UI Event Handlers ]]--
|
||||
|
||||
-- HACK: This should be no part of the pullout, but there
|
||||
-- is no other 'clean' way to response to any item-OnEnter
|
||||
-- Used to close Submenus when an other item is entered
|
||||
local function OnEnter(item)
|
||||
local self = item.pullout
|
||||
for k, v in ipairs(self.items) do
|
||||
if v.CloseMenu and v ~= item then
|
||||
v:CloseMenu()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- See the note in Constructor() for each scroll related function
|
||||
local function OnMouseWheel(this, value)
|
||||
this.obj:MoveScroll(value)
|
||||
end
|
||||
|
||||
local function OnScrollValueChanged(this, value)
|
||||
this.obj:SetScroll(value)
|
||||
end
|
||||
|
||||
local function OnSizeChanged(this)
|
||||
this.obj:FixScroll()
|
||||
end
|
||||
|
||||
--[[ Exported methods ]]--
|
||||
|
||||
-- exported
|
||||
local function SetScroll(self, value)
|
||||
local status = self.scrollStatus
|
||||
local frame, child = self.scrollFrame, self.itemFrame
|
||||
local height, viewheight = frame:GetHeight(), child:GetHeight()
|
||||
|
||||
local offset
|
||||
if height > viewheight then
|
||||
offset = 0
|
||||
else
|
||||
offset = floor((viewheight - height) / 1000 * value)
|
||||
end
|
||||
child:ClearAllPoints()
|
||||
child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
|
||||
child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", self.slider:IsShown() and -12 or 0, offset)
|
||||
status.offset = offset
|
||||
status.scrollvalue = value
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function MoveScroll(self, value)
|
||||
local status = self.scrollStatus
|
||||
local frame, child = self.scrollFrame, self.itemFrame
|
||||
local height, viewheight = frame:GetHeight(), child:GetHeight()
|
||||
|
||||
if height > viewheight then
|
||||
self.slider:Hide()
|
||||
else
|
||||
self.slider:Show()
|
||||
local diff = height - viewheight
|
||||
local delta = 1
|
||||
if value < 0 then
|
||||
delta = -1
|
||||
end
|
||||
self.slider:SetValue(min(max(status.scrollvalue + delta*(1000/(diff/45)),0), 1000))
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function FixScroll(self)
|
||||
local status = self.scrollStatus
|
||||
local frame, child = self.scrollFrame, self.itemFrame
|
||||
local height, viewheight = frame:GetHeight(), child:GetHeight()
|
||||
local offset = status.offset or 0
|
||||
|
||||
if viewheight < height then
|
||||
self.slider:Hide()
|
||||
child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, offset)
|
||||
self.slider:SetValue(0)
|
||||
else
|
||||
self.slider:Show()
|
||||
local value = (offset / (viewheight - height) * 1000)
|
||||
if value > 1000 then value = 1000 end
|
||||
self.slider:SetValue(value)
|
||||
self:SetScroll(value)
|
||||
if value < 1000 then
|
||||
child:ClearAllPoints()
|
||||
child:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, offset)
|
||||
child:SetPoint("TOPRIGHT", frame, "TOPRIGHT", -12, offset)
|
||||
status.offset = offset
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- exported, AceGUI callback
|
||||
local function OnAcquire(self)
|
||||
self.frame:SetParent(UIParent)
|
||||
--self.itemFrame:SetToplevel(true)
|
||||
end
|
||||
|
||||
-- exported, AceGUI callback
|
||||
local function OnRelease(self)
|
||||
self:Clear()
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function AddItem(self, item)
|
||||
self.items[#self.items + 1] = item
|
||||
|
||||
local h = #self.items * 16
|
||||
self.itemFrame:SetHeight(h)
|
||||
self.frame:SetHeight(min(h + 34, self.maxHeight)) -- +34: 20 for scrollFrame placement (10 offset) and +14 for item placement
|
||||
|
||||
item.frame:SetPoint("LEFT", self.itemFrame, "LEFT")
|
||||
item.frame:SetPoint("RIGHT", self.itemFrame, "RIGHT")
|
||||
|
||||
item:SetPullout(self)
|
||||
item:SetOnEnter(OnEnter)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function Open(self, point, relFrame, relPoint, x, y)
|
||||
local items = self.items
|
||||
local frame = self.frame
|
||||
local itemFrame = self.itemFrame
|
||||
|
||||
frame:SetPoint(point, relFrame, relPoint, x, y)
|
||||
|
||||
|
||||
local height = 8
|
||||
for i, item in pairs(items) do
|
||||
if i == 1 then
|
||||
item:SetPoint("TOP", itemFrame, "TOP", 0, -2)
|
||||
else
|
||||
item:SetPoint("TOP", items[i-1].frame, "BOTTOM", 0, 1)
|
||||
end
|
||||
|
||||
item:Show()
|
||||
|
||||
height = height + 16
|
||||
end
|
||||
itemFrame:SetHeight(height)
|
||||
fixstrata("TOOLTIP", frame, frame:GetChildren())
|
||||
frame:Show()
|
||||
self:Fire("OnOpen")
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function Close(self)
|
||||
self.frame:Hide()
|
||||
self:Fire("OnClose")
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function Clear(self)
|
||||
local items = self.items
|
||||
for i, item in pairs(items) do
|
||||
AceGUI:Release(item)
|
||||
items[i] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function IterateItems(self)
|
||||
return ipairs(self.items)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetHideOnLeave(self, val)
|
||||
self.hideOnLeave = val
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetMaxHeight(self, height)
|
||||
self.maxHeight = height or defaultMaxHeight
|
||||
if self.frame:GetHeight() > height then
|
||||
self.frame:SetHeight(height)
|
||||
elseif (self.itemFrame:GetHeight() + 34) < height then
|
||||
self.frame:SetHeight(self.itemFrame:GetHeight() + 34) -- see :AddItem
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function GetRightBorderWidth(self)
|
||||
return 6 + (self.slider:IsShown() and 12 or 0)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function GetLeftBorderWidth(self)
|
||||
return 6
|
||||
end
|
||||
|
||||
--[[ Constructor ]]--
|
||||
|
||||
local function Constructor()
|
||||
local count = AceGUI:GetNextWidgetNum(widgetType)
|
||||
local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent)
|
||||
local self = {}
|
||||
self.count = count
|
||||
self.type = widgetType
|
||||
self.frame = frame
|
||||
frame.obj = self
|
||||
|
||||
self.OnAcquire = OnAcquire
|
||||
self.OnRelease = OnRelease
|
||||
|
||||
self.AddItem = AddItem
|
||||
self.Open = Open
|
||||
self.Close = Close
|
||||
self.Clear = Clear
|
||||
self.IterateItems = IterateItems
|
||||
self.SetHideOnLeave = SetHideOnLeave
|
||||
|
||||
self.SetScroll = SetScroll
|
||||
self.MoveScroll = MoveScroll
|
||||
self.FixScroll = FixScroll
|
||||
|
||||
self.SetMaxHeight = SetMaxHeight
|
||||
self.GetRightBorderWidth = GetRightBorderWidth
|
||||
self.GetLeftBorderWidth = GetLeftBorderWidth
|
||||
|
||||
self.items = {}
|
||||
|
||||
self.scrollStatus = {
|
||||
scrollvalue = 0,
|
||||
}
|
||||
|
||||
self.maxHeight = defaultMaxHeight
|
||||
|
||||
frame:SetBackdrop(backdrop)
|
||||
frame:SetBackdropColor(0, 0, 0)
|
||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
frame:SetClampedToScreen(true)
|
||||
frame:SetWidth(defaultWidth)
|
||||
frame:SetHeight(self.maxHeight)
|
||||
--frame:SetToplevel(true)
|
||||
|
||||
-- NOTE: The whole scroll frame code is copied from the AceGUI-3.0 widget ScrollFrame
|
||||
local scrollFrame = CreateFrame("ScrollFrame", nil, frame)
|
||||
local itemFrame = CreateFrame("Frame", nil, scrollFrame)
|
||||
|
||||
self.scrollFrame = scrollFrame
|
||||
self.itemFrame = itemFrame
|
||||
|
||||
scrollFrame.obj = self
|
||||
itemFrame.obj = self
|
||||
|
||||
local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame)
|
||||
slider:SetOrientation("VERTICAL")
|
||||
slider:SetHitRectInsets(0, 0, -10, 0)
|
||||
slider:SetBackdrop(sliderBackdrop)
|
||||
slider:SetWidth(8)
|
||||
slider:SetThumbTexture("Interface\\Buttons\\UI-SliderBar-Button-Vertical")
|
||||
slider:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
self.slider = slider
|
||||
slider.obj = self
|
||||
|
||||
scrollFrame:SetScrollChild(itemFrame)
|
||||
scrollFrame:SetPoint("TOPLEFT", frame, "TOPLEFT", 6, -12)
|
||||
scrollFrame:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -6, 12)
|
||||
scrollFrame:EnableMouseWheel(true)
|
||||
scrollFrame:SetScript("OnMouseWheel", OnMouseWheel)
|
||||
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
|
||||
scrollFrame:SetToplevel(true)
|
||||
scrollFrame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
itemFrame:SetPoint("TOPLEFT", scrollFrame, "TOPLEFT", 0, 0)
|
||||
itemFrame:SetPoint("TOPRIGHT", scrollFrame, "TOPRIGHT", -12, 0)
|
||||
itemFrame:SetHeight(400)
|
||||
itemFrame:SetToplevel(true)
|
||||
itemFrame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||
|
||||
slider:SetPoint("TOPLEFT", scrollFrame, "TOPRIGHT", -16, 0)
|
||||
slider:SetPoint("BOTTOMLEFT", scrollFrame, "BOTTOMRIGHT", -16, 0)
|
||||
slider:SetScript("OnValueChanged", OnScrollValueChanged)
|
||||
slider:SetMinMaxValues(0, 1000)
|
||||
slider:SetValueStep(1)
|
||||
slider:SetValue(0)
|
||||
|
||||
scrollFrame:Show()
|
||||
itemFrame:Show()
|
||||
slider:Hide()
|
||||
|
||||
self:FixScroll()
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
|
||||
end
|
||||
|
||||
do
|
||||
local widgetType = "Dropdown"
|
||||
local widgetVersion = 22
|
||||
|
||||
--[[ Static data ]]--
|
||||
|
||||
--[[ UI event handler ]]--
|
||||
|
||||
local function Control_OnEnter(this)
|
||||
this.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(this)
|
||||
this.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Dropdown_OnHide(this)
|
||||
local self = this.obj
|
||||
if self.open then
|
||||
self.pullout:Close()
|
||||
end
|
||||
end
|
||||
|
||||
local function Dropdown_TogglePullout(this)
|
||||
local self = this.obj
|
||||
PlaySound("igMainMenuOptionCheckBoxOn") -- missleading name, but the Blizzard code uses this sound
|
||||
if self.open then
|
||||
self.open = nil
|
||||
self.pullout:Close()
|
||||
AceGUI:ClearFocus()
|
||||
else
|
||||
self.open = true
|
||||
self.pullout:SetWidth(self.frame:GetWidth())
|
||||
self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
|
||||
AceGUI:SetFocus(self)
|
||||
end
|
||||
end
|
||||
|
||||
local function OnPulloutOpen(this)
|
||||
local self = this.userdata.obj
|
||||
local value = self.value
|
||||
|
||||
if not self.multiselect then
|
||||
for i, item in this:IterateItems() do
|
||||
item:SetValue(item.userdata.value == value)
|
||||
end
|
||||
end
|
||||
|
||||
self.open = true
|
||||
end
|
||||
|
||||
local function OnPulloutClose(this)
|
||||
local self = this.userdata.obj
|
||||
self.open = nil
|
||||
self:Fire("OnClosed")
|
||||
end
|
||||
|
||||
local function ShowMultiText(self)
|
||||
local text
|
||||
for i, widget in self.pullout:IterateItems() do
|
||||
if widget.type == "Dropdown-Item-Toggle" then
|
||||
if widget:GetValue() then
|
||||
if text then
|
||||
text = text..", "..widget:GetText()
|
||||
else
|
||||
text = widget:GetText()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
self:SetText(text)
|
||||
end
|
||||
|
||||
local function OnItemValueChanged(this, event, checked)
|
||||
local self = this.userdata.obj
|
||||
|
||||
if self.multiselect then
|
||||
self:Fire("OnValueChanged", this.userdata.value, checked)
|
||||
ShowMultiText(self)
|
||||
else
|
||||
if checked then
|
||||
self:SetValue(this.userdata.value)
|
||||
self:Fire("OnValueChanged", this.userdata.value)
|
||||
else
|
||||
this:SetValue(true)
|
||||
end
|
||||
if self.open then
|
||||
self.pullout:Close()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[ Exported methods ]]--
|
||||
|
||||
-- exported, AceGUI callback
|
||||
local function OnAcquire(self)
|
||||
local pullout = AceGUI:Create("Dropdown-Pullout")
|
||||
self.pullout = pullout
|
||||
pullout.userdata.obj = self
|
||||
pullout:SetCallback("OnClose", OnPulloutClose)
|
||||
pullout:SetCallback("OnOpen", OnPulloutOpen)
|
||||
self.pullout.frame:SetFrameLevel(self.frame:GetFrameLevel() + 1)
|
||||
fixlevels(self.pullout.frame, self.pullout.frame:GetChildren())
|
||||
|
||||
self:SetHeight(44)
|
||||
self:SetWidth(200)
|
||||
end
|
||||
|
||||
-- exported, AceGUI callback
|
||||
local function OnRelease(self)
|
||||
if self.open then
|
||||
self.pullout:Close()
|
||||
end
|
||||
AceGUI:Release(self.pullout)
|
||||
self.pullout = nil
|
||||
|
||||
self:SetText("")
|
||||
self:SetLabel("")
|
||||
self:SetDisabled(false)
|
||||
self:SetMultiselect(false)
|
||||
|
||||
self.value = nil
|
||||
self.list = nil
|
||||
self.open = nil
|
||||
self.hasClose = nil
|
||||
|
||||
self.frame:ClearAllPoints()
|
||||
self.frame:Hide()
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetDisabled(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.text:SetTextColor(0.5,0.5,0.5)
|
||||
self.button:Disable()
|
||||
self.label:SetTextColor(0.5,0.5,0.5)
|
||||
else
|
||||
self.button:Enable()
|
||||
self.label:SetTextColor(1,.82,0)
|
||||
self.text:SetTextColor(1,1,1)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function ClearFocus(self)
|
||||
if self.open then
|
||||
self.pullout:Close()
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetText(self, text)
|
||||
self.text:SetText(text or "")
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetLabel(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:SetText(text)
|
||||
self.label:Show()
|
||||
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
|
||||
self.frame:SetHeight(44)
|
||||
else
|
||||
self.label:SetText("")
|
||||
self.label:Hide()
|
||||
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,0)
|
||||
self.frame:SetHeight(26)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetValue(self, value)
|
||||
if self.list then
|
||||
self:SetText(self.list[value] or "")
|
||||
end
|
||||
self.value = value
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function GetValue(self)
|
||||
return self.value
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetItemValue(self, item, value)
|
||||
if not self.multiselect then return end
|
||||
for i, widget in self.pullout:IterateItems() do
|
||||
if widget.userdata.value == item then
|
||||
if widget.SetValue then
|
||||
widget:SetValue(value)
|
||||
end
|
||||
end
|
||||
end
|
||||
ShowMultiText(self)
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetItemDisabled(self, item, disabled)
|
||||
for i, widget in self.pullout:IterateItems() do
|
||||
if widget.userdata.value == item then
|
||||
widget:SetDisabled(disabled)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function AddListItem(self, value, text)
|
||||
local item = AceGUI:Create("Dropdown-Item-Toggle")
|
||||
item:SetText(text)
|
||||
item.userdata.obj = self
|
||||
item.userdata.value = value
|
||||
item:SetCallback("OnValueChanged", OnItemValueChanged)
|
||||
self.pullout:AddItem(item)
|
||||
end
|
||||
|
||||
local function AddCloseButton(self)
|
||||
if not self.hasClose then
|
||||
local close = AceGUI:Create("Dropdown-Item-Execute")
|
||||
close:SetText(CLOSE)
|
||||
self.pullout:AddItem(close)
|
||||
self.hasClose = true
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local sortlist = {}
|
||||
local function SetList(self, list)
|
||||
self.list = list
|
||||
self.pullout:Clear()
|
||||
self.hasClose = nil
|
||||
if not list then return end
|
||||
|
||||
for v in pairs(list) do
|
||||
sortlist[#sortlist + 1] = v
|
||||
end
|
||||
tsort(sortlist)
|
||||
|
||||
for i, value in pairs(sortlist) do
|
||||
AddListItem(self, value, list[value])
|
||||
sortlist[i] = nil
|
||||
end
|
||||
if self.multiselect then
|
||||
ShowMultiText(self)
|
||||
AddCloseButton(self)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function AddItem(self, value, text)
|
||||
if self.list then
|
||||
self.list[value] = text
|
||||
AddListItem(self, value, text)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function SetMultiselect(self, multi)
|
||||
self.multiselect = multi
|
||||
if multi then
|
||||
ShowMultiText(self)
|
||||
AddCloseButton(self)
|
||||
end
|
||||
end
|
||||
|
||||
-- exported
|
||||
local function GetMultiselect(self)
|
||||
return self.multiselect
|
||||
end
|
||||
|
||||
--[[ Constructor ]]--
|
||||
|
||||
local function Constructor()
|
||||
local count = AceGUI:GetNextWidgetNum(widgetType)
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
local dropdown = CreateFrame("Frame", "AceGUI30DropDown"..count, frame, "UIDropDownMenuTemplate")
|
||||
|
||||
local self = {}
|
||||
self.type = widgetType
|
||||
self.frame = frame
|
||||
self.dropdown = dropdown
|
||||
self.count = count
|
||||
frame.obj = self
|
||||
dropdown.obj = self
|
||||
|
||||
self.OnRelease = OnRelease
|
||||
self.OnAcquire = OnAcquire
|
||||
|
||||
self.ClearFocus = ClearFocus
|
||||
|
||||
self.SetText = SetText
|
||||
self.SetValue = SetValue
|
||||
self.GetValue = GetValue
|
||||
self.SetList = SetList
|
||||
self.SetLabel = SetLabel
|
||||
self.SetDisabled = SetDisabled
|
||||
self.AddItem = AddItem
|
||||
self.SetMultiselect = SetMultiselect
|
||||
self.GetMultiselect = GetMultiselect
|
||||
self.SetItemValue = SetItemValue
|
||||
self.SetItemDisabled = SetItemDisabled
|
||||
|
||||
self.alignoffset = 31
|
||||
|
||||
frame:SetHeight(44)
|
||||
frame:SetWidth(200)
|
||||
frame:SetScript("OnHide",Dropdown_OnHide)
|
||||
|
||||
dropdown:ClearAllPoints()
|
||||
dropdown:SetPoint("TOPLEFT",frame,"TOPLEFT",-15,0)
|
||||
dropdown:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",17,0)
|
||||
dropdown:SetScript("OnHide", nil)
|
||||
|
||||
local left = _G[dropdown:GetName() .. "Left"]
|
||||
local middle = _G[dropdown:GetName() .. "Middle"]
|
||||
local right = _G[dropdown:GetName() .. "Right"]
|
||||
|
||||
middle:ClearAllPoints()
|
||||
right:ClearAllPoints()
|
||||
|
||||
middle:SetPoint("LEFT", left, "RIGHT", 0, 0)
|
||||
middle:SetPoint("RIGHT", right, "LEFT", 0, 0)
|
||||
right:SetPoint("TOPRIGHT", dropdown, "TOPRIGHT", 0, 17)
|
||||
|
||||
local button = _G[dropdown:GetName() .. "Button"]
|
||||
self.button = button
|
||||
button.obj = self
|
||||
button:SetScript("OnEnter",Control_OnEnter)
|
||||
button:SetScript("OnLeave",Control_OnLeave)
|
||||
button:SetScript("OnClick",Dropdown_TogglePullout)
|
||||
|
||||
local text = _G[dropdown:GetName() .. "Text"]
|
||||
self.text = text
|
||||
text.obj = self
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("RIGHT", right, "RIGHT" ,-43, 2)
|
||||
text:SetPoint("LEFT", left, "LEFT", 25, 2)
|
||||
|
||||
local label = frame:CreateFontString(nil,"OVERLAY","GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT",frame,"TOPLEFT",0,0)
|
||||
label:SetPoint("TOPRIGHT",frame,"TOPRIGHT",0,0)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetHeight(18)
|
||||
label:Hide()
|
||||
self.label = label
|
||||
|
||||
AceGUI:RegisterAsWidget(self)
|
||||
return self
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(widgetType, Constructor, widgetVersion)
|
||||
end
|
||||
@@ -0,0 +1,232 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local tostring, pairs = tostring, pairs
|
||||
|
||||
-- WoW APIs
|
||||
local PlaySound = PlaySound
|
||||
local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, GetSpellInfo
|
||||
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: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
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
|
||||
local editbox = _G["AceGUI-3.0EditBox"..i]
|
||||
if editbox and editbox:IsVisible() and editbox:HasFocus() then
|
||||
editbox:Insert(text)
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function ShowButton(self)
|
||||
if not self.disablebutton 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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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)
|
||||
if not cancel then
|
||||
PlaySound("igMainMenuOptionCheckBoxOn")
|
||||
HideButton(self)
|
||||
end
|
||||
end
|
||||
|
||||
local function EditBox_OnReceiveDrag(frame)
|
||||
local self = frame.obj
|
||||
local type, id, info = GetCursorInfo()
|
||||
if type == "item" then
|
||||
self:SetText(info)
|
||||
self:Fire("OnEnterPressed", info)
|
||||
ClearCursor()
|
||||
elseif type == "spell" then
|
||||
local name = GetSpellInfo(id, info)
|
||||
self:SetText(name)
|
||||
self:Fire("OnEnterPressed", name)
|
||||
ClearCursor()
|
||||
end
|
||||
HideButton(self)
|
||||
AceGUI:ClearFocus()
|
||||
end
|
||||
|
||||
local function EditBox_OnTextChanged(frame)
|
||||
local self = frame.obj
|
||||
local value = frame:GetText()
|
||||
if tostring(value) ~= tostring(self.lasttext) then
|
||||
self:Fire("OnTextChanged", value)
|
||||
self.lasttext = value
|
||||
ShowButton(self)
|
||||
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)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.editbox:EnableMouse(false)
|
||||
self.editbox:ClearFocus()
|
||||
self.editbox:SetTextColor(0.5,0.5,0.5)
|
||||
self.label:SetTextColor(0.5,0.5,0.5)
|
||||
else
|
||||
self.editbox:EnableMouse(true)
|
||||
self.editbox:SetTextColor(1,1,1)
|
||||
self.label:SetTextColor(1,.82,0)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetText"] = function(self, text)
|
||||
self.lasttext = text or ""
|
||||
self.editbox:SetText(text or "")
|
||||
self.editbox:SetCursorPosition(0)
|
||||
HideButton(self)
|
||||
end,
|
||||
|
||||
["GetText"] = function(self, text)
|
||||
return self.editbox:GetText()
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:SetText(text)
|
||||
self.label:Show()
|
||||
self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,-18)
|
||||
self:SetHeight(44)
|
||||
self.alignoffset = 30
|
||||
else
|
||||
self.label:SetText("")
|
||||
self.label:Hide()
|
||||
self.editbox:SetPoint("TOPLEFT",self.frame,"TOPLEFT",7,0)
|
||||
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 num = AceGUI:GetNextWidgetNum(Type)
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
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("OnReceiveDrag", EditBox_OnReceiveDrag)
|
||||
editbox:SetScript("OnMouseDown", EditBox_OnReceiveDrag)
|
||||
editbox:SetTextInsets(0, 0, 3, 3)
|
||||
editbox:SetMaxLetters(256)
|
||||
editbox:SetPoint("BOTTOMLEFT", 6, 0)
|
||||
editbox:SetPoint("BOTTOMRIGHT")
|
||||
editbox:SetHeight(19)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", 0, -2)
|
||||
label:SetPoint("TOPRIGHT", 0, -2)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetHeight(18)
|
||||
|
||||
local button = CreateFrame("Button", nil, editbox, "UIPanelButtonTemplate")
|
||||
button:SetWidth(40)
|
||||
button:SetHeight(20)
|
||||
button:SetPoint("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
|
||||
end
|
||||
editbox.obj, button.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,78 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetText()
|
||||
self:SetFullWidth()
|
||||
self:SetHeight(18)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetText"] = function(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)
|
||||
self.right:Hide()
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
local label = frame:CreateFontString(nil, "BACKGROUND", "GameFontNormal")
|
||||
label:SetPoint("TOP")
|
||||
label:SetPoint("BOTTOM")
|
||||
label:SetJustifyH("CENTER")
|
||||
|
||||
local left = frame:CreateTexture(nil, "BACKGROUND")
|
||||
left:SetHeight(8)
|
||||
left:SetPoint("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")
|
||||
right:SetHeight(8)
|
||||
right:SetPoint("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
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,144 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs, print = select, pairs, print
|
||||
|
||||
-- WoW APIs
|
||||
local CreateFrame, UIParent, GetBuildInfo = CreateFrame, UIParent, GetBuildInfo
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
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)
|
||||
self:SetHeight(110)
|
||||
self:SetWidth(110)
|
||||
self:SetLabel()
|
||||
self:SetImage(nil)
|
||||
self:SetImageSize(64, 64)
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
if text and text ~= "" then
|
||||
self.label:Show()
|
||||
self.label:SetText(text)
|
||||
self:SetHeight(self.image:GetHeight() + 25)
|
||||
else
|
||||
self.label:Hide()
|
||||
self:SetHeight(self.image:GetHeight() + 10)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetImage"] = function(self, path, ...)
|
||||
local image = self.image
|
||||
image:SetTexture(path)
|
||||
|
||||
if image:GetTexture() then
|
||||
local n = select("#", ...)
|
||||
if n == 4 or n == 8 then
|
||||
image:SetTexCoord(...)
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end
|
||||
end,
|
||||
|
||||
["SetImageSize"] = function(self, width, height)
|
||||
self.image:SetWidth(width)
|
||||
self.image:SetHeight(height)
|
||||
--self.frame:SetWidth(width + 30)
|
||||
if self.label:IsShown() then
|
||||
self:SetHeight(height + 25)
|
||||
else
|
||||
self:SetHeight(height + 10)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:Disable()
|
||||
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.image:SetVertexColor(1, 1, 1)
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Button", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
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")
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetJustifyV("TOP")
|
||||
label:SetHeight(18)
|
||||
|
||||
local image = frame:CreateTexture(nil, "BACKGROUND")
|
||||
image:SetWidth(64)
|
||||
image:SetHeight(64)
|
||||
image:SetPoint("TOP", 0, -5)
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
highlight:SetAllPoints(image)
|
||||
highlight:SetTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight")
|
||||
highlight:SetTexCoord(0, 1, 0.23, 0.77)
|
||||
highlight:SetBlendMode("ADD")
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,101 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local select, pairs = select, pairs
|
||||
|
||||
-- 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: GameFontHighlightSmall
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
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()
|
||||
self:SetHighlight()
|
||||
self:SetHighlightTexCoord()
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetHighlight"] = function(self, ...)
|
||||
self.highlight:SetTexture(...)
|
||||
end,
|
||||
|
||||
["SetHighlightTexCoord"] = function(self, ...)
|
||||
local c = select("#", ...)
|
||||
if c == 4 or c == 8 then
|
||||
self.highlight:SetTexCoord(...)
|
||||
else
|
||||
self.highlight:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetDisabled"] = function(self,disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.frame:EnableMouse(false)
|
||||
self.label:SetTextColor(0.5, 0.5, 0.5)
|
||||
else
|
||||
self.frame:EnableMouse(true)
|
||||
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 frame = label.frame
|
||||
frame:EnableMouse(true)
|
||||
frame:SetScript("OnEnter", Control_OnEnter)
|
||||
frame:SetScript("OnLeave", Control_OnLeave)
|
||||
frame:SetScript("OnMouseDown", Label_OnClick)
|
||||
|
||||
local highlight = frame:CreateTexture(nil, "HIGHLIGHT")
|
||||
highlight:SetTexture(nil)
|
||||
highlight:SetAllPoints()
|
||||
highlight:SetBlendMode("ADD")
|
||||
|
||||
label.highlight = highlight
|
||||
label.type = Type
|
||||
label.LabelOnAcquire = label.OnAcquire
|
||||
for method, func in pairs(methods) do
|
||||
label[method] = func
|
||||
end
|
||||
|
||||
return label
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
|
||||
@@ -0,0 +1,230 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
-- WoW APIs
|
||||
local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
|
||||
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: NOT_BOUND
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
local function Control_OnEnter(frame)
|
||||
frame.obj:Fire("OnEnter")
|
||||
end
|
||||
|
||||
local function Control_OnLeave(frame)
|
||||
frame.obj:Fire("OnLeave")
|
||||
end
|
||||
|
||||
local function Keybinding_OnClick(frame, button)
|
||||
if button == "LeftButton" or button == "RightButton" then
|
||||
local self = frame.obj
|
||||
if self.waitingForKey then
|
||||
frame:EnableKeyboard(false)
|
||||
self.msgframe:Hide()
|
||||
frame:UnlockHighlight()
|
||||
self.waitingForKey = nil
|
||||
else
|
||||
frame:EnableKeyboard(true)
|
||||
self.msgframe:Show()
|
||||
frame:LockHighlight()
|
||||
self.waitingForKey = true
|
||||
end
|
||||
end
|
||||
AceGUI:ClearFocus()
|
||||
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
|
||||
if self.waitingForKey then
|
||||
local keyPressed = key
|
||||
if keyPressed == "ESCAPE" then
|
||||
keyPressed = ""
|
||||
else
|
||||
if ignoreKeys[keyPressed] then return end
|
||||
if IsShiftKeyDown() then
|
||||
keyPressed = "SHIFT-"..keyPressed
|
||||
end
|
||||
if IsControlKeyDown() then
|
||||
keyPressed = "CTRL-"..keyPressed
|
||||
end
|
||||
if IsAltKeyDown() then
|
||||
keyPressed = "ALT-"..keyPressed
|
||||
end
|
||||
end
|
||||
|
||||
frame:EnableKeyboard(false)
|
||||
self.msgframe:Hide()
|
||||
frame:UnlockHighlight()
|
||||
self.waitingForKey = nil
|
||||
|
||||
if not self.disabled then
|
||||
self:SetKey(keyPressed)
|
||||
self:Fire("OnKeyChanged", keyPressed)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function Keybinding_OnMouseDown(frame, button)
|
||||
if button == "LeftButton" or button == "RightButton" then
|
||||
return
|
||||
elseif button == "MiddleButton" then
|
||||
button = "BUTTON3"
|
||||
elseif button == "Button4" then
|
||||
button = "BUTTON4"
|
||||
elseif button == "Button5" then
|
||||
button = "BUTTON5"
|
||||
end
|
||||
Keybinding_OnKeyDown(frame, button)
|
||||
end
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Methods
|
||||
-------------------------------------------------------------------------------]]
|
||||
local methods = {
|
||||
["OnAcquire"] = function(self)
|
||||
self:SetWidth(200)
|
||||
self:SetLabel("")
|
||||
self:SetKey("")
|
||||
self.waitingForKey = nil
|
||||
self.msgframe:Hide()
|
||||
self:SetDisabled(false)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
self.disabled = disabled
|
||||
if disabled then
|
||||
self.button:Disable()
|
||||
self.label:SetTextColor(0.5,0.5,0.5)
|
||||
else
|
||||
self.button:Enable()
|
||||
self.label:SetTextColor(1,1,1)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetKey"] = function(self, key)
|
||||
if (key or "") == "" then
|
||||
self.button:SetText(NOT_BOUND)
|
||||
self.button:SetNormalFontObject("GameFontNormal")
|
||||
else
|
||||
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)
|
||||
self.label:SetText(label or "")
|
||||
if (label or "") == "" then
|
||||
self.alignoffset = nil
|
||||
self:SetHeight(24)
|
||||
else
|
||||
self.alignoffset = 30
|
||||
self:SetHeight(44)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
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 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 text = button:GetFontString()
|
||||
text:SetPoint("LEFT", 7, 0)
|
||||
text:SetPoint("RIGHT", -7, 0)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontHighlight")
|
||||
label:SetPoint("TOPLEFT")
|
||||
label:SetPoint("TOPRIGHT")
|
||||
label:SetJustifyH("CENTER")
|
||||
label:SetHeight(18)
|
||||
|
||||
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.")
|
||||
msgframe.msg = msg
|
||||
msg:SetPoint("TOPLEFT", 5, -5)
|
||||
msgframe:SetScript("OnUpdate", keybindingMsgFixWidth)
|
||||
msgframe:SetPoint("BOTTOM", button, "TOP")
|
||||
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
|
||||
end
|
||||
button.obj = widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,162 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local max, select, pairs = math.max, select, pairs
|
||||
|
||||
-- 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: GameFontHighlightSmall
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
|
||||
local function UpdateImageAnchor(self)
|
||||
if self.resizing then return end
|
||||
local frame = self.frame
|
||||
local width = frame.width or frame:GetWidth() or 0
|
||||
local image = self.image
|
||||
local label = self.label
|
||||
local height
|
||||
|
||||
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")
|
||||
label:SetPoint("TOP", image, "BOTTOM")
|
||||
label:SetPoint("LEFT")
|
||||
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)
|
||||
height = max(image:GetHeight(), label:GetHeight())
|
||||
end
|
||||
else
|
||||
-- no image shown
|
||||
label:SetPoint("TOPLEFT")
|
||||
label:SetWidth(width)
|
||||
height = label:GetHeight()
|
||||
end
|
||||
|
||||
self.resizing = true
|
||||
frame:SetHeight(height)
|
||||
frame.height = height
|
||||
self.resizing = nil
|
||||
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
|
||||
UpdateImageAnchor(self)
|
||||
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)
|
||||
if not (r and g and b) then
|
||||
r, g, b = 1, 1, 1
|
||||
end
|
||||
self.label:SetVertexColor(r, g, b)
|
||||
end,
|
||||
|
||||
["SetImage"] = function(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(...)
|
||||
else
|
||||
image:SetTexCoord(0, 1, 0, 1)
|
||||
end
|
||||
else
|
||||
self.imageshown = nil
|
||||
end
|
||||
UpdateImageAnchor(self)
|
||||
end,
|
||||
|
||||
["SetFont"] = function(self, font, height, flags)
|
||||
self.label:SetFont(font, height, flags)
|
||||
end,
|
||||
|
||||
["SetFontObject"] = function(self, font)
|
||||
self:SetFont((font or GameFontHighlightSmall):GetFont())
|
||||
end,
|
||||
|
||||
["SetImageSize"] = function(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)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,308 @@
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local pairs = pairs
|
||||
|
||||
-- WoW APIs
|
||||
local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, ClearCursor
|
||||
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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Support functions
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function Layout(self)
|
||||
self:SetHeight(self.numlines * 14 + (self.disablebutton and 19 or 41) + self.labelHeight)
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Scripts
|
||||
-------------------------------------------------------------------------------]]
|
||||
local function OnClick(self) -- Button
|
||||
self = self.obj
|
||||
self.editBox:ClearFocus()
|
||||
if not self:Fire("OnEnterPressed", self.editBox:GetText()) 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
|
||||
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 type, id, info = GetCursorInfo()
|
||||
if type == "spell" then
|
||||
info = GetSpellInfo(id, info)
|
||||
elseif type ~= "item" then
|
||||
return
|
||||
end
|
||||
ClearCursor()
|
||||
self = self.obj
|
||||
local editBox = self.editBox
|
||||
if not editBox:HasFocus() then
|
||||
editBox:SetFocus()
|
||||
editBox:SetCursorPosition(editBox:GetNumLetters())
|
||||
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()
|
||||
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)
|
||||
self:SetWidth(200)
|
||||
self:DisableButton(false)
|
||||
self:SetNumLines()
|
||||
self.entered = nil
|
||||
self:SetMaxLetters(0)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetDisabled"] = function(self, disabled)
|
||||
local editBox = self.editBox
|
||||
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.button:Disable()
|
||||
else
|
||||
editBox:EnableMouse(true)
|
||||
editBox:SetTextColor(1, 1, 1)
|
||||
self.label:SetTextColor(1, 0.82, 0)
|
||||
self.scrollFrame:EnableMouse(true)
|
||||
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()
|
||||
end
|
||||
elseif self.labelHeight ~= 0 then
|
||||
self.labelHeight = 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()
|
||||
else
|
||||
self.button:Show()
|
||||
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 frame = CreateFrame("Frame", nil, UIParent)
|
||||
frame:Hide()
|
||||
|
||||
local widgetNum = AceGUI:GetNextWidgetNum(Type)
|
||||
|
||||
local label = frame:CreateFontString(nil, "OVERLAY", "GameFontNormalSmall")
|
||||
label:SetPoint("TOPLEFT", frame, "TOPLEFT", 0, -4)
|
||||
label:SetPoint("TOPRIGHT", frame, "TOPRIGHT", 0, -4)
|
||||
label:SetJustifyH("LEFT")
|
||||
label:SetText(ACCEPT)
|
||||
label:SetHeight(10)
|
||||
|
||||
local button = CreateFrame("Button", ("%s%dButton"):format(Type, widgetNum), frame, "UIPanelButtonTemplate2")
|
||||
button:SetPoint("BOTTOMLEFT", 0, 4)
|
||||
button:SetHeight(22)
|
||||
button:SetWidth(label:GetStringWidth() + 24)
|
||||
button:SetText(ACCEPT)
|
||||
button:SetScript("OnClick", OnClick)
|
||||
button:Disable()
|
||||
|
||||
local text = button:GetFontString()
|
||||
text:ClearAllPoints()
|
||||
text:SetPoint("TOPLEFT", button, "TOPLEFT", 5, -5)
|
||||
text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
|
||||
text:SetJustifyV("MIDDLE")
|
||||
|
||||
local scrollBG = CreateFrame("Frame", nil, frame)
|
||||
scrollBG:SetBackdrop(backdrop)
|
||||
scrollBG:SetBackdropColor(0, 0, 0)
|
||||
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||
|
||||
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
|
||||
end
|
||||
button.obj, editBox.obj, scrollFrame.obj = widget, widget, widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type, Constructor, Version)
|
||||
@@ -0,0 +1,281 @@
|
||||
--[[-----------------------------------------------------------------------------
|
||||
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
|
||||
|
||||
-- Lua APIs
|
||||
local min, max, floor = math.min, math.max, math.floor
|
||||
local tonumber, pairs = tonumber, pairs
|
||||
|
||||
-- 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: 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
|
||||
|
||||
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)
|
||||
self:SetWidth(200)
|
||||
self:SetHeight(44)
|
||||
self:SetDisabled(false)
|
||||
self:SetIsPercent(nil)
|
||||
self:SetSliderValues(0,100,1)
|
||||
self:SetValue(0)
|
||||
self.slider:EnableMouseWheel(false)
|
||||
end,
|
||||
|
||||
-- ["OnRelease"] = nil,
|
||||
|
||||
["SetDisabled"] = function(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.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.editbox:EnableMouse(true)
|
||||
end
|
||||
end,
|
||||
|
||||
["SetValue"] = function(self, value)
|
||||
self.slider.setup = true
|
||||
self.slider:SetValue(value)
|
||||
self.value = value
|
||||
UpdateText(self)
|
||||
self.slider.setup = nil
|
||||
end,
|
||||
|
||||
["GetValue"] = function(self)
|
||||
return self.value
|
||||
end,
|
||||
|
||||
["SetLabel"] = function(self, text)
|
||||
self.label:SetText(text)
|
||||
end,
|
||||
|
||||
["SetSliderValues"] = function(self, min, max, step)
|
||||
local frame = self.slider
|
||||
frame.setup = true
|
||||
self.min = min
|
||||
self.max = max
|
||||
self.step = step
|
||||
frame:SetMinMaxValues(min or 0,max or 100)
|
||||
UpdateLabels(self)
|
||||
frame:SetValueStep(step or 1)
|
||||
if self.value then
|
||||
frame:SetValue(self.value)
|
||||
end
|
||||
frame.setup = nil
|
||||
end,
|
||||
|
||||
["SetIsPercent"] = function(self, value)
|
||||
self.ispercent = value
|
||||
UpdateLabels(self)
|
||||
UpdateText(self)
|
||||
end
|
||||
}
|
||||
|
||||
--[[-----------------------------------------------------------------------------
|
||||
Constructor
|
||||
-------------------------------------------------------------------------------]]
|
||||
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 = {
|
||||
bgFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
edgeFile = "Interface\\ChatFrame\\ChatFrameBackground",
|
||||
tile = true, edgeSize = 1, tileSize = 5,
|
||||
}
|
||||
|
||||
local function Constructor()
|
||||
local frame = CreateFrame("Frame", nil, UIParent)
|
||||
|
||||
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)
|
||||
slider:SetOrientation("HORIZONTAL")
|
||||
slider:SetHeight(15)
|
||||
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:SetScript("OnMouseWheel", Slider_OnMouseWheel)
|
||||
|
||||
local lowtext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||
lowtext:SetPoint("TOPLEFT", slider, "BOTTOMLEFT", 2, 3)
|
||||
|
||||
local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||
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:SetHeight(14)
|
||||
editbox:SetWidth(70)
|
||||
editbox:SetJustifyH("CENTER")
|
||||
editbox:EnableMouse(true)
|
||||
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)
|
||||
|
||||
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
|
||||
end
|
||||
slider.obj, editbox.obj = widget, widget
|
||||
|
||||
return AceGUI:RegisterAsWidget(widget)
|
||||
end
|
||||
|
||||
AceGUI:RegisterWidgetType(Type,Constructor,Version)
|
||||
@@ -0,0 +1,136 @@
|
||||
--- **AceLocale-3.0** manages localization in addons, allowing for multiple locale to be registered with fallback to the base locale for untranslated strings.
|
||||
-- @class file
|
||||
-- @name AceLocale-3.0
|
||||
-- @release $Id: AceLocale-3.0.lua 895 2009-12-06 16:28:55Z nevcairiel $
|
||||
local MAJOR,MINOR = "AceLocale-3.0", 2
|
||||
|
||||
local AceLocale, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not AceLocale then return end -- no upgrade needed
|
||||
|
||||
-- Lua APIs
|
||||
local assert, tostring, error = assert, tostring, error
|
||||
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: GAME_LOCALE, geterrorhandler
|
||||
|
||||
local gameLocale = GetLocale()
|
||||
if gameLocale == "enGB" then
|
||||
gameLocale = "enUS"
|
||||
end
|
||||
|
||||
AceLocale.apps = AceLocale.apps or {} -- array of ["AppName"]=localetableref
|
||||
AceLocale.appnames = AceLocale.appnames or {} -- array of [localetableref]="AppName"
|
||||
|
||||
-- This metatable is used on all tables returned from GetLocale
|
||||
local readmeta = {
|
||||
__index = function(self, key) -- requesting totally unknown entries: fire off a nonbreaking error and return key
|
||||
rawset(self, key, key) -- only need to see the warning once, really
|
||||
geterrorhandler()(MAJOR..": "..tostring(AceLocale.appnames[self])..": Missing entry for '"..tostring(key).."'")
|
||||
return key
|
||||
end
|
||||
}
|
||||
|
||||
-- This metatable is used on all tables returned from GetLocale if the silent flag is true, it does not issue a warning on unknown keys
|
||||
local readmetasilent = {
|
||||
__index = function(self, key) -- requesting totally unknown entries: return key
|
||||
rawset(self, key, key) -- only need to invoke this function once
|
||||
return key
|
||||
end
|
||||
}
|
||||
|
||||
-- Remember the locale table being registered right now (it gets set by :NewLocale())
|
||||
-- NOTE: Do never try to register 2 locale tables at once and mix their definition.
|
||||
local registering
|
||||
|
||||
-- local assert false function
|
||||
local assertfalse = function() assert(false) end
|
||||
|
||||
-- This metatable proxy is used when registering nondefault locales
|
||||
local writeproxy = setmetatable({}, {
|
||||
__newindex = function(self, key, value)
|
||||
rawset(registering, key, value == true and key or value) -- assigning values: replace 'true' with key string
|
||||
end,
|
||||
__index = assertfalse
|
||||
})
|
||||
|
||||
-- This metatable proxy is used when registering the default locale.
|
||||
-- It refuses to overwrite existing values
|
||||
-- Reason 1: Allows loading locales in any order
|
||||
-- Reason 2: If 2 modules have the same string, but only the first one to be
|
||||
-- loaded has a translation for the current locale, the translation
|
||||
-- doesn't get overwritten.
|
||||
--
|
||||
local writedefaultproxy = setmetatable({}, {
|
||||
__newindex = function(self, key, value)
|
||||
if not rawget(registering, key) then
|
||||
rawset(registering, key, value == true and key or value)
|
||||
end
|
||||
end,
|
||||
__index = assertfalse
|
||||
})
|
||||
|
||||
--- Register a new locale (or extend an existing one) for the specified application.
|
||||
-- :NewLocale will return a table you can fill your locale into, or nil if the locale isn't needed for the players
|
||||
-- game locale.
|
||||
-- @paramsig application, locale[, isDefault[, silent]]
|
||||
-- @param application Unique name of addon / module
|
||||
-- @param locale Name of the locale to register, e.g. "enUS", "deDE", etc.
|
||||
-- @param isDefault If this is the default locale being registered (your addon is written in this language, generally enUS)
|
||||
-- @param silent If true, the locale will not issue warnings for missing keys. Can only be set on the default locale.
|
||||
-- @usage
|
||||
-- -- enUS.lua
|
||||
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "enUS", true)
|
||||
-- L["string1"] = true
|
||||
--
|
||||
-- -- deDE.lua
|
||||
-- local L = LibStub("AceLocale-3.0"):NewLocale("TestLocale", "deDE")
|
||||
-- if not L then return end
|
||||
-- L["string1"] = "Zeichenkette1"
|
||||
-- @return Locale Table to add localizations to, or nil if the current locale is not required.
|
||||
function AceLocale:NewLocale(application, locale, isDefault, silent)
|
||||
|
||||
if silent and not isDefault then
|
||||
error("Usage: NewLocale(application, locale[, isDefault[, silent]]): 'silent' can only be specified for the default locale", 2)
|
||||
end
|
||||
|
||||
-- GAME_LOCALE allows translators to test translations of addons without having that wow client installed
|
||||
-- Ammo: I still think this is a bad idea, for instance an addon that checks for some ingame string will fail, just because some other addon
|
||||
-- gives the user the illusion that they can run in a different locale? Ditch this whole thing or allow a setting per 'application'. I'm of the
|
||||
-- opinion to remove this.
|
||||
local gameLocale = GAME_LOCALE or gameLocale
|
||||
|
||||
if locale ~= gameLocale and not isDefault then
|
||||
return -- nop, we don't need these translations
|
||||
end
|
||||
|
||||
local app = AceLocale.apps[application]
|
||||
|
||||
if not app then
|
||||
app = setmetatable({}, silent and readmetasilent or readmeta)
|
||||
AceLocale.apps[application] = app
|
||||
AceLocale.appnames[app] = application
|
||||
end
|
||||
|
||||
registering = app -- remember globally for writeproxy and writedefaultproxy
|
||||
|
||||
if isDefault then
|
||||
return writedefaultproxy
|
||||
end
|
||||
|
||||
return writeproxy
|
||||
end
|
||||
|
||||
--- Returns localizations for the current locale (or default locale if translations are missing).
|
||||
-- Errors if nothing is registered (spank developer, not just a missing translation)
|
||||
-- @param application Unique name of addon / module
|
||||
-- @param silent If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
|
||||
-- @return The locale table for the current language.
|
||||
function AceLocale:GetLocale(application, silent)
|
||||
if not silent and not AceLocale.apps[application] then
|
||||
error("Usage: GetLocale(application[, silent]): 'application' - No locales registered for '"..tostring(application).."'", 2)
|
||||
end
|
||||
return AceLocale.apps[application]
|
||||
end
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="AceLocale-3.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,240 @@
|
||||
--[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]]
|
||||
local MAJOR, MINOR = "CallbackHandler-1.0", 6
|
||||
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
|
||||
if not CallbackHandler then return end -- No upgrade needed
|
||||
|
||||
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
|
||||
|
||||
-- Lua APIs
|
||||
local tconcat = table.concat
|
||||
local assert, error, loadstring = assert, error, loadstring
|
||||
local setmetatable, rawset, rawget = setmetatable, rawset, rawget
|
||||
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
|
||||
|
||||
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||
-- List them here for Mikk's FindGlobals script
|
||||
-- GLOBALS: geterrorhandler
|
||||
|
||||
local xpcall = xpcall
|
||||
|
||||
local function errorhandler(err)
|
||||
return geterrorhandler()(err)
|
||||
end
|
||||
|
||||
local function CreateDispatcher(argCount)
|
||||
local code = [[
|
||||
local next, xpcall, eh = ...
|
||||
|
||||
local method, ARGS
|
||||
local function call() method(ARGS) end
|
||||
|
||||
local function dispatch(handlers, ...)
|
||||
local index
|
||||
index, method = next(handlers)
|
||||
if not method then return end
|
||||
local OLD_ARGS = ARGS
|
||||
ARGS = ...
|
||||
repeat
|
||||
xpcall(call, eh)
|
||||
index, method = next(handlers, index)
|
||||
until not method
|
||||
ARGS = OLD_ARGS
|
||||
end
|
||||
|
||||
return dispatch
|
||||
]]
|
||||
|
||||
local ARGS, OLD_ARGS = {}, {}
|
||||
for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
|
||||
code = code:gsub("OLD_ARGS", tconcat(OLD_ARGS, ", ")):gsub("ARGS", tconcat(ARGS, ", "))
|
||||
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
|
||||
end
|
||||
|
||||
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
|
||||
local dispatcher = CreateDispatcher(argCount)
|
||||
rawset(self, argCount, dispatcher)
|
||||
return dispatcher
|
||||
end})
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
-- CallbackHandler:New
|
||||
--
|
||||
-- target - target object to embed public APIs in
|
||||
-- RegisterName - name of the callback registration API, default "RegisterCallback"
|
||||
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
|
||||
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
|
||||
|
||||
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
|
||||
-- TODO: Remove this after beta has gone out
|
||||
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
|
||||
|
||||
RegisterName = RegisterName or "RegisterCallback"
|
||||
UnregisterName = UnregisterName or "UnregisterCallback"
|
||||
if UnregisterAllName==nil then -- false is used to indicate "don't want this method"
|
||||
UnregisterAllName = "UnregisterAllCallbacks"
|
||||
end
|
||||
|
||||
-- we declare all objects and exported APIs inside this closure to quickly gain access
|
||||
-- to e.g. function names, the "target" parameter, etc
|
||||
|
||||
|
||||
-- Create the registry object
|
||||
local events = setmetatable({}, meta)
|
||||
local registry = { recurse=0, events=events }
|
||||
|
||||
-- registry:Fire() - fires the given event/message into the registry
|
||||
function registry:Fire(eventname, ...)
|
||||
if not rawget(events, eventname) or not next(events[eventname]) then return end
|
||||
local oldrecurse = registry.recurse
|
||||
registry.recurse = oldrecurse + 1
|
||||
|
||||
Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
|
||||
|
||||
registry.recurse = oldrecurse
|
||||
|
||||
if registry.insertQueue and oldrecurse==0 then
|
||||
-- Something in one of our callbacks wanted to register more callbacks; they got queued
|
||||
for eventname,callbacks in pairs(registry.insertQueue) do
|
||||
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
|
||||
for self,func in pairs(callbacks) do
|
||||
events[eventname][self] = func
|
||||
-- fire OnUsed callback?
|
||||
if first and registry.OnUsed then
|
||||
registry.OnUsed(registry, target, eventname)
|
||||
first = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
registry.insertQueue = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- Registration of a callback, handles:
|
||||
-- self["method"], leads to self["method"](self, ...)
|
||||
-- self with function ref, leads to functionref(...)
|
||||
-- "addonId" (instead of self) with function ref, leads to functionref(...)
|
||||
-- all with an optional arg, which, if present, gets passed as first argument (after self if present)
|
||||
target[RegisterName] = function(self, eventname, method, ... --[[actually just a single arg]])
|
||||
if type(eventname) ~= "string" then
|
||||
error("Usage: "..RegisterName.."(eventname, method[, arg]): 'eventname' - string expected.", 2)
|
||||
end
|
||||
|
||||
method = method or eventname
|
||||
|
||||
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
|
||||
|
||||
if type(method) ~= "string" and type(method) ~= "function" then
|
||||
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - string or function expected.", 2)
|
||||
end
|
||||
|
||||
local regfunc
|
||||
|
||||
if type(method) == "string" then
|
||||
-- self["method"] calling style
|
||||
if type(self) ~= "table" then
|
||||
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): self was not a table?", 2)
|
||||
elseif self==target then
|
||||
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): do not use Library:"..RegisterName.."(), use your own 'self'", 2)
|
||||
elseif type(self[method]) ~= "function" then
|
||||
error("Usage: "..RegisterName.."(\"eventname\", \"methodname\"): 'methodname' - method '"..tostring(method).."' not found on self.", 2)
|
||||
end
|
||||
|
||||
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
|
||||
local arg=select(1,...)
|
||||
regfunc = function(...) self[method](self,arg,...) end
|
||||
else
|
||||
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)
|
||||
end
|
||||
|
||||
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
|
||||
local arg=select(1,...)
|
||||
regfunc = function(...) method(arg,...) end
|
||||
else
|
||||
regfunc = method
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if events[eventname][self] or registry.recurse<1 then
|
||||
-- if registry.recurse<1 then
|
||||
-- we're overwriting an existing entry, or not currently recursing. just set it.
|
||||
events[eventname][self] = regfunc
|
||||
-- fire OnUsed callback?
|
||||
if registry.OnUsed and first then
|
||||
registry.OnUsed(registry, target, eventname)
|
||||
end
|
||||
else
|
||||
-- we're currently processing a callback in this registry, so delay the registration of this new entry!
|
||||
-- yes, we're a bit wasteful on garbage, but this is a fringe case, so we're picking low implementation overhead over garbage efficiency
|
||||
registry.insertQueue = registry.insertQueue or setmetatable({},meta)
|
||||
registry.insertQueue[eventname][self] = regfunc
|
||||
end
|
||||
end
|
||||
|
||||
-- Unregister a callback
|
||||
target[UnregisterName] = function(self, eventname)
|
||||
if not self or self==target then
|
||||
error("Usage: "..UnregisterName.."(eventname): bad 'self'", 2)
|
||||
end
|
||||
if type(eventname) ~= "string" then
|
||||
error("Usage: "..UnregisterName.."(eventname): 'eventname' - string expected.", 2)
|
||||
end
|
||||
if rawget(events, eventname) and events[eventname][self] then
|
||||
events[eventname][self] = nil
|
||||
-- Fire OnUnused callback?
|
||||
if registry.OnUnused and not next(events[eventname]) then
|
||||
registry.OnUnused(registry, target, eventname)
|
||||
end
|
||||
end
|
||||
if registry.insertQueue and rawget(registry.insertQueue, eventname) and registry.insertQueue[eventname][self] then
|
||||
registry.insertQueue[eventname][self] = nil
|
||||
end
|
||||
end
|
||||
|
||||
-- OPTIONAL: Unregister all callbacks for given selfs/addonIds
|
||||
if UnregisterAllName then
|
||||
target[UnregisterAllName] = function(...)
|
||||
if select("#",...)<1 then
|
||||
error("Usage: "..UnregisterAllName.."([whatFor]): missing 'self' or \"addonId\" to unregister events for.", 2)
|
||||
end
|
||||
if select("#",...)==1 and ...==target then
|
||||
error("Usage: "..UnregisterAllName.."([whatFor]): supply a meaningful 'self' or \"addonId\"", 2)
|
||||
end
|
||||
|
||||
|
||||
for i=1,select("#",...) do
|
||||
local self = select(i,...)
|
||||
if registry.insertQueue then
|
||||
for eventname, callbacks in pairs(registry.insertQueue) do
|
||||
if callbacks[self] then
|
||||
callbacks[self] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
for eventname, callbacks in pairs(events) do
|
||||
if callbacks[self] then
|
||||
callbacks[self] = nil
|
||||
-- Fire OnUnused callback?
|
||||
if registry.OnUnused and not next(callbacks) then
|
||||
registry.OnUnused(registry, target, eventname)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return registry
|
||||
end
|
||||
|
||||
|
||||
-- CallbackHandler purposefully does NOT do explicit embedding. Nor does it
|
||||
-- try to upgrade old implicit embeds since the system is selfcontained and
|
||||
-- relies on closures to work.
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<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="CallbackHandler-1.0.lua"/>
|
||||
</Ui>
|
||||
@@ -0,0 +1,292 @@
|
||||
-- LibBabble-3.0 is hereby placed in the Public Domain
|
||||
-- Credits: ckknight
|
||||
local LIBBABBLE_MAJOR, LIBBABBLE_MINOR = "LibBabble-3.0", 2
|
||||
|
||||
local LibBabble = LibStub:NewLibrary(LIBBABBLE_MAJOR, LIBBABBLE_MINOR)
|
||||
if not LibBabble then
|
||||
return
|
||||
end
|
||||
|
||||
local data = LibBabble.data or {}
|
||||
for k,v in pairs(LibBabble) do
|
||||
LibBabble[k] = nil
|
||||
end
|
||||
LibBabble.data = data
|
||||
|
||||
local tablesToDB = {}
|
||||
for namespace, db in pairs(data) do
|
||||
for k,v in pairs(db) do
|
||||
tablesToDB[v] = db
|
||||
end
|
||||
end
|
||||
|
||||
local function warn(message)
|
||||
local _, ret = pcall(error, message, 3)
|
||||
geterrorhandler()(ret)
|
||||
end
|
||||
|
||||
local lookup_mt = { __index = function(self, key)
|
||||
local db = tablesToDB[self]
|
||||
local current_key = db.current[key]
|
||||
if current_key then
|
||||
self[key] = current_key
|
||||
return current_key
|
||||
end
|
||||
local base_key = db.base[key]
|
||||
local real_MAJOR_VERSION
|
||||
for k,v in pairs(data) do
|
||||
if v == db then
|
||||
real_MAJOR_VERSION = k
|
||||
break
|
||||
end
|
||||
end
|
||||
if not real_MAJOR_VERSION then
|
||||
real_MAJOR_VERSION = LIBBABBLE_MAJOR
|
||||
end
|
||||
if base_key then
|
||||
warn(("%s: Translation %q not found for locale %q"):format(real_MAJOR_VERSION, key, GetLocale()))
|
||||
rawset(self, key, base_key)
|
||||
return base_key
|
||||
end
|
||||
warn(("%s: Translation %q not found."):format(real_MAJOR_VERSION, key))
|
||||
rawset(self, key, key)
|
||||
return key
|
||||
end }
|
||||
|
||||
local function initLookup(module, lookup)
|
||||
local db = tablesToDB[module]
|
||||
for k in pairs(lookup) do
|
||||
lookup[k] = nil
|
||||
end
|
||||
setmetatable(lookup, lookup_mt)
|
||||
tablesToDB[lookup] = db
|
||||
db.lookup = lookup
|
||||
return lookup
|
||||
end
|
||||
|
||||
local function initReverse(module, reverse)
|
||||
local db = tablesToDB[module]
|
||||
for k in pairs(reverse) do
|
||||
reverse[k] = nil
|
||||
end
|
||||
for k,v in pairs(db.current) do
|
||||
reverse[v] = k
|
||||
end
|
||||
tablesToDB[reverse] = db
|
||||
db.reverse = reverse
|
||||
db.reverseIterators = nil
|
||||
return reverse
|
||||
end
|
||||
|
||||
local prototype = {}
|
||||
local prototype_mt = {__index = prototype}
|
||||
|
||||
--[[---------------------------------------------------------------------------
|
||||
Notes:
|
||||
* If you try to access a nonexistent key, it will warn but allow the code to pass through.
|
||||
Returns:
|
||||
A lookup table for english to localized words.
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
local BL = B:GetLookupTable()
|
||||
assert(BL["Some english word"] == "Some localized word")
|
||||
DoSomething(BL["Some english word that doesn't exist"]) -- warning!
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:GetLookupTable()
|
||||
local db = tablesToDB[self]
|
||||
|
||||
local lookup = db.lookup
|
||||
if lookup then
|
||||
return lookup
|
||||
end
|
||||
return initLookup(self, {})
|
||||
end
|
||||
--[[---------------------------------------------------------------------------
|
||||
Notes:
|
||||
* If you try to access a nonexistent key, it will return nil.
|
||||
Returns:
|
||||
A lookup table for english to localized words.
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
local B_has = B:GetUnstrictLookupTable()
|
||||
assert(B_has["Some english word"] == "Some localized word")
|
||||
assert(B_has["Some english word that doesn't exist"] == nil)
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:GetUnstrictLookupTable()
|
||||
local db = tablesToDB[self]
|
||||
|
||||
return db.current
|
||||
end
|
||||
--[[---------------------------------------------------------------------------
|
||||
Notes:
|
||||
* If you try to access a nonexistent key, it will return nil.
|
||||
* This is useful for checking if the base (English) table has a key, even if the localized one does not have it registered.
|
||||
Returns:
|
||||
A lookup table for english to localized words.
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
local B_hasBase = B:GetBaseLookupTable()
|
||||
assert(B_hasBase["Some english word"] == "Some english word")
|
||||
assert(B_hasBase["Some english word that doesn't exist"] == nil)
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:GetBaseLookupTable()
|
||||
local db = tablesToDB[self]
|
||||
|
||||
return db.base
|
||||
end
|
||||
--[[---------------------------------------------------------------------------
|
||||
Notes:
|
||||
* If you try to access a nonexistent key, it will return nil.
|
||||
* This will return only one English word that it maps to, if there are more than one to check, see :GetReverseIterator("word")
|
||||
Returns:
|
||||
A lookup table for localized to english words.
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
local BR = B:GetReverseLookupTable()
|
||||
assert(BR["Some localized word"] == "Some english word")
|
||||
assert(BR["Some localized word that doesn't exist"] == nil)
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:GetReverseLookupTable()
|
||||
local db = tablesToDB[self]
|
||||
|
||||
local reverse = db.reverse
|
||||
if reverse then
|
||||
return reverse
|
||||
end
|
||||
return initReverse(self, {})
|
||||
end
|
||||
local blank = {}
|
||||
local weakVal = {__mode='v'}
|
||||
--[[---------------------------------------------------------------------------
|
||||
Arguments:
|
||||
string - the localized word to chek for.
|
||||
Returns:
|
||||
An iterator to traverse all English words that map to the given key
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
for word in B:GetReverseIterator("Some localized word") do
|
||||
DoSomething(word)
|
||||
end
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:GetReverseIterator(key)
|
||||
local db = tablesToDB[self]
|
||||
local reverseIterators = db.reverseIterators
|
||||
if not reverseIterators then
|
||||
reverseIterators = setmetatable({}, weakVal)
|
||||
db.reverseIterators = reverseIterators
|
||||
elseif reverseIterators[key] then
|
||||
return pairs(reverseIterators[key])
|
||||
end
|
||||
local t
|
||||
for k,v in pairs(db.current) do
|
||||
if v == key then
|
||||
if not t then
|
||||
t = {}
|
||||
end
|
||||
t[k] = true
|
||||
end
|
||||
end
|
||||
reverseIterators[key] = t or blank
|
||||
return pairs(reverseIterators[key])
|
||||
end
|
||||
--[[---------------------------------------------------------------------------
|
||||
Returns:
|
||||
An iterator to traverse all translations English to localized.
|
||||
Example:
|
||||
local B = LibStub("LibBabble-Module-3.0") -- where Module is what you want.
|
||||
for english, localized in B:Iterate() do
|
||||
DoSomething(english, localized)
|
||||
end
|
||||
-----------------------------------------------------------------------------]]
|
||||
function prototype:Iterate()
|
||||
local db = tablesToDB[self]
|
||||
|
||||
return pairs(db.current)
|
||||
end
|
||||
|
||||
-- #NODOC
|
||||
-- modules need to call this to set the base table
|
||||
function prototype:SetBaseTranslations(base)
|
||||
local db = tablesToDB[self]
|
||||
local oldBase = db.base
|
||||
if oldBase then
|
||||
for k in pairs(oldBase) do
|
||||
oldBase[k] = nil
|
||||
end
|
||||
for k, v in pairs(base) do
|
||||
oldBase[k] = v
|
||||
end
|
||||
base = oldBase
|
||||
else
|
||||
db.base = base
|
||||
end
|
||||
for k,v in pairs(base) do
|
||||
if v == true then
|
||||
base[k] = k
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function init(module)
|
||||
local db = tablesToDB[module]
|
||||
if db.lookup then
|
||||
initLookup(module, db.lookup)
|
||||
end
|
||||
if db.reverse then
|
||||
initReverse(module, db.reverse)
|
||||
end
|
||||
db.reverseIterators = nil
|
||||
end
|
||||
|
||||
-- #NODOC
|
||||
-- modules need to call this to set the current table. if current is true, use the base table.
|
||||
function prototype:SetCurrentTranslations(current)
|
||||
local db = tablesToDB[self]
|
||||
if current == true then
|
||||
db.current = db.base
|
||||
else
|
||||
local oldCurrent = db.current
|
||||
if oldCurrent then
|
||||
for k in pairs(oldCurrent) do
|
||||
oldCurrent[k] = nil
|
||||
end
|
||||
for k, v in pairs(current) do
|
||||
oldCurrent[k] = v
|
||||
end
|
||||
current = oldCurrent
|
||||
else
|
||||
db.current = current
|
||||
end
|
||||
end
|
||||
init(self)
|
||||
end
|
||||
|
||||
for namespace, db in pairs(data) do
|
||||
setmetatable(db.module, prototype_mt)
|
||||
init(db.module)
|
||||
end
|
||||
|
||||
-- #NODOC
|
||||
-- modules need to call this to create a new namespace.
|
||||
function LibBabble:New(namespace, minor)
|
||||
local module, oldminor = LibStub:NewLibrary(namespace, minor)
|
||||
if not module then
|
||||
return
|
||||
end
|
||||
|
||||
if not oldminor then
|
||||
local db = {
|
||||
module = module,
|
||||
}
|
||||
data[namespace] = db
|
||||
tablesToDB[module] = db
|
||||
else
|
||||
for k,v in pairs(module) do
|
||||
module[k] = nil
|
||||
end
|
||||
end
|
||||
|
||||
setmetatable(module, prototype_mt)
|
||||
|
||||
return module
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,16 @@
|
||||
## Interface: 40000
|
||||
## LoadOnDemand: 1
|
||||
## Title: Lib: Babble-Inventory-3.0
|
||||
## Notes: A library to help with localization of item types and subtypes.
|
||||
## Notes-esES: Una libreria para ayudar con la traduccion de tipos y subtipos de objetos.
|
||||
## Author: ckknight
|
||||
## X-eMail: ckknight@gmail.com
|
||||
## X-Category: Library
|
||||
## X-License: MIT
|
||||
## X-Curse-Packaged-Version: r106
|
||||
## 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
|
||||
|
||||
LibStub\LibStub.lua
|
||||
lib.xml
|
||||
@@ -0,0 +1,5 @@
|
||||
<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="LibBabble-3.0.lua" />
|
||||
<Script file="LibBabble-Inventory-3.0.lua" />
|
||||
</Ui>
|
||||
@@ -0,0 +1,312 @@
|
||||
--[[
|
||||
LibDualSpec-1.0 - Adds dual spec support to individual AceDB-3.0 databases
|
||||
Copyright (C) 2009 Adirelle
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Redistribution of a stand alone version is strictly prohibited without
|
||||
prior written authorization from the LibDualSpec project manager.
|
||||
* Neither the name of the LibDualSpec authors nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
--]]
|
||||
|
||||
local MAJOR, MINOR = "LibDualSpec-1.0", 4
|
||||
assert(LibStub, MAJOR.." requires LibStub")
|
||||
local lib = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
if not lib then return end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Library data
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
lib.talentGroup = lib.talentGroup or GetActiveTalentGroup()
|
||||
lib.eventFrame = lib.eventFrame or CreateFrame("Frame")
|
||||
|
||||
lib.registry = lib.registry or {}
|
||||
lib.options = lib.options or {}
|
||||
lib.mixin = lib.mixin or {}
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Locals
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
local registry = lib.registry
|
||||
local options = lib.options
|
||||
local mixin = lib.mixin
|
||||
|
||||
-- "Externals"
|
||||
local AceDB3 = LibStub('AceDB-3.0', true)
|
||||
local AceDBOptions3 = LibStub('AceDBOptions-3.0', true)
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Localization
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
local L_DUALSPEC_DESC, L_ENABLED, L_ENABLED_DESC, L_DUAL_PROFILE, L_DUAL_PROFILE_DESC
|
||||
|
||||
do
|
||||
L_DUALSPEC_DESC = "When enabled, this feature allow you to select a different "..
|
||||
"profile for each talent spec. The dual profile will be swapped with the "..
|
||||
"current profile each time you switch from a talent spec to the other."
|
||||
L_ENABLED = 'Enable dual profile'
|
||||
L_ENABLED_DESC = 'Check this box to automatically swap profiles on talent switch.'
|
||||
L_DUAL_PROFILE = 'Dual profile'
|
||||
L_DUAL_PROFILE_DESC = 'Select the profile to swap with on talent switch.'
|
||||
|
||||
local locale = GetLocale()
|
||||
if locale == "frFR" then
|
||||
L_DUALSPEC_DESC = "Lorsqu'elle est activée, cette fonctionnalité vous permet "..
|
||||
"de choisir un profil différent pour chaque spécialisation de talents. "..
|
||||
"Le second profil sera échangé avec le profil courant chaque fois que vous "..
|
||||
"passerez d'une spécialisation à l'autre."
|
||||
L_ENABLED = 'Activez le second profil'
|
||||
L_ENABLED_DESC = "Cochez cette case pour échanger automatiquement les profils "..
|
||||
"lors d'un changement de spécialisation."
|
||||
L_DUAL_PROFILE = 'Second profil'
|
||||
L_DUAL_PROFILE_DESC = "Sélectionnez le profil à échanger avec le profil courant "..
|
||||
"lors du changement de spécialisation."
|
||||
elseif locale == "deDE" then
|
||||
L_DUAL_PROFILE = "Duales Profil"
|
||||
L_DUAL_PROFILE_DESC = "W\195\164hle das Profil, das beim Wechsel der Talente aktiviert wird."
|
||||
L_DUALSPEC_DESC = "Wenn aktiv, wechselt dieses Feature bei jedem Wechsel "..
|
||||
"der dualen Talentspezialisierung das Profil. Das duale Profil wird beim "..
|
||||
"Wechsel automatisch mit dem derzeit aktiven Profil getauscht."
|
||||
L_ENABLED = "Aktiviere Duale Profile"
|
||||
L_ENABLED_DESC = "Aktiviere diese Option, um beim Talentwechsel automatisch "..
|
||||
"zwischen den Profilen zu wechseln."
|
||||
elseif locale == "zhCN" then
|
||||
L_DUAL_PROFILE = "双重配置文件"
|
||||
L_DUAL_PROFILE_DESC = "选择转换天赋时所要使用的配置文件"
|
||||
L_DUALSPEC_DESC = "启时,你可以为你的双天赋设定另一组配置文件,你的双重配置文件将在你转换天赋时自动与目前使用配置文件交换。"
|
||||
L_ENABLED = "开启双重配置文件"
|
||||
L_ENABLED_DESC = "勾选以便转换天赋时自动交换配置文件。"
|
||||
elseif locale == "zhTW" then
|
||||
L_DUALSPEC_DESC = "啟用時,你可以為你的雙天賦設定另一組設定檔。你的雙設定檔將在你轉換天賦時自動與目前使用設定檔交換。"
|
||||
L_ENABLED = "啟用雙設定檔"
|
||||
L_ENABLED_DESC = "勾選以在轉換天賦時自動交換設定檔"
|
||||
L_DUAL_PROFILE = "雙設定檔"
|
||||
L_DUAL_PROFILE_DESC = "選擇轉換天賦後所要使用的設定檔"
|
||||
end
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Mixin
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
--- Get dual spec feature status.
|
||||
-- @return (boolean) true is dual spec feature enabled.
|
||||
-- @name enhancedDB:IsDualSpecEnabled
|
||||
function mixin:IsDualSpecEnabled()
|
||||
return registry[self].db.char.enabled
|
||||
end
|
||||
|
||||
--- Enable/disabled dual spec feature.
|
||||
-- @param enabled (boolean) true to enable dual spec feature, false to disable it.
|
||||
-- @name enhancedDB:SetDualSpecEnabled
|
||||
function mixin:SetDualSpecEnabled(enabled)
|
||||
local db = registry[self].db
|
||||
if enabled and not db.char.talentGroup then
|
||||
db.char.talentGroup = lib.talentGroup
|
||||
db.char.profile = self:GetCurrentProfile()
|
||||
db.char.enabled = true
|
||||
else
|
||||
db.char.enabled = enabled
|
||||
self:CheckDualSpecState()
|
||||
end
|
||||
end
|
||||
|
||||
--- Get the alternate profile name.
|
||||
-- Defaults to the current profile.
|
||||
-- @return (string) Alternate profile name.
|
||||
-- @name enhancedDB:GetDualSpecProfile
|
||||
function mixin:GetDualSpecProfile()
|
||||
return registry[self].db.char.profile or self:GetCurrentProfile()
|
||||
end
|
||||
|
||||
--- Set the alternate profile name.
|
||||
-- No validation are done to ensure the profile is valid.
|
||||
-- @param profileName (string) the profile name to use.
|
||||
-- @name enhancedDB:SetDualSpecProfile
|
||||
function mixin:SetDualSpecProfile(profileName)
|
||||
registry[self].db.char.profile = profileName
|
||||
end
|
||||
|
||||
--- Check if a profile swap should occur.
|
||||
-- Do nothing if the dual spec feature is disabled. In the other
|
||||
-- case, if the internally stored talent spec is different from the
|
||||
-- actual active talent spec, the database swaps to the alternate profile.
|
||||
-- There is normally no reason to call this method directly as LibDualSpec
|
||||
-- takes care of calling it at appropriate times.
|
||||
-- @name enhancedDB:CheckDualSpecState
|
||||
function mixin:CheckDualSpecState()
|
||||
local db = registry[self].db
|
||||
if db.char.enabled and db.char.talentGroup ~= lib.talentGroup then
|
||||
local currentProfile = self:GetCurrentProfile()
|
||||
local newProfile = db.char.profile
|
||||
db.char.talentGroup = lib.talentGroup
|
||||
if newProfile ~= currentProfile then
|
||||
self:SetProfile(newProfile)
|
||||
db.char.profile = currentProfile
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- AceDB-3.0 support
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
local function EmbedMixin(target)
|
||||
for k,v in pairs(mixin) do
|
||||
rawset(target, k, v)
|
||||
end
|
||||
end
|
||||
|
||||
-- Upgrade existing mixins
|
||||
for target in pairs(registry) do
|
||||
EmbedMixin(target)
|
||||
end
|
||||
|
||||
--- Embed dual spec feature into an existing AceDB-3.0 database.
|
||||
-- LibDualSpec specific methods are added to the instance.
|
||||
-- @name LibDualSpec:EnhanceDatabase
|
||||
-- @param target (table) the AceDB-3.0 instance.
|
||||
-- @param name (string) a user-friendly name of the database (best bet is the addon name).
|
||||
function lib:EnhanceDatabase(target, name)
|
||||
AceDB3 = AceDB3 or LibStub('AceDB-3.0', true)
|
||||
if type(target) ~= "table" then
|
||||
error("Usage: LibDualSpec:EnhanceDatabase(target, name): target should be a table.", 2)
|
||||
elseif type(name) ~= "string" then
|
||||
error("Usage: LibDualSpec:EnhanceDatabase(target, name): name should be a string.", 2)
|
||||
elseif not AceDB3 or not AceDB3.db_registry[target] then
|
||||
error("Usage: LibDualSpec:EnhanceDatabase(target, name): target should be an AceDB-3.0 database.", 2)
|
||||
elseif target.parent then
|
||||
error("Usage: LibDualSpec:EnhanceDatabase(target, name): cannot enhance a namespace.", 2)
|
||||
elseif registry[target] then
|
||||
return
|
||||
end
|
||||
local db = target:GetNamespace(MAJOR, true) or target:RegisterNamespace(MAJOR)
|
||||
registry[target] = { name = name, db = db }
|
||||
EmbedMixin(target)
|
||||
target:CheckDualSpecState()
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- AceDBOptions-3.0 support
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
local function NoDualSpec()
|
||||
return GetNumTalentGroups() == 1
|
||||
end
|
||||
|
||||
options.dualSpecDesc = {
|
||||
name = L_DUALSPEC_DESC,
|
||||
type = 'description',
|
||||
order = 40.1,
|
||||
hidden = NoDualSpec,
|
||||
}
|
||||
|
||||
options.enabled = {
|
||||
name = L_ENABLED,
|
||||
desc = L_ENABLED_DESC,
|
||||
type = 'toggle',
|
||||
order = 40.2,
|
||||
get = function(info) return info.handler.db:IsDualSpecEnabled() end,
|
||||
set = function(info, value) info.handler.db:SetDualSpecEnabled(value) end,
|
||||
hidden = NoDualSpec,
|
||||
}
|
||||
|
||||
options.dualProfile = {
|
||||
name = L_DUAL_PROFILE,
|
||||
desc = L_DUAL_PROFILE_DESC,
|
||||
type = 'select',
|
||||
order = 40.3,
|
||||
get = function(info) return info.handler.db:GetDualSpecProfile() end,
|
||||
set = function(info, value) info.handler.db:SetDualSpecProfile(value) end,
|
||||
values = "ListProfiles",
|
||||
arg = "common",
|
||||
hidden = NoDualSpec,
|
||||
disabled = function(info) return not info.handler.db:IsDualSpecEnabled() end,
|
||||
}
|
||||
|
||||
--- Embed dual spec options into an existing AceDBOptions-3.0 option table.
|
||||
-- @name LibDualSpec:EnhanceOptions
|
||||
-- @param optionTable (table) The option table returned by AceDBOptions-3.0.
|
||||
-- @param target (table) The AceDB-3.0 the options operate on.
|
||||
function lib:EnhanceOptions(optionTable, target)
|
||||
AceDBOptions3 = AceDBOptions3 or LibStub('AceDBOptions-3.0', true)
|
||||
if type(optionTable) ~= "table" then
|
||||
error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable should be a table.", 2)
|
||||
elseif type(target) ~= "table" then
|
||||
error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): target should be a table.", 2)
|
||||
elseif not (AceDBOptions3 and AceDBOptions3.optionTables[target]) then
|
||||
error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable is not an AceDBOptions-3.0 table.", 2)
|
||||
elseif optionTable.handler.db ~= target then
|
||||
error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): optionTable must be the option table of target.", 2)
|
||||
elseif not registry[target] then
|
||||
error("Usage: LibDualSpec:EnhanceOptions(optionTable, target): EnhanceDatabase should be called before EnhanceOptions(optionTable, target).", 2)
|
||||
elseif optionTable.plugins and optionTable.plugins[MAJOR] then
|
||||
return
|
||||
end
|
||||
if not optionTable.plugins then
|
||||
optionTable.plugins = {}
|
||||
end
|
||||
optionTable.plugins[MAJOR] = options
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Inspection
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
local function iterator(registry, key)
|
||||
local data
|
||||
key, data = next(registry, key)
|
||||
if key then
|
||||
return key, data.name
|
||||
end
|
||||
end
|
||||
|
||||
--- Iterate through enhanced AceDB3.0 instances.
|
||||
-- The iterator returns (instance, name) pairs where instance and name are the
|
||||
-- arguments that were provided to lib:EnhanceDatabase.
|
||||
-- @name LibDualSpec:IterateDatabases
|
||||
-- @return Values to be used in a for .. in .. do statement.
|
||||
function lib:IterateDatabases()
|
||||
return iterator, lib.registry
|
||||
end
|
||||
|
||||
-- ----------------------------------------------------------------------------
|
||||
-- Switching logic
|
||||
-- ----------------------------------------------------------------------------
|
||||
|
||||
lib.eventFrame:RegisterEvent('PLAYER_TALENT_UPDATE')
|
||||
lib.eventFrame:SetScript('OnEvent', function()
|
||||
local newTalentGroup = GetActiveTalentGroup()
|
||||
if lib.talentGroup ~= newTalentGroup then
|
||||
lib.talentGroup = newTalentGroup
|
||||
for target in pairs(registry) do
|
||||
target:CheckDualSpecState()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
## Interface: 30300
|
||||
## LoadOnDemand: 1
|
||||
## Title: Lib: DualSpec-1.0
|
||||
## Version: v1.3
|
||||
## X-Date: @project-date@
|
||||
## Notes: Adds dual spec support to individual AceDB-3.0 databases
|
||||
## Author: Adirelle
|
||||
## OptionalDeps: LibStub, Ace3
|
||||
## X-Curse-Packaged-Version: v1.3
|
||||
## X-Curse-Project-Name: LibDualSpec-1.0
|
||||
## X-Curse-Project-ID: libdualspec-1-0
|
||||
## X-Curse-Repository-ID: wow/libdualspec-1-0/mainline
|
||||
|
||||
LibStub.lua
|
||||
LibDualSpec-1.0.lua
|
||||
|
||||
@@ -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.2.lua"/>
|
||||
|
||||
</Ui>
|
||||
@@ -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
|
||||
@@ -0,0 +1,13 @@
|
||||
## Interface: 20400
|
||||
## Title: Lib: LibStub
|
||||
## Notes: Universal Library Stub
|
||||
## Credits: Kaelten, Cladhaire, ckknight, Mikk, Ammo, Nevcairiel
|
||||
## X-Website: http://jira.wowace.com/browse/LS
|
||||
## X-Category: Library
|
||||
## X-License: Public Domain
|
||||
## X-Curse-Packaged-Version: 1.0
|
||||
## X-Curse-Project-Name: LibStub
|
||||
## X-Curse-Project-ID: libstub
|
||||
## X-Curse-Repository-ID: wow/libstub/mainline
|
||||
|
||||
LibStub.lua
|
||||
@@ -0,0 +1,407 @@
|
||||
--[[
|
||||
Name: LibTipHooker-1.1.lua
|
||||
Description: A Library for hooking tooltips.
|
||||
Revision: $Revision: 14 $
|
||||
Author: Whitetooth
|
||||
Email: hotdogee [at] gmail [dot] com
|
||||
LastUpdate: $Date: 2010-10-22 16:07:10 +0000 (Fri, 22 Oct 2010) $
|
||||
Website:
|
||||
Documentation:
|
||||
SVN: $URL $
|
||||
License: LGPL v3
|
||||
]]
|
||||
|
||||
--[[ Features
|
||||
{
|
||||
1. Why not use the OnTooltipSetItem script hook?
|
||||
OnTooltipSetItem is bugged that it's called twice on proffesion patterns, once for the pattern and once for the item it makes.
|
||||
2. Maintains support for most tooltip mods
|
||||
3. Hooks dynamically created tooltips
|
||||
}
|
||||
--]]
|
||||
--[[ Tips for using TipHooker
|
||||
{
|
||||
This library provides tooltip hooks, mainly for use with item tooltip modification, you can easily append or modify text in a tooltip with TipHookerLib.
|
||||
If you need to not only modify the tooltip but also need to scan the tooltip for information, you should use other libraries with TipHookerLib.
|
||||
Because TipHookerLib passes the real tooltip frame to your handler function,
|
||||
which may already be modifided by other addons and may not be suited for scanning.
|
||||
For simple custom scaning you can use GratuityLib, it creates a custom tooltip and scan that for patterns.
|
||||
For a complete item scanning solution to stat scanning you can use ItemBonusLib or StatLogicLib.
|
||||
}
|
||||
--]]
|
||||
|
||||
|
||||
local MAJOR = "LibTipHooker-1.1"
|
||||
local MINOR = "$Revision: 14 $"
|
||||
|
||||
local TipHooker = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
if not TipHooker then return end -- this file is older version
|
||||
|
||||
if TipHooker.VariablesLoaded then return end -- old version already hooked, unable to upgrade
|
||||
|
||||
-----------
|
||||
-- Tools --
|
||||
-----------
|
||||
local DEBUG = false
|
||||
|
||||
-- Localize globals
|
||||
local _G = getfenv(0)
|
||||
local type = type
|
||||
local pairs = pairs
|
||||
local select = select
|
||||
local ipairs = ipairs
|
||||
local strfind = strfind
|
||||
local tinsert = tinsert
|
||||
local hooksecurefunc = hooksecurefunc
|
||||
local EnumerateFrames = EnumerateFrames
|
||||
|
||||
local function print(text)
|
||||
if DEBUG then
|
||||
DEFAULT_CHAT_FRAME:AddMessage(text)
|
||||
end
|
||||
end
|
||||
|
||||
-----------------------
|
||||
-- Hook Tooltip Core --
|
||||
-----------------------
|
||||
local TooltipList = {
|
||||
item = {
|
||||
"GameTooltip",
|
||||
"ItemRefTooltip",
|
||||
"ShoppingTooltip",
|
||||
"ComparisonTooltip",-- EquipCompare
|
||||
"EQCompareTooltip",-- EQCompare
|
||||
"tekKompareTooltip",-- tekKompare
|
||||
"LinkWrangler",-- LinkWrangler
|
||||
"LinksTooltip",-- Links
|
||||
"AtlasLootTooltip",-- AtlasLoot
|
||||
"ItemMagicTooltip",-- ItemMagic
|
||||
"MirrorTooltip",-- Mirror
|
||||
"TooltipExchange_TooltipShow",-- TooltipExchange
|
||||
"AtlasQuestTooltip",-- AtlasQuest
|
||||
},
|
||||
buff = {
|
||||
"GameTooltip",
|
||||
},
|
||||
spell = {
|
||||
"GameTooltip",
|
||||
},
|
||||
talant = {
|
||||
"GameTooltip",
|
||||
},
|
||||
unit = {
|
||||
"GameTooltip",
|
||||
},
|
||||
action = {
|
||||
"GameTooltip",
|
||||
},
|
||||
}
|
||||
|
||||
local MethodList = {
|
||||
item = {
|
||||
"SetHyperlink",
|
||||
"SetBagItem",
|
||||
"SetInventoryItem",
|
||||
-- auction
|
||||
"SetAuctionItem",
|
||||
"SetAuctionSellItem",
|
||||
-- loot
|
||||
"SetLootItem",
|
||||
"SetLootRollItem",
|
||||
-- crafting
|
||||
"SetTradeSkillItem",
|
||||
"SetTrainerService",
|
||||
-- mail
|
||||
"SetInboxItem",
|
||||
"SetSendMailItem",
|
||||
-- quest log
|
||||
"SetQuestItem",
|
||||
"SetQuestLogItem",
|
||||
-- trade
|
||||
"SetTradePlayerItem",
|
||||
"SetTradeTargetItem",
|
||||
-- vendor tooltip
|
||||
"SetMerchantItem",
|
||||
"SetBuybackItem",
|
||||
"SetMerchantCostItem",
|
||||
-- socketing interface
|
||||
"SetSocketGem",
|
||||
"SetExistingSocketGem",
|
||||
-- 2.1.0
|
||||
"SetHyperlinkCompareItem",
|
||||
-- 2.3.0
|
||||
"SetGuildBankItem",
|
||||
-- 3.0
|
||||
"SetCurrencyToken",
|
||||
"SetBackpackToken",
|
||||
-- 4.0
|
||||
"SetReforgeItem",
|
||||
},
|
||||
buff = {
|
||||
"SetPlayerBuff",
|
||||
"SetUnitBuff",
|
||||
"SetUnitDebuff",
|
||||
},
|
||||
spell = {
|
||||
"SetSpell",
|
||||
"SetTrackingSpell",
|
||||
"SetShapeshift",
|
||||
},
|
||||
talant = {
|
||||
"SetTalent",
|
||||
},
|
||||
unit = {
|
||||
"SetUnit",
|
||||
},
|
||||
action = {
|
||||
"SetAction",
|
||||
"SetPetAction",
|
||||
},
|
||||
}
|
||||
|
||||
local HandlerList = TipHooker.HandlerList or {}
|
||||
TipHooker.HandlerList = HandlerList
|
||||
local Set = {
|
||||
item = function(tooltip, ...)
|
||||
if not tooltip.GetItem then return end
|
||||
local name, link = tooltip:GetItem()
|
||||
if not name then return end -- Check if tooltip really has an item
|
||||
for handler in pairs(HandlerList.item) do
|
||||
handler(tooltip, name, link, ...)
|
||||
end
|
||||
end,
|
||||
buff = function(tooltip, unitId, buffIndex, raidFilter)
|
||||
if not unitId then
|
||||
unitId = "player"
|
||||
end
|
||||
for handler in pairs(HandlerList.buff) do
|
||||
handler(tooltip, unitId, buffIndex, raidFilter)
|
||||
end
|
||||
end,
|
||||
spell = function(tooltip, spellId, bookType)
|
||||
for handler in pairs(HandlerList.spell) do
|
||||
handler(tooltip, spellId, bookType)
|
||||
end
|
||||
end,
|
||||
talant = function(tooltip, tabIndex, talentIndex)
|
||||
for handler in pairs(HandlerList.talant) do
|
||||
handler(tooltip, tabIndex, talentIndex)
|
||||
end
|
||||
end,
|
||||
unit = function(tooltip, unit)
|
||||
if not tooltip.GetUnit then return end
|
||||
local name = tooltip:GetUnit()
|
||||
for handler in pairs(HandlerList.unit) do
|
||||
handler(tooltip, unit)
|
||||
end
|
||||
end,
|
||||
action = function(tooltip, slot)
|
||||
for handler in pairs(HandlerList.action) do
|
||||
handler(tooltip, slot)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
||||
|
||||
-- This gets called during VARIABLES_LOADED and :Hook()
|
||||
-- InitializeHook will hook all methods in MethodList[tipType]
|
||||
-- from tooltips in TooltipList[tipType] to the Set[tipType] function
|
||||
local Initialized = {}
|
||||
local function InitializeHook(tipType)
|
||||
if Initialized[tipType] then return end
|
||||
-- Walk through all frames
|
||||
local tooltip = EnumerateFrames()
|
||||
while tooltip do
|
||||
if tooltip:GetObjectType() == "GameTooltip" then
|
||||
local name = tooltip:GetName()
|
||||
if name then
|
||||
for _, v in ipairs(TooltipList[tipType]) do
|
||||
if strfind(name, v) then
|
||||
--print("InitializeHook("..tipType..") = "..name)
|
||||
for _, methodName in ipairs(MethodList[tipType]) do
|
||||
if type(tooltip[methodName]) == "function" then
|
||||
hooksecurefunc(tooltip, methodName, Set[tipType])
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
tooltip = EnumerateFrames(tooltip)
|
||||
end
|
||||
-- Destroy tooltip list so we don't have double hooking accidents
|
||||
Initialized[tipType] = true
|
||||
end
|
||||
|
||||
local HookedFrames = {}
|
||||
local function CreateFrameHook(frameType, name, parent, inheritFrame)
|
||||
if name and frameType == "GameTooltip" then
|
||||
for tipType in pairs(HandlerList) do
|
||||
for _, v in ipairs(TooltipList[tipType]) do
|
||||
-- prevent double hooking by checking HookedFrames table
|
||||
if strfind(name, v) and not HookedFrames[name] then
|
||||
HookedFrames[name] = true
|
||||
--print("CreateFrameHook("..tipType..") = "..name)
|
||||
local tooltip = _G[name]
|
||||
for _, methodName in ipairs(MethodList[tipType]) do
|
||||
if type(tooltip[methodName]) == "function" then
|
||||
hooksecurefunc(tooltip, methodName, Set[tipType])
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
------------------
|
||||
-- OnEventFrame --
|
||||
------------------
|
||||
if TipHooker.OnEventFrame then -- Check for old frame
|
||||
TipHooker.OnEventFrame:UnregisterAllEvents()
|
||||
TipHooker.OnEventFrame:SetScript("OnEvent", nil)
|
||||
end
|
||||
|
||||
local OnEventFrame = CreateFrame("Frame")
|
||||
|
||||
OnEventFrame:RegisterEvent("VARIABLES_LOADED")
|
||||
|
||||
OnEventFrame:SetScript("OnEvent", function(self, event, ...)
|
||||
--print(event)
|
||||
TipHooker.VariablesLoaded = true
|
||||
--print("VariablesLoaded = true")
|
||||
-- Check for exsiting hooks
|
||||
for tipType in pairs(HandlerList) do
|
||||
InitializeHook(tipType)
|
||||
end
|
||||
hooksecurefunc("CreateFrame", CreateFrameHook)
|
||||
end)
|
||||
|
||||
TipHooker.OnEventFrame = OnEventFrame
|
||||
|
||||
-- Loaded on demand
|
||||
if IsLoggedIn() and not TipHooker.VariablesLoaded then
|
||||
OnEventFrame:GetScript("OnEvent")(OnEventFrame, "VARIABLES_LOADED")
|
||||
end
|
||||
|
||||
--[[---------------------------------
|
||||
{ :Hook(handler, ...)
|
||||
-------------------------------------
|
||||
-- Description
|
||||
Hooks tooltip SetX methods with handler
|
||||
-- Args
|
||||
handler
|
||||
func - handler func
|
||||
...
|
||||
string - list of tooltips that you want to hook:
|
||||
"item": Items
|
||||
"buff": Buff/Debuff
|
||||
"spell": Spells
|
||||
"talant": Talants
|
||||
"unit": Units
|
||||
"action": Action button
|
||||
-- Examples
|
||||
}
|
||||
-----------------------------------]]
|
||||
function TipHooker:Hook(handler, ...)
|
||||
for i = 1, select('#', ...) do
|
||||
local tipType = select(i, ...)
|
||||
--print("TipHooker:Hook("..tipType..")")
|
||||
if self.VariablesLoaded then
|
||||
InitializeHook(tipType)
|
||||
end
|
||||
if not HandlerList[tipType] then
|
||||
HandlerList[tipType] = {}
|
||||
end
|
||||
HandlerList[tipType][handler] = true
|
||||
end
|
||||
end
|
||||
|
||||
--[[---------------------------------
|
||||
{ :Unhook(handler, ...)
|
||||
-------------------------------------
|
||||
-- Description
|
||||
Unhooks handler from tooltip SetX methods
|
||||
-- Args
|
||||
handler
|
||||
func - handler func
|
||||
...
|
||||
string - list of tooltips that you want to hook:
|
||||
"item": Items
|
||||
"buff": Buff/Debuff
|
||||
"spell": Spells
|
||||
"talant": Talants
|
||||
"unit": Units
|
||||
"action": Action button
|
||||
-- Examples
|
||||
}
|
||||
-----------------------------------]]
|
||||
function TipHooker:Unhook(handler, ...)
|
||||
for i = 1, select('#', ...) do
|
||||
local tipType = select(i, ...)
|
||||
if HandlerList[tipType] then
|
||||
HandlerList[tipType][handler] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--[[---------------------------------
|
||||
{ :IsHooked(handler, tipType)
|
||||
-------------------------------------
|
||||
-- Description
|
||||
Check if handler is hooker
|
||||
-- Args
|
||||
handler
|
||||
func - handler func
|
||||
tipType
|
||||
string - tooltip that you want to hook:
|
||||
"item": Items
|
||||
"buff": Buff/Debuff
|
||||
"spell": Spells
|
||||
"talant": Talants
|
||||
"unit": Units
|
||||
"action": Action button
|
||||
-- Examples
|
||||
}
|
||||
-----------------------------------]]
|
||||
function TipHooker:IsHooked(handler, tipType)
|
||||
if HandlerList[tipType] then
|
||||
return HandlerList[tipType][handler]
|
||||
end
|
||||
end
|
||||
|
||||
--[[---------------------------------
|
||||
{ :RegisterCustomTooltip(tipType,frameName)
|
||||
-------------------------------------
|
||||
-- Description
|
||||
Unhooks handler from tooltip SetX methods
|
||||
-- Args
|
||||
tipType
|
||||
string - tooltip that you want to hook:
|
||||
"item": Items
|
||||
"buff": Buff/Debuff
|
||||
"spell": Spells
|
||||
"talant": Talants
|
||||
"unit": Units
|
||||
"action": Action button
|
||||
frameName
|
||||
string - name of your tooltip frame you want to be hooked
|
||||
-- Examples
|
||||
}
|
||||
-----------------------------------]]
|
||||
function TipHooker:RegisterCustomTooltip(tipType, frameName)
|
||||
local tooltip = _G[frameName]
|
||||
if(tooltip == nil) then
|
||||
return
|
||||
end
|
||||
--print("InitializeHook("..tipType..") = "..frameName)
|
||||
for _, methodName in ipairs(MethodList[tipType]) do
|
||||
if type(tooltip[methodName]) == "function" then
|
||||
hooksecurefunc(tooltip, methodName, Set[tipType])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--_G.TipHooker = TipHooker
|
||||
@@ -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="LibTipHooker-1.1.lua"/>
|
||||
|
||||
</Ui>
|
||||
Reference in New Issue
Block a user