diff --git a/Fonts/DUF_Font1.ttf b/Fonts/DUF_Font1.ttf new file mode 100644 index 0000000..6f8f872 Binary files /dev/null and b/Fonts/DUF_Font1.ttf differ diff --git a/Fonts/DUF_Font2.ttf b/Fonts/DUF_Font2.ttf new file mode 100644 index 0000000..ee4c740 Binary files /dev/null and b/Fonts/DUF_Font2.ttf differ diff --git a/Fonts/DUF_Font3.ttf b/Fonts/DUF_Font3.ttf new file mode 100644 index 0000000..d17e1be Binary files /dev/null and b/Fonts/DUF_Font3.ttf differ diff --git a/Fonts/DUF_Font4.ttf b/Fonts/DUF_Font4.ttf new file mode 100644 index 0000000..e2da8d8 Binary files /dev/null and b/Fonts/DUF_Font4.ttf differ diff --git a/Fonts/DUF_Font5.ttf b/Fonts/DUF_Font5.ttf new file mode 100644 index 0000000..7e28e41 Binary files /dev/null and b/Fonts/DUF_Font5.ttf differ diff --git a/Fonts/FUTURABC.TTF b/Fonts/FUTURABC.TTF new file mode 100644 index 0000000..be89668 Binary files /dev/null and b/Fonts/FUTURABC.TTF differ diff --git a/Fonts/FUTUXKCI.TTF b/Fonts/FUTUXKCI.TTF new file mode 100644 index 0000000..e5ec6d5 Binary files /dev/null and b/Fonts/FUTUXKCI.TTF differ diff --git a/Fonts/IX_Font_Bold.ttf b/Fonts/IX_Font_Bold.ttf new file mode 100644 index 0000000..b2cd14e Binary files /dev/null and b/Fonts/IX_Font_Bold.ttf differ diff --git a/Fonts/IX_Font_Bold_Italic.ttf b/Fonts/IX_Font_Bold_Italic.ttf new file mode 100644 index 0000000..8b385a3 Binary files /dev/null and b/Fonts/IX_Font_Bold_Italic.ttf differ diff --git a/Fonts/Montreal_Bold.ttf b/Fonts/Montreal_Bold.ttf new file mode 100644 index 0000000..e1d813f Binary files /dev/null and b/Fonts/Montreal_Bold.ttf differ diff --git a/Fonts/Montreal_Heavy_Bold.ttf b/Fonts/Montreal_Heavy_Bold.ttf new file mode 100644 index 0000000..633f832 Binary files /dev/null and b/Fonts/Montreal_Heavy_Bold.ttf differ diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9cecc1d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. 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 +them 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 prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. 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. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey 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; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If 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 convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU 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 that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + 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. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +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. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + 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 +state 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 3 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, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program 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, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU 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. But first, please read +. diff --git a/VCB.lua b/VCB.lua new file mode 100644 index 0000000..c8b946b --- /dev/null +++ b/VCB.lua @@ -0,0 +1,3865 @@ +-- Title: Vanilla Consolidate Buffs (VCB) +-- Author: Shino - Kronos + +-- Global variables +VCB_NAME = "Vanilla Consolidate Buffs" +VCB_VERSION = "4.1" +VCB_IS_LOADED = false +VCB_BF_DUMMY_MODE = false +VCB_FONT_ARRAY = {} +VCB_FONT_ARRAY[1] = "Fonts\\FRIZQT__.ttf" +VCB_FONT_ARRAY[2] = "Fonts\\ARIALN.ttf" +VCB_FONT_ARRAY[3] = "Fonts\\skurri.ttf" +VCB_FONT_ARRAY[4] = "Fonts\\MORPHEUS.ttf" +VCB_FONT_ARRAY[5] = "Interface\\AddOns\\VCB\\Fonts\\DUF_Font1.ttf" +VCB_FONT_ARRAY[6] = "Interface\\AddOns\\VCB\\Fonts\\DUF_Font2.ttf" +VCB_FONT_ARRAY[7] = "Interface\\AddOns\\VCB\\Fonts\\DUF_Font3.ttf" +VCB_FONT_ARRAY[8] = "Interface\\AddOns\\VCB\\Fonts\\DUF_Font4.ttf" +VCB_FONT_ARRAY[9] = "Interface\\AddOns\\VCB\\Fonts\\DUF_Font5.ttf" +VCB_FONT_ARRAY[10] = "Interface\\AddOns\\VCB\\Fonts\\FUTURABC.TTF" +VCB_FONT_ARRAY[11] = "Interface\\AddOns\\VCB\\Fonts\\FUTUXKCI.TTF" +VCB_FONT_ARRAY[12] = "Interface\\AddOns\\VCB\\Fonts\\IX_Font_Bold.ttf" +VCB_FONT_ARRAY[13] = "Interface\\AddOns\\VCB\\Fonts\\IX_Font_Bold_Italic.ttf" +VCB_FONT_ARRAY[14] = "Interface\\AddOns\\VCB\\Fonts\\Montreal_Bold.ttf" +VCB_FONT_ARRAY[15] = "Interface\\AddOns\\VCB\\Fonts\\Montreal_Heavy_Bold.ttf" +VCB_ANCHOR_ARRAY = {} +VCB_ANCHOR_ARRAY[1] = "Bottom" +VCB_ANCHOR_ARRAY[2] = "Right" +VCB_ANCHOR_ARRAY[3] = "Top" +VCB_ANCHOR_ARRAY[4] = "Left" +VCB_BF_COLOR_OBJ = nil +VCB_BF_COLOR_VAR = nil +VCB_BF_COLOR_TAR = nil +VCB_BF_COLOR_TYPE = nil +VCB_ICON_ARRAY = {} +VCB_ICON_ARRAY[1] = "icon" +VCB_BORDER_ARRAY = {} +VCB_BORDER_ARRAY[1] = "Interface\\Tooltips\\UI-Tooltip-Border.tga" +VCB_BORDER_ARRAY[2] = "Interface\\DialogFrame\\UI-DialogBox-Border.tga" +VCB_AURABORDER_ARRAY = {} +VCB_AURABORDER_ARRAY[1] = "Interface\\Buttons\\UI-Debuff-Overlays.tga" +VCB_WEAPONBORDER_ARRAY = {} +VCB_WEAPONBORDER_ARRAY[1] = "Interface\\Buttons\\UI-TempEnchant-Border.tga" +VCB_BACKGROUND_ARRAY = {} +VCB_BACKGROUND_ARRAY[1] = "Interface\\Tooltips\\UI-Tooltip-Background.tga" +VCB_BACKGROUND_ARRAY[2] = "Interface\\DialogFrame\\UI-DialogBox-Background.tga" +VCB_BACKGROUND_ARRAY[3] = "Interface\\CHARACTERFRAME\\UI-Party-Background.tga" +VCB_THEME_NAME = {} +VCB_THEME_NAME[1] = "Default" +VCB_THEME = {} +VCB_THEME[1] = { + Timer_yoffset = 0, + Timer_disableUnit = false, + Timer_hours = false, + Timer_hours_convert = false, + Timer_minutes = true, + Timer_minutes_convert = false, + Timer_tenth = false, + Timer_round = false, + Timer_font = "Fonts\\FRIZQT__.ttf", + Timer_flash = false, + Timer_below_60 = false, + Timer_below_60_color_r = 1, + Timer_below_60_color_g = 0.82, + Timer_below_60_color_b = 0, + Timer_usecfont = false, + Timer_customfont = "", + CF_icon_color_r = 1, + CF_icon_color_g = 1, + CF_icon_color_b = 1, + CF_icon_fontsize = 13, + CF_icon_font = "Fonts\\FRIZQT__.ttf", + CF_icon_opacity = 1, + CF_icon_fontopacity = 1, + CF_icon_texture = "icon", + CF_icon_border = true, + CF_icon_possiblebuffs = false, + CF_icon_showpbgrayedout = false, + CF_icon_attach = true, + CF_icon_usecfont = false, + CF_icon_customfont = "", + CF_BF_anchor = 1, + CF_BF_scale = 1, + CF_BF_invert = false, + CF_BF_numperrow = 5, + CF_BF_bgopacity = 1, + CF_BF_bgcolor_r = 0, + CF_BF_bgcolor_g = 0, + CF_BF_bgcolor_b = 0, + CF_BF_borderopacity = 1, + CF_BF_bordercolor_r = 1, + CF_BF_bordercolor_g = 1, + CF_BF_bordercolor_b = 1, + CF_BF_border = 1, + CF_BF_customborder = false, + CF_BF_customborderpath = "", + CF_BF_background = 1, + CF_BF_custombackground = false, + CF_BF_custombackgroundpath = "", + CF_BF_invertorientation = false, + CF_AURA_bgopacity = 1, + CF_AURA_enableborder = false, + CF_AURA_borderopacity = 1, + CF_AURA_bordercolor_r = 1, + CF_AURA_bordercolor_g = 1, + CF_AURA_bordercolor_b = 1, + CF_AURA_padding_h = 2, + CF_AURA_padding_v = 2, + CF_AURA_border = 1, + CF_AURA_customborder = false, + CF_AURA_customborderpath = "", + CF_AURA_bgcolor_r = 1, + CF_AURA_bgcolor_g = 1, + CF_AURA_bgcolor_b = 1, + CF_AURA_enablebgcolor = false, + CF_AURA_enablefontborder = true, + CF_AURA_fontcolor_r = 1, + CF_AURA_fontcolor_g = 1, + CF_AURA_fontcolor_b = 1, + CF_AURA_font = "Fonts\\FRIZQT__.ttf", + CF_AURA_fontopacity = 1, + CF_AURA_fontsize = 13, + CF_AURA_fontoffset_x = -5, + CF_AURA_fontoffset_y = 5, + CF_TIMER_border = true, + CF_TIMER_fontcolor_r = 1, + CF_TIMER_fontcolor_g = 0.82, + CF_TIMER_fontcolor_b = 0, + CF_TIMER_fontsize = 10, + CF_TIMER_fontopacity = 1, + BF_GENERAL_verticalmode = false, + BF_GENERAL_numperrow = 16, + BF_GENERAL_padding_h = 2, + BF_GENERAL_padding_v = 2, + BF_GENERAL_scale = 1, + BF_GENERAL_bgopacity = 1, + BF_GENERAL_enablebgcolor = false, + BF_GENERAL_bgcolor_r = 1, + BF_GENERAL_bgcolor_g = 1, + BF_GENERAL_bgcolor_b = 1, + BF_GENERAL_enableborder = true, + BF_GENERAL_fontcolor_r = 1, + BF_GENERAL_fontcolor_g = 1, + BF_GENERAL_fontcolor_b = 1, + BF_GENERAL_font = "Fonts\\FRIZQT__.ttf", + BF_GENERAL_fontopacity = 1, + BF_GENERAL_fontsize = 13, + BF_GENERAL_fontoffset_x = -5, + BF_GENERAL_fontoffset_y = 5, + BF_GENERAL_invert = false, + BF_GENERAL_invertorientation = false, + BF_GENERAL_usecfont = false, + BF_GENERAL_customfont = "", + BF_BORDER_enableborder = false, + BF_BORDER_bordercolor_r = 1, + BF_BORDER_bordercolor_g = 1, + BF_BORDER_bordercolor_b = 1, + BF_BORDER_borderopacity = 1, + BF_BORDER_border = 1, + BF_BORDER_usecustomborder = false, + BF_BORDER_customborderpath = "", + BF_TIMER_border = true, + BF_TIMER_fontcolor_r = 1, + BF_TIMER_fontcolor_g = 0.82, + BF_TIMER_fontcolor_b = 0, + BF_TIMER_fontopacity = 1, + BF_TIMER_fontsize = 10, + DBF_GENERAL_verticalmode = false, + DBF_GENERAL_numperrow = 16, + DBF_GENERAL_padding_h = 2, + DBF_GENERAL_padding_v = 2, + DBF_GENERAL_bgopacity = 1, + DBF_GENERAL_scale = 1, + DBF_GENERAL_enablebgcolor = false, + DBF_GENERAL_bgcolor_r = 1, + DBF_GENERAL_bgcolor_g = 1, + DBF_GENERAL_bgcolor_b = 1, + DBF_GENERAL_enableborder = true, + DBF_GENERAL_fontcolor_r = 1, + DBF_GENERAL_fontcolor_g = 1, + DBF_GENERAL_fontcolor_b = 1, + DBF_GENERAL_font = "Fonts\\FRIZQT__.ttf", + DBF_GENERAL_fontopacity = 1, + DBF_GENERAL_fontsize = 13, + DBF_GENERAL_fontoffset_x = -5, + DBF_GENERAL_fontoffset_y = 5, + DBF_GENERAL_invert = false, + DBF_GENERAL_invertorientation = false, + DBF_GENERAL_usecfont = false, + DBF_GENERAL_customfont = "", + DBF_BORDER_enableborder = true, + DBF_BORDER_usecustomborder = false, + DBF_BORDER_customborderpath = "", + DBF_BORDER_border = 1, + DBF_BORDER_borderopacity = 1, + DBF_BORDER_nonecolor_r = 0.8, + DBF_BORDER_nonecolor_g = 0, + DBF_BORDER_nonecolor_b = 0, + DBF_BORDER_poisoncolor_r = 0, + DBF_BORDER_poisoncolor_g = 0.6, + DBF_BORDER_poisoncolor_b = 0, + DBF_BORDER_magiccolor_r = 0.2, + DBF_BORDER_magiccolor_g = 0.6, + DBF_BORDER_magiccolor_b = 1, + DBF_BORDER_cursecolor_r = 0.6, + DBF_BORDER_cursecolor_g = 0, + DBF_BORDER_cursecolor_b = 1, + DBF_BORDER_diseasecolor_r = 0.6, + DBF_BORDER_diseasecolor_g = 0.4, + DBF_BORDER_diseasecolor_b = 0, + DBF_TIMER_enableborder = true, + DBF_TIMER_fontcolor_r = 1, + DBF_TIMER_fontcolor_g = 0.82, + DBF_TIMER_fontcolor_b = 0, + DBF_TIMER_fontsize = 10, + DBF_TIMER_fontopacity = 1, + WP_GENERAL_invert = false, + WP_GENERAL_verticalmode = false, + WP_GENERAL_enablebgcolor = false, + WP_GENERAL_enableborder = true, + WP_GENERAL_bgcolor_r = 1, + WP_GENERAL_bgcolor_g = 1, + WP_GENERAL_bgcolor_b = 1, + WP_GENERAL_attach = false, + WP_GENERAL_padding_h = 2, + WP_GENERAL_padding_v = 2, + WP_GENERAL_fontsize = 13, + WP_GENERAL_fontopacity = 1, + WP_GENERAL_fontcolor_r = 1, + WP_GENERAL_fontcolor_g = 1, + WP_GENERAL_fontcolor_b = 1, + WP_GENERAL_bgopacity = 1, + WP_GENERAL_scale = 1, + WP_GENERAL_font = "Fonts\\FRIZQT__.ttf", + WP_GENERAL_offset_x = -2, + WP_GENERAL_offset_y = 2, + WP_GENERAL_usecfont = false, + WP_GENERAL_customfont = "", + WP_BORDER_enableborder = true, + WP_BORDER_usecustomborder = false, + WP_BORDER_bordercolor_r = 0.2, + WP_BORDER_bordercolor_g = 0.2, + WP_BORDER_bordercolor_b = 0.8, + WP_BORDER_borderopacity = 1, + WP_BORDER_border = 1, + WP_BORDER_customborderpath = "", + WP_TIMER_enableborder = true, + WP_TIMER_fontcolor_r = 1, + WP_TIMER_fontcolor_g = 0.82, + WP_TIMER_fontcolor_b = 0, + WP_TIMER_fontopacity = 1, + WP_TIMER_fontsize = 10, + MISC_disable_CF = false, + MISC_disable_BB = false, + BF_POS = { + [1] = "CENTER", + [2] = 0, + [3] = 0, + }, + DBF_POS = { + [1] = "CENTER", + [2] = 0, + [3] = 0, + }, +} + +--[[ +-- VCB_OnLoad() +-- @returns: Void +-- Use: Initialization and registering events +--]] +function VCB_OnLoad() + this:RegisterEvent("VARIABLES_LOADED") + this:RegisterEvent("PARTY_MEMBERS_CHANGED") + this:RegisterEvent("RAID_ROSTER_UPDATE") + this:RegisterEvent("PLAYER_ENTERING_WORLD") + + SLASH_VCB1 = "/VanillaConsolidateBuffs" + SLASH_VCB2 = "/vanillaconsolidatebuffs" + SLASH_VCB3 = "/VCB" + SLASH_VCB4 = "/vcb" + SlashCmdList["VCB"] = function(msg) + VCB_SlashCommandHandler(msg) + end + + DEFAULT_CHAT_FRAME:AddMessage("VCB "..VCB_VERSION..VCB_WELCOME_TEXT) +end + +function VCB_OnEvent(event) + if event == "VARIABLES_LOADED" and VCB_IS_LOADED == false then + if VCB_SAVE == nil then + VCB_SAVE = {} + VCB_SAVE = { + Timer_yoffset = 0, + Timer_disableUnit = false, + Timer_hours = false, + Timer_hours_convert = false, + Timer_minutes = true, + Timer_minutes_convert = false, + Timer_tenth = false, + Timer_round = false, + Timer_font = "Fonts\\FRIZQT__.ttf", + Timer_flash = false, + Timer_below_60 = false, + Timer_below_60_color_g = 0.82, + Timer_below_60_color_b = 0, + Timer_usecfont = false, + Timer_customfont = "", + CF_icon_color_r = 1, + CF_icon_color_g = 1, + CF_icon_color_b = 1, + CF_icon_fontsize = 13, + CF_icon_font = "Fonts\\FRIZQT__.ttf", + CF_icon_opacity = 1, + CF_icon_fontopacity = 1, + CF_icon_texture = "icon", + CF_icon_border = true, + CF_icon_possiblebuffs = false, + CF_icon_showpbgrayedout = false, + CF_icon_attach = true, + CF_icon_usecfont = false, + CF_icon_customfont = "", + CF_BF_anchor = 1, + CF_BF_scale = 1, + CF_BF_invert = false, + CF_BF_numperrow = 5, + CF_BF_bgopacity = 1, + CF_BF_bgcolor_r = 0, + CF_BF_bgcolor_g = 0, + CF_BF_bgcolor_b = 0, + CF_BF_borderopacity = 1, + CF_BF_bordercolor_r = 1, + CF_BF_bordercolor_g = 1, + CF_BF_bordercolor_b = 1, + CF_BF_border = 1, + CF_BF_customborder = false, + CF_BF_customborderpath = "", + CF_BF_background = 1, + CF_BF_custombackground = false, + CF_BF_custombackgroundpath = "", + CF_BF_invertorientation = false, + CF_AURA_bgopacity = 1, + CF_AURA_enableborder = false, + CF_AURA_borderopacity = 1, + CF_AURA_bordercolor_r = 1, + CF_AURA_bordercolor_g = 1, + CF_AURA_bordercolor_b = 1, + CF_AURA_padding_h = 2, + CF_AURA_padding_v = 2, + CF_AURA_border = 1, + CF_AURA_customborder = false, + CF_AURA_customborderpath = "", + CF_AURA_bgcolor_r = 1, + CF_AURA_bgcolor_g = 1, + CF_AURA_bgcolor_b = 1, + CF_AURA_enablebgcolor = false, + CF_AURA_enablefontborder = true, + CF_AURA_fontcolor_r = 1, + CF_AURA_fontcolor_g = 1, + CF_AURA_fontcolor_b = 1, + CF_AURA_font = "Fonts\\FRIZQT__.ttf", + CF_AURA_fontopacity = 1, + CF_AURA_fontsize = 13, + CF_AURA_fontoffset_x = -5, + CF_AURA_fontoffset_y = 5, + CF_TIMER_border = true, + CF_TIMER_fontcolor_r = 1, + CF_TIMER_fontcolor_g = 0.82, + CF_TIMER_fontcolor_b = 0, + CF_TIMER_fontsize = 10, + CF_TIMER_fontopacity = 1, + BF_GENERAL_verticalmode = false, + BF_GENERAL_numperrow = 16, + BF_GENERAL_padding_h = 2, + BF_GENERAL_padding_v = 2, + BF_GENERAL_scale = 1, + BF_GENERAL_bgopacity = 1, + BF_GENERAL_enablebgcolor = false, + BF_GENERAL_bgcolor_r = 1, + BF_GENERAL_bgcolor_g = 1, + BF_GENERAL_bgcolor_b = 1, + BF_GENERAL_enableborder = true, + BF_GENERAL_fontcolor_r = 1, + BF_GENERAL_fontcolor_g = 1, + BF_GENERAL_fontcolor_b = 1, + BF_GENERAL_font = "Fonts\\FRIZQT__.ttf", + BF_GENERAL_fontopacity = 1, + BF_GENERAL_fontsize = 13, + BF_GENERAL_fontoffset_x = -5, + BF_GENERAL_fontoffset_y = 5, + BF_GENERAL_invert = false, + BF_GENERAL_invertorientation = false, + BF_GENERAL_usecfont = false, + BF_GENERAL_customfont = "", + BF_BORDER_enableborder = false, + BF_BORDER_bordercolor_r = 1, + BF_BORDER_bordercolor_g = 1, + BF_BORDER_bordercolor_b = 1, + BF_BORDER_borderopacity = 1, + BF_BORDER_border = 1, + BF_BORDER_usecustomborder = false, + BF_BORDER_customborderpath = "", + BF_TIMER_border = true, + BF_TIMER_fontcolor_r = 1, + BF_TIMER_fontcolor_g = 0.82, + BF_TIMER_fontcolor_b = 0, + BF_TIMER_fontopacity = 1, + BF_TIMER_fontsize = 10, + DBF_GENERAL_verticalmode = false, + DBF_GENERAL_numperrow = 16, + DBF_GENERAL_padding_h = 2, + DBF_GENERAL_padding_v = 2, + DBF_GENERAL_bgopacity = 1, + DBF_GENERAL_scale = 1, + DBF_GENERAL_enablebgcolor = false, + DBF_GENERAL_bgcolor_r = 1, + DBF_GENERAL_bgcolor_g = 1, + DBF_GENERAL_bgcolor_b = 1, + DBF_GENERAL_enableborder = true, + DBF_GENERAL_fontcolor_r = 1, + DBF_GENERAL_fontcolor_g = 1, + DBF_GENERAL_fontcolor_b = 1, + DBF_GENERAL_font = "Fonts\\FRIZQT__.ttf", + DBF_GENERAL_fontopacity = 1, + DBF_GENERAL_fontsize = 13, + DBF_GENERAL_fontoffset_x = -5, + DBF_GENERAL_fontoffset_y = 5, + DBF_GENERAL_invert = false, + DBF_GENERAL_invertorientation = false, + DBF_GENERAL_usecfont = false, + DBF_GENERAL_customfont = "", + DBF_BORDER_enableborder = true, + DBF_BORDER_usecustomborder = false, + DBF_BORDER_customborderpath = "", + DBF_BORDER_border = 1, + DBF_BORDER_borderopacity = 1, + DBF_BORDER_nonecolor_r = 0.8, + DBF_BORDER_nonecolor_g = 0, + DBF_BORDER_nonecolor_b = 0, + DBF_BORDER_poisoncolor_r = 0, + DBF_BORDER_poisoncolor_g = 0.6, + DBF_BORDER_poisoncolor_b = 0, + DBF_BORDER_magiccolor_r = 0.2, + DBF_BORDER_magiccolor_g = 0.6, + DBF_BORDER_magiccolor_b = 1, + DBF_BORDER_cursecolor_r = 0.6, + DBF_BORDER_cursecolor_g = 0, + DBF_BORDER_cursecolor_b = 1, + DBF_BORDER_diseasecolor_r = 0.6, + DBF_BORDER_diseasecolor_g = 0.4, + DBF_BORDER_diseasecolor_b = 0, + DBF_TIMER_enableborder = true, + DBF_TIMER_fontcolor_r = 1, + DBF_TIMER_fontcolor_g = 0.82, + DBF_TIMER_fontcolor_b = 0, + DBF_TIMER_fontsize = 10, + DBF_TIMER_fontopacity = 1, + WP_GENERAL_invert = false, + WP_GENERAL_verticalmode = false, + WP_GENERAL_enablebgcolor = false, + WP_GENERAL_enableborder = true, + WP_GENERAL_bgcolor_r = 1, + WP_GENERAL_bgcolor_g = 1, + WP_GENERAL_bgcolor_b = 1, + WP_GENERAL_attach = false, + WP_GENERAL_padding_h = 2, + WP_GENERAL_padding_v = 2, + WP_GENERAL_fontsize = 13, + WP_GENERAL_fontopacity = 1, + WP_GENERAL_fontcolor_r = 1, + WP_GENERAL_fontcolor_g = 1, + WP_GENERAL_fontcolor_b = 1, + WP_GENERAL_bgopacity = 1, + WP_GENERAL_scale = 1, + WP_GENERAL_font = "Fonts\\FRIZQT__.ttf", + WP_GENERAL_offset_x = -2, + WP_GENERAL_offset_y = 2, + WP_GENERAL_usecfont = false, + WP_GENERAL_customfont = "", + WP_BORDER_enableborder = true, + WP_BORDER_usecustomborder = false, + WP_BORDER_bordercolor_r = 0.2, + WP_BORDER_bordercolor_g = 0.2, + WP_BORDER_bordercolor_b = 0.8, + WP_BORDER_borderopacity = 1, + WP_BORDER_border = 1, + WP_BORDER_customborderpath = "", + WP_TIMER_enableborder = true, + WP_TIMER_fontcolor_r = 1, + WP_TIMER_fontcolor_g = 0.82, + WP_TIMER_fontcolor_b = 0, + WP_TIMER_fontopacity = 1, + WP_TIMER_fontsize = 10, + MISC_disable_CF = false, + MISC_disable_BB = false, + BF_POS = { + [1] = "CENTER", + [2] = 0, + [3] = 0, + }, + DBF_POS = { + [1] = "CENTER", + [2] = 0, + [3] = 0, + }, + } + end + if VCB_BF_LOCKED == nil then + VCB_BF_LOCKED = false + end + if Consolidated_Buffs == nil then + Consolidated_Buffs = {} + Consolidated_Buffs = { + -- Druid Buffs + [1] = VCB_CONSOLIDATED_BUFFS_TEXT_1, + [2] = VCB_CONSOLIDATED_BUFFS_TEXT_2, + -- Priest Buffs + [3] = VCB_CONSOLIDATED_BUFFS_TEXT_3, + [4] = VCB_CONSOLIDATED_BUFFS_TEXT_4, + [5] = VCB_CONSOLIDATED_BUFFS_TEXT_5, + [6] = VCB_CONSOLIDATED_BUFFS_TEXT_6, + [7] = VCB_CONSOLIDATED_BUFFS_TEXT_7, + [8] = VCB_CONSOLIDATED_BUFFS_TEXT_8, + -- Mage Buffs + [9] = VCB_CONSOLIDATED_BUFFS_TEXT_9, + [10] = VCB_CONSOLIDATED_BUFFS_TEXT_10, + -- Paladin Buffs + [11] = VCB_CONSOLIDATED_BUFFS_TEXT_11, + [12] = VCB_CONSOLIDATED_BUFFS_TEXT_12, + [13] = VCB_CONSOLIDATED_BUFFS_TEXT_13, + [14] = VCB_CONSOLIDATED_BUFFS_TEXT_14, + [15] = VCB_CONSOLIDATED_BUFFS_TEXT_15, + [16] = VCB_CONSOLIDATED_BUFFS_TEXT_16, + -- Hunter + [17] = VCB_CONSOLIDATED_BUFFS_TEXT_17, + -- Warlock, Rogue and Warrior left out + } + end + if Banned_Buffs == nil then + Banned_Buffs = {} + end + if VCB_Profile == nil then + VCB_Profile = {} + end + if VCB_Profile_Name == nil then + VCB_Profile_Name = {} + end + if VCB_CUR_PROFILE == nil then + VCB_CUR_PROFILE = VCB_CUR_PROFILE_TEXT + end + if VCB_WP_POSX == nil then + VCB_WP_POSX = 0 + end + if VCB_WP_POSY == nil then + VCB_WP_POSY = 0 + end + if VCB_WP_POINT == nil then + VCB_WP_POINT = "CENTER" + end + if VCB_ICON_POSX == nil then + VCB_ICON_POSX = 0 + end + if VCB_ICON_POSY == nil then + VCB_ICON_POSY = 0 + end + if VCB_ICON_POINT == nil then + VCB_ICON_POINT = "CENTER" + end + if not VCB_SAVE["Timer_yoffset"] then + VCB_SAVE["Timer_yoffset"] = 0 + end + + -- New variables since v2.5: + if VCB_SAVE["Timer_below_60"] == nil then VCB_SAVE["Timer_below_60"] = false end + if VCB_SAVE["Timer_below_60_color_r"] == nil then VCB_SAVE["Timer_below_60_color_r"] = 1 end + if VCB_SAVE["Timer_below_60_color_g"] == nil then VCB_SAVE["Timer_below_60_color_g"] = 0.82 end + if VCB_SAVE["Timer_below_60_color_b"] == nil then VCB_SAVE["Timer_below_60_color_b"] = 0 end + if VCB_SAVE["CF_icon_attach"] == nil then VCB_SAVE["CF_icon_attach"] = true end + if VCB_MM_ICON == nil then VCB_MM_ICON = false end + if VCB_SAVE["CF_icon_usecfont"] == nil then VCB_SAVE["CF_icon_usecfont"] = false end + if VCB_SAVE["CF_icon_customfont"] == nil then VCB_SAVE["CF_icon_customfont"] = "" end + if VCB_SAVE["Timer_usecfont"] == nil then VCB_SAVE["Timer_usecfont"] = false end + if VCB_SAVE["Timer_customfont"] == nil then VCB_SAVE["Timer_customfont"] = "" end + if VCB_SAVE["BF_GENERAL_usecfont"] == nil then VCB_SAVE["BF_GENERAL_usecfont"] = false end + if VCB_SAVE["BF_GENERAL_customfont"] == nil then VCB_SAVE["BF_GENERAL_customfont"] = "" end + if VCB_SAVE["DBF_GENERAL_usecfont"] == nil then VCB_SAVE["DBF_GENERAL_usecfont"] = false end + if VCB_SAVE["DBF_GENERAL_customfont"] == nil then VCB_SAVE["DBF_GENERAL_customfont"] = "" end + if VCB_SAVE["WP_GENERAL_usecfont"] == nil then VCB_SAVE["WP_GENERAL_usecfont"] = false end + if VCB_SAVE["WP_GENERAL_customfont"] == nil then VCB_SAVE["WP_GENERAL_customfont"] = "" end + + -- To catch a crash due to the font update + if strsub(VCB_SAVE["Timer_font"], 1, 5) ~= "Fonts" then + VCB_SAVE["Timer_font"] = "Fonts\\FRIZQT__.ttf" + VCB_SAVE["CF_icon_font"] = "Fonts\\FRIZQT__.ttf" + VCB_SAVE["CF_AURA_font"] = "Fonts\\FRIZQT__.ttf" + VCB_SAVE["BF_GENERAL_font"] = "Fonts\\FRIZQT__.ttf" + VCB_SAVE["DBF_GENERAL_font"] = "Fonts\\FRIZQT__.ttf" + VCB_SAVE["WP_GENERAL_font"] = "Fonts\\FRIZQT__.ttf" + end + + VCB_INITIALIZE() + VCB_BF_Lock(VCB_BF_LOCKED) + + VCB_BF_WEAPON_BUTTON_OnEvent(false) + if (VCB_SAVE["BF_POS"] and VCB_SAVE["BF_POS"][1]) then + VCB_BF_BUFF_FRAME:ClearAllPoints() + VCB_BF_BUFF_FRAME:SetPoint(VCB_SAVE["BF_POS"][1], UIParent, VCB_SAVE["BF_POS"][1], VCB_SAVE["BF_POS"][2], VCB_SAVE["BF_POS"][3]) + end + if (VCB_SAVE["DBF_POS"] and VCB_SAVE["DBF_POS"][1]) then + VCB_BF_DEBUFF_FRAME:ClearAllPoints() + VCB_BF_DEBUFF_FRAME:SetPoint(VCB_SAVE["DBF_POS"][1], UIParent, VCB_SAVE["DBF_POS"][1], VCB_SAVE["DBF_POS"][2], VCB_SAVE["DBF_POS"][3]) + end + VCB_IS_LOADED = true + elseif (event == "PARTY_MEMBERS_CHANGED" or event == "RAID_ROSTER_UPDATE") then + if VCB_SAVE["CF_icon_possiblebuffs"] then + VCB_BF_RepositioningAndResizing() + end + elseif (event == "PLAYER_ENTERING_WORLD") and VCB_IS_LOADED then + VCB_BF_WEAPON_BUTTON_OnEvent(false) + if (VCB_SAVE["BF_POS"] and VCB_SAVE["BF_POS"][1]) then + VCB_BF_BUFF_FRAME:ClearAllPoints() + VCB_BF_BUFF_FRAME:SetPoint(VCB_SAVE["BF_POS"][1], UIParent, VCB_SAVE["BF_POS"][1], VCB_SAVE["BF_POS"][2], VCB_SAVE["BF_POS"][3]) + end + if (VCB_SAVE["DBF_POS"] and VCB_SAVE["DBF_POS"][1]) then + VCB_BF_DEBUFF_FRAME:ClearAllPoints() + VCB_BF_DEBUFF_FRAME:SetPoint(VCB_SAVE["DBF_POS"][1], UIParent, VCB_SAVE["DBF_POS"][1], VCB_SAVE["DBF_POS"][2], VCB_SAVE["DBF_POS"][3]) + end + end +end + +function VCB_SAVEFRAMEPOS() + local point, _, _, xOfs, yOfs = VCB_BF_BUFF_FRAME:GetPoint() + VCB_SAVE["BF_POS"] = {} + VCB_SAVE["BF_POS"][1] = point; + VCB_SAVE["BF_POS"][2] = xOfs; + VCB_SAVE["BF_POS"][3] = yOfs; + point, _, _, xOfs, yOfs = VCB_BF_DEBUFF_FRAME:GetPoint() + VCB_SAVE["DBF_POS"] = {} + VCB_SAVE["DBF_POS"][1] = point; + VCB_SAVE["DBF_POS"][2] = xOfs; + VCB_SAVE["DBF_POS"][3] = yOfs; + if not VCB_SAVE["CF_icon_attach"] then + point, _, _, xOfs, yOfs = VCB_BF_CONSOLIDATED_ICON:GetPoint() + VCB_ICON_POINT = point + VCB_ICON_POSX = xOfs + VCB_ICON_POSY = yOfs + end + if not VCB_SAVE["WP_GENERAL_attach"] then + point, _, _, xOfs, yOfs = VCB_BF_WEAPON_FRAME:GetPoint() + VCB_WP_POINT = point + VCB_WP_POSX = xOfs + VCB_WP_POSY = yOfs + end +end + +function VCB_INITIALIZE() + VCB_BF_CONSOLIDATED_BUFFFRAME:ClearAllPoints() + if VCB_SAVE["CF_BF_anchor"] == 1 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("TOP", VCB_BF_CONSOLIDATED_ICON, "BOTTOM", 0, 0) + elseif VCB_SAVE["CF_BF_anchor"] == 2 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("LEFT", VCB_BF_CONSOLIDATED_ICON, "RIGHT", 0, 0) + elseif VCB_SAVE["CF_BF_anchor"] == 3 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("BOTTOM", VCB_BF_CONSOLIDATED_ICON, "TOP", 0, 0) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("RIGHT", VCB_BF_CONSOLIDATED_ICON, "LEFT", 0, 0) + end + + VCB_BF_CONSOLIDATED_ICON:SetAlpha(VCB_SAVE["CF_icon_opacity"]) + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + VCB_BF_CONSOLIDATED_ICONCount:SetTextColor(VCB_SAVE["CF_icon_color_r"], VCB_SAVE["CF_icon_color_g"], VCB_SAVE["CF_icon_color_b"], VCB_SAVE["CF_icon_fontopacity"]) + VCB_BF_CONSOLIDATED_ICONIcon:SetTexture(nil) + VCB_BF_CONSOLIDATED_ICONIcon:SetTexture("Interface\\AddOns\\VCB\\images\\"..VCB_SAVE["CF_icon_texture"]..".tga") + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_customborder"] then + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + else + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + for i=0,15 do + + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetPoint("TOPLEFT", getglobal("VCB_BF_DEBUFF_BUTTON"..i), "BOTTOMLEFT", -20, VCB_SAVE["Timer_yoffset"]) + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetPoint("TOPRIGHT", getglobal("VCB_BF_DEBUFF_BUTTON"..i), "BOTTOMRIGHT", 20, VCB_SAVE["Timer_yoffset"]) + + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + if VCB_SAVE["DBF_GENERAL_enablebgcolor"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["DBF_GENERAL_bgcolor_r"],VCB_SAVE["DBF_GENERAL_bgcolor_g"],VCB_SAVE["DBF_GENERAL_bgcolor_b"],VCB_SAVE["DBF_GENERAL_bgopacity"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(1,1,1,VCB_SAVE["DBF_GENERAL_bgopacity"]) + end + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["DBF_BORDER_enableborder"] then + if VCB_SAVE["DBF_BORDER_usecustomborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["DBF_BORDER_customborderpath"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["DBF_BORDER_border"]]) + end + end + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetAlpha(VCB_SAVE["DBF_BORDER_borderopacity"]) -- Need colors + if VCB_SAVE["Timer_usecfont"] then + if VCB_SAVE["DBF_TIMER_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + else + if VCB_SAVE["DBF_TIMER_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + end + if VCB_SAVE["DBF_GENERAL_usecfont"] then + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + else + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetVertexColor(VCB_SAVE["DBF_GENERAL_fontcolor_r"],VCB_SAVE["DBF_GENERAL_fontcolor_g"],VCB_SAVE["DBF_GENERAL_fontcolor_b"],VCB_SAVE["DBF_GENERAL_fontopacity"]) + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["DBF_GENERAL_fontoffset_x"], VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetTextColor(VCB_SAVE["DBF_TIMER_fontcolor_r"],VCB_SAVE["DBF_TIMER_fontcolor_g"],VCB_SAVE["DBF_TIMER_fontcolor_b"],VCB_SAVE["DBF_TIMER_fontopacity"]) + end + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):ClearAllPoints() + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetPoint("TOPLEFT", getglobal("VCB_BF_WEAPON_BUTTON"..i), "BOTTOMLEFT", -20, VCB_SAVE["Timer_yoffset"]) + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetPoint("TOPRIGHT", getglobal("VCB_BF_WEAPON_BUTTON"..i), "BOTTOMRIGHT", 20, VCB_SAVE["Timer_yoffset"]) + + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["WP_GENERAL_verticalmode"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", VCB_BF_WEAPON_FRAME, "TOPRIGHT", 0, -(44+VCB_SAVE["WP_GENERAL_padding_v"])*i) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", VCB_BF_WEAPON_FRAME, "TOPRIGHT", -(32+VCB_SAVE["WP_GENERAL_padding_h"])*i, 0) + end + if VCB_SAVE["WP_GENERAL_enablebgcolor"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["WP_GENERAL_bgcolor_r"],VCB_SAVE["WP_GENERAL_bgcolor_g"],VCB_SAVE["WP_GENERAL_bgcolor_b"],VCB_SAVE["WP_GENERAL_bgopacity"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(1,1,1,VCB_SAVE["WP_GENERAL_bgopacity"]) + end + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["WP_BORDER_enableborder"] then + if VCB_SAVE["WP_BORDER_usecustomborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["WP_BORDER_customborderpath"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_WEAPONBORDER_ARRAY[VCB_SAVE["WP_BORDER_border"]]) -- why does the debuff border not work :/ + end + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["WP_BORDER_bordercolor_r"],VCB_SAVE["WP_BORDER_bordercolor_g"],VCB_SAVE["WP_BORDER_bordercolor_b"],VCB_SAVE["WP_BORDER_borderopacity"]) + end + if VCB_SAVE["Timer_usecfont"] then + if VCB_SAVE["WP_TIMER_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"]) + end + else + if VCB_SAVE["WP_TIMER_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + if VCB_SAVE["WP_GENERAL_usecfont"] then + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + else + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetVertexColor(VCB_SAVE["WP_GENERAL_fontcolor_r"],VCB_SAVE["WP_GENERAL_fontcolor_g"],VCB_SAVE["WP_GENERAL_fontcolor_b"],VCB_SAVE["WP_GENERAL_fontopacity"]) + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["WP_GENERAL_offset_x"], VCB_SAVE["WP_GENERAL_offset_y"]) + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetTextColor(VCB_SAVE["WP_TIMER_fontcolor_r"],VCB_SAVE["WP_TIMER_fontcolor_g"],VCB_SAVE["WP_TIMER_fontcolor_b"],VCB_SAVE["WP_TIMER_fontopacity"]) + end + VCB_BF_CONSOLIDATED_ICON:ClearAllPoints() + if VCB_SAVE["CF_icon_attach"] then + VCB_BF_CONSOLIDATED_ICON:SetPoint("TOPRIGHT", 0, 0) + else + VCB_BF_CONSOLIDATED_ICON:SetPoint(VCB_ICON_POINT, UIParent, VCB_ICON_POINT, VCB_ICON_POSX, VCB_ICON_POSY) + end + if VCB_SAVE["CF_icon_usecfont"] then + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"]) + end + else + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + end + if (not VCB_BF_PM_FRAME:IsVisible()) then + VCB_BF_WEAPON_BUTTON_OnEvent(false) + end + if VCB_SAVE["WP_GENERAL_attach"] then + VCB_BF_WEAPON_FRAME:ClearAllPoints() + VCB_BF_WEAPON_FRAME:SetScale(1) + VCB_BF_WEAPON_FRAME:SetParent(VCB_BF_BUFF_FRAME) + VCB_BF_WEAPON_FRAME:SetPoint("TOPRIGHT", VCB_BF_BUFF_FRAME, "TOPRIGHT", 0, 0) + else + VCB_BF_WEAPON_FRAME:SetPoint(VCB_WP_POINT, UIParent, VCB_WP_POINT, VCB_WP_POSX, VCB_WP_POSY) + VCB_BF_WEAPON_FRAME:SetScale(VCB_SAVE["WP_GENERAL_scale"]) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetScale(VCB_SAVE["CF_BF_scale"]) + VCB_BF_BUFF_FRAME:SetScale(VCB_SAVE["BF_GENERAL_scale"]) + VCB_BF_DEBUFF_FRAME:SetScale(VCB_SAVE["DBF_GENERAL_scale"]) + if VCB_SAVE["MISC_disable_CF"] then + VCB_BF_CONSOLIDATED_ICON:Hide() + end + if VCB_MM_ICON then + VCB_BF_MINIMAP_FRAME:Hide() + end +end + +function VCB_SlashCommandHandler(msg) + if(msg) then + VCB_BF_ConfigFrame:Show() + end +end + +function VCB_tablelength(T) + local count = 0 + for _ in pairs(T) do + count = count + 1 + end + return count +end + +function VCB_Contains(table, element) + for _, value in pairs(table) do + if value == element then + return true + end + end + return false +end + +function VCB_GetKeys(a, b) + local i = 0 + while true do + if a[i] == b then + return i + end + end +end + +function VCB_Table_GetKeys(a, b) + local i = 1 + while true do + if a[i] == b then + return i + end + i = i + 1 + end +end + +function VCB_EmptyTable(t) + for k in pairs (t) do + t [k] = nil + end +end + +function VCB_SendMessage(msg) + DEFAULT_CHAT_FRAME:AddMessage("|cFFFF8080VCB v"..VCB_VERSION..":|r "..msg) +end + +---------------------------------------OPTION FRAME BEGIN----------------------------------------------------------------------------------------------------------------- + +function VCB_OPTIONS_HIDE_ALL() + getglobal("VCB_BF_CONSOLIDATED_FRAME"):Hide() + getglobal("VCB_BF_BANNED_FRAME"):Hide() + getglobal("VCB_BF_TIMER_FRAME"):Hide() + getglobal("VCB_BF_CF_FRAME"):Hide() + getglobal("VCB_BF_CF_FRAME2"):Hide() + getglobal("VCB_BF_BF_FRAME"):Hide() + getglobal("VCB_BF_BF_FRAME2"):Hide() + getglobal("VCB_BF_DBF_FRAME"):Hide() + getglobal("VCB_BF_DBF_FRAME2"):Hide() + getglobal("VCB_BF_WP_FRAME"):Hide() + getglobal("VCB_BF_WP_FRAME2"):Hide() + getglobal("VCB_BF_MISC_FRAME"):Hide() + getglobal("VCB_BF_PM_FRAME"):Hide() + --getglobal("VCB_BF_OM_FRAME"):Hide() + getglobal("VCB_BF_ABOUT_FRAME"):Hide() +end + +function VCB_OPTIONS_SHOW(frame, text) + getglobal(frame):Show() + getglobal("VCB_BF_CONFIG_FRAME_TITLE_TEXT"):SetText(text) + VCB_PAGEINIT(frame) + PlaySound("igMainMenuOptionCheckBoxOff") +end + +function VCB_PAGEINIT(frame) + if frame == "VCB_BF_TIMER_FRAME" then + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["Timer_hours"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["Timer_hours_convert"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON3"):SetChecked(VCB_SAVE["Timer_minutes"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON4"):SetChecked(VCB_SAVE["Timer_minutes_convert"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON5"):SetChecked(VCB_SAVE["Timer_tenth"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON_DISABLE"):SetChecked(VCB_SAVE["Timer_disableUnit"]) + if VCB_SAVE["Timer_round"] then + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON6"):SetChecked(false) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON7"):SetChecked(true) + else + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON6"):SetChecked(true) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON7"):SetChecked(false) + end + getglobal("VCB_BF_TIMER_FRAME_FontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["Timer_font"])) + getglobal("VCB_BF_TIMER_FRAME_YOffset"):SetValue(tonumber(VCB_SAVE["Timer_yoffset"]) or 0) + getglobal("VCB_BF_TIMER_FRAME_FontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["Timer_font"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON8"):SetChecked(VCB_SAVE["Timer_flash"]) + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON9"):SetChecked(VCB_SAVE["Timer_below_60"]) + getglobal("VCB_BF_TIMER_FRAME_ColorNormalTexture"):SetVertexColor(VCB_SAVE["Timer_below_60_color_r"], VCB_SAVE["Timer_below_60_color_g"], VCB_SAVE["Timer_below_60_color_b"]) + getglobal("VCB_BF_TIMER_FRAME_Color_SwatchBg").r = VCB_SAVE["Timer_below_60_color_r"] + getglobal("VCB_BF_TIMER_FRAME_Color_SwatchBg").g = VCB_SAVE["Timer_below_60_color_g"] + getglobal("VCB_BF_TIMER_FRAME_Color_SwatchBg").b = VCB_SAVE["Timer_below_60_color_b"] + getglobal("VCB_BF_TIMER_FRAME_CHECKBUTTON_CUSTOMFONT"):SetChecked(VCB_SAVE["Timer_usecfont"]) + getglobal("VCB_BF_TIMER_FRAME_EDITBOX_CUSTOMFONT"):SetText(VCB_SAVE["Timer_customfont"]) + elseif frame == "VCB_BF_CF_FRAME" then + getglobal("VCB_BF_CF_FRAME_AnchorSlider"):SetValue(VCB_SAVE["CF_BF_anchor"]) + getglobal("VCB_BF_CF_FRAME_AnchorSliderText"):SetText(VCB_CF_FRAME_BF_ANCHOR..": "..VCB_ANCHOR_ARRAY[VCB_SAVE["CF_BF_anchor"]]) + getglobal("VCB_BF_CF_FRAME_ScaleSlider"):SetValue(VCB_SAVE["CF_BF_scale"]) + getglobal("VCB_BF_CF_FRAME_ScaleSliderText"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["CF_BF_scale"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["CF_BF_invert"]) + getglobal("VCB_BF_CF_FRAME_NumPerRowSlider"):SetValue(VCB_SAVE["CF_BF_numperrow"]) + getglobal("VCB_BF_CF_FRAME_NumPerRowSliderText"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["CF_BF_numperrow"]) + getglobal("VCB_BF_CF_FRAME_ColorNormalTexture"):SetVertexColor(VCB_SAVE["CF_icon_color_r"], VCB_SAVE["CF_icon_color_g"], VCB_SAVE["CF_icon_color_b"]) + getglobal("VCB_BF_CF_FRAME_Color_SwatchBg").r = VCB_SAVE["CF_icon_color_r"] + getglobal("VCB_BF_CF_FRAME_Color_SwatchBg").g = VCB_SAVE["CF_icon_color_g"] + getglobal("VCB_BF_CF_FRAME_Color_SwatchBg").b = VCB_SAVE["CF_icon_color_b"] + getglobal("VCB_BF_CF_FRAME_SizeSlider"):SetValue(VCB_SAVE["CF_icon_fontsize"]) + getglobal("VCB_BF_CF_FRAME_SizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_icon_fontsize"]) + getglobal("VCB_BF_CF_FRAME_FontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["CF_icon_font"])) + getglobal("VCB_BF_CF_FRAME_FontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["CF_icon_font"]) + getglobal("VCB_BF_CF_FRAME_AlphaSlider"):SetValue(VCB_SAVE["CF_icon_opacity"]) + getglobal("VCB_BF_CF_FRAME_AlphaSliderText"):SetText(VCB_CF_FRAME_ICON_OPACITY..": "..VCB_SAVE["CF_icon_opacity"]) + getglobal("VCB_BF_CF_FRAME_FontAlphaSlider"):SetValue(VCB_SAVE["CF_icon_fontopacity"]) + getglobal("VCB_BF_CF_FRAME_FontAlphaSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_icon_fontopacity"]) + getglobal("VCB_BF_CF_FRAME_TextureSlider"):SetValue(VCB_Table_GetKeys(VCB_ICON_ARRAY, VCB_SAVE["CF_icon_texture"])) + getglobal("VCB_BF_CF_FRAME_TextureSliderText"):SetText(VCB_CF_FRAME_ICON_TEXTURE..": "..VCB_SAVE["CF_icon_texture"]) + getglobal("VCB_BF_CF_FRAME_BGOpaSlider"):SetValue(VCB_SAVE["CF_BF_bgopacity"]) + getglobal("VCB_BF_CF_FRAME_BGOpaSliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["CF_BF_bgopacity"]) + getglobal("VCB_BF_CF_FRAME_Color3NormalTexture"):SetVertexColor(VCB_SAVE["CF_BF_bgcolor_r"], VCB_SAVE["CF_BF_bgcolor_g"], VCB_SAVE["CF_BF_bgcolor_b"]) + getglobal("VCB_BF_CF_FRAME_Color3_SwatchBg").r = VCB_SAVE["CF_BF_bgcolor_r"] + getglobal("VCB_BF_CF_FRAME_Color3_SwatchBg").g = VCB_SAVE["CF_BF_bgcolor_g"] + getglobal("VCB_BF_CF_FRAME_Color3_SwatchBg").b = VCB_SAVE["CF_BF_bgcolor_b"] + getglobal("VCB_BF_CF_FRAME_Color2NormalTexture"):SetVertexColor(VCB_SAVE["CF_BF_bordercolor_r"], VCB_SAVE["CF_BF_bordercolor_g"], VCB_SAVE["CF_BF_bordercolor_b"]) + getglobal("VCB_BF_CF_FRAME_Color2_SwatchBg").r = VCB_SAVE["CF_BF_bordercolor_r"] + getglobal("VCB_BF_CF_FRAME_Color2_SwatchBg").g = VCB_SAVE["CF_BF_bordercolor_g"] + getglobal("VCB_BF_CF_FRAME_Color2_SwatchBg").b = VCB_SAVE["CF_BF_bordercolor_b"] + getglobal("VCB_BF_CF_FRAME_BFBorderSlider"):SetValue(VCB_SAVE["CF_BF_border"]) + getglobal("VCB_BF_CF_FRAME_BFBorderSliderText"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["CF_BF_border"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON4"):SetChecked(VCB_SAVE["CF_BF_customborder"]) + getglobal("VCB_BF_CF_FRAME_EDITBOX_BORDER"):SetText(VCB_SAVE["CF_BF_customborderpath"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON_BORDER"):SetChecked(VCB_SAVE["CF_icon_border"]) + getglobal("VCB_BF_CF_FRAME_BackdropSlider"):SetValue(VCB_SAVE["CF_BF_background"]) + getglobal("VCB_BF_CF_FRAME_BackdropSliderText"):SetText(VCB_CF_FRAME_BF_BACKGROUND..": "..VCB_SAVE["CF_BF_background"]) + getglobal("VCB_BF_CF_FRAME_BorderOpaSlider"):SetValue(VCB_SAVE["CF_BF_borderopacity"]) + getglobal("VCB_BF_CF_FRAME_BorderOpaSliderText"):SetText(VCB_COMMON_SLIDER_BORDER_OPACITY..": "..VCB_SAVE["CF_BF_borderopacity"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON_CBG"):SetChecked(VCB_SAVE["CF_BF_custombackground"]) + getglobal("VCB_BF_CF_FRAME_EDITBOX_BACKGROUND"):SetText(VCB_SAVE["CF_BF_custombackgroundpath"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["CF_icon_possiblebuffs"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON3"):SetChecked(VCB_SAVE["CF_icon_showpbgrayedout"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON_IBO"):SetChecked(VCB_SAVE["CF_BF_invertorientation"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON_ATTACH"):SetChecked(VCB_SAVE["CF_icon_attach"]) + getglobal("VCB_BF_CF_FRAME_CHECKBUTTON_CUSTOMFONT"):SetChecked(VCB_SAVE["CF_icon_usecfont"]) + getglobal("VCB_BF_CF_FRAME_EDITBOX_CUSTOMFONT"):SetText(VCB_SAVE["CF_icon_customfont"]) + elseif frame == "VCB_BF_CF_FRAME2" then + getglobal("VCB_BF_CF_FRAME2_CHECKBUTTON1"):SetChecked(VCB_SAVE["CF_AURA_enableborder"]) + getglobal("VCB_BF_CF_FRAME2_ColorNormalTexture"):SetVertexColor(VCB_SAVE["CF_AURA_bordercolor_r"], VCB_SAVE["CF_AURA_bordercolor_g"], VCB_SAVE["CF_AURA_bordercolor_b"]) + getglobal("VCB_BF_CF_FRAME2_Color_SwatchBg").r = VCB_SAVE["CF_AURA_bordercolor_r"] + getglobal("VCB_BF_CF_FRAME2_Color_SwatchBg").g = VCB_SAVE["CF_AURA_bordercolor_g"] + getglobal("VCB_BF_CF_FRAME2_Color_SwatchBg").b = VCB_SAVE["CF_AURA_bordercolor_b"] + getglobal("VCB_BF_CF_FRAME2_AuraPaddingHSlider"):SetValue(VCB_SAVE["CF_AURA_padding_h"]) + getglobal("VCB_BF_CF_FRAME2_AuraPaddingHSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["CF_AURA_padding_h"]) + getglobal("VCB_BF_CF_FRAME2_AuraPaddingVSlider"):SetValue(VCB_SAVE["CF_AURA_padding_v"]) + getglobal("VCB_BF_CF_FRAME2_AuraPaddingVSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["CF_AURA_padding_v"]) + getglobal("VCB_BF_CF_FRAME2_AuraBorderSlider"):SetValue(VCB_SAVE["CF_AURA_border"]) + getglobal("VCB_BF_CF_FRAME2_AuraBorderSliderText"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["CF_AURA_border"]) + getglobal("VCB_BF_CF_FRAME2_CHECKBUTTON3"):SetChecked(VCB_SAVE["CF_AURA_customborder"]) + getglobal("VCB_BF_CF_FRAME2_EDITBOX_BORDER"):SetText(VCB_SAVE["CF_AURA_customborderpath"]) + getglobal("VCB_BF_CF_FRAME2_Color2NormalTexture"):SetVertexColor(VCB_SAVE["CF_AURA_bgcolor_r"], VCB_SAVE["CF_AURA_bgcolor_g"], VCB_SAVE["CF_AURA_bgcolor_b"]) + getglobal("VCB_BF_CF_FRAME2_Color2_SwatchBg").r = VCB_SAVE["CF_AURA_bgcolor_r"] + getglobal("VCB_BF_CF_FRAME2_Color2_SwatchBg").g = VCB_SAVE["CF_AURA_bgcolor_g"] + getglobal("VCB_BF_CF_FRAME2_Color2_SwatchBg").b = VCB_SAVE["CF_AURA_bgcolor_b"] + getglobal("VCB_BF_CF_FRAME2_CHECKBUTTON2"):SetChecked(VCB_SAVE["CF_AURA_enablebgcolor"]) + getglobal("VCB_BF_CF_FRAME2_CHECKBUTTON4"):SetChecked(VCB_SAVE["CF_TIMER_border"]) + getglobal("VCB_BF_CF_FRAME2_Color3NormalTexture"):SetVertexColor(VCB_SAVE["CF_TIMER_fontcolor_r"], VCB_SAVE["CF_TIMER_fontcolor_g"], VCB_SAVE["CF_TIMER_fontcolor_b"]) + getglobal("VCB_BF_CF_FRAME2_Color3_SwatchBg").r = VCB_SAVE["CF_TIMER_fontcolor_r"] + getglobal("VCB_BF_CF_FRAME2_Color3_SwatchBg").g = VCB_SAVE["CF_TIMER_fontcolor_g"] + getglobal("VCB_BF_CF_FRAME2_Color3_SwatchBg").b = VCB_SAVE["CF_TIMER_fontcolor_b"] + getglobal("VCB_BF_CF_FRAME2_AuraTimerFontSizeSlider"):SetValue(VCB_SAVE["CF_TIMER_fontsize"]) + getglobal("VCB_BF_CF_FRAME2_AuraTimerFontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_TIMER_fontsize"]) + getglobal("VCB_BF_CF_FRAME2_AuraTimerOpacitySlider"):SetValue(VCB_SAVE["CF_TIMER_fontopacity"]) + getglobal("VCB_BF_CF_FRAME2_AuraTimerOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_TIMER_fontopacity"]) + getglobal("VCB_BF_CF_FRAME2_GFontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["CF_AURA_font"])) + getglobal("VCB_BF_CF_FRAME2_GFontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["CF_AURA_font"]) + getglobal("VCB_BF_CF_FRAME2_GFontOpacitySlider"):SetValue(VCB_SAVE["CF_AURA_fontopacity"]) + getglobal("VCB_BF_CF_FRAME2_GFontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_AURA_fontopacity"]) + getglobal("VCB_BF_CF_FRAME2_GFontSizeSlider"):SetValue(VCB_SAVE["CF_AURA_fontsize"]) + getglobal("VCB_BF_CF_FRAME2_GFontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_AURA_fontsize"]) + getglobal("VCB_BF_CF_FRAME2_GFontOffsetXSlider"):SetValue(VCB_SAVE["CF_AURA_fontoffset_x"]) + getglobal("VCB_BF_CF_FRAME2_GFontOffsetXSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["CF_AURA_fontoffset_x"]) + getglobal("VCB_BF_CF_FRAME2_GFontOffsetYSlider"):SetValue(VCB_SAVE["CF_AURA_fontoffset_y"]) + getglobal("VCB_BF_CF_FRAME2_GFontOffsetYSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["CF_AURA_fontoffset_y"]) + getglobal("VCB_BF_CF_FRAME2_CHECKBUTTON_FBorder"):SetChecked(VCB_SAVE["CF_AURA_enablefontborder"]) + getglobal("VCB_BF_CF_FRAME2_Color_fontcolorNormalTexture"):SetVertexColor(VCB_SAVE["CF_AURA_fontcolor_r"], VCB_SAVE["CF_AURA_fontcolor_g"], VCB_SAVE["CF_AURA_fontcolor_b"]) + getglobal("VCB_BF_CF_FRAME2_Color_fontcolor_SwatchBg").r = VCB_SAVE["CF_AURA_fontcolor_r"] + getglobal("VCB_BF_CF_FRAME2_Color_fontcolor_SwatchBg").g = VCB_SAVE["CF_AURA_fontcolor_g"] + getglobal("VCB_BF_CF_FRAME2_Color_fontcolor_SwatchBg").b = VCB_SAVE["CF_AURA_fontcolor_b"] + getglobal("VCB_BF_CF_FRAME2_GBGOpacitySlider"):SetValue(VCB_SAVE["CF_AURA_bgopacity"]) + getglobal("VCB_BF_CF_FRAME2_GBGOpacitySliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["CF_AURA_bgopacity"]) + elseif frame == "VCB_BF_BF_FRAME" then + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["BF_GENERAL_verticalmode"]) + getglobal("VCB_BF_BF_FRAME_NumPerRowSlider"):SetValue(VCB_SAVE["BF_GENERAL_numperrow"]) + getglobal("VCB_BF_BF_FRAME_NumPerRowSliderText"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["BF_GENERAL_numperrow"]) + getglobal("VCB_BF_BF_FRAME_AuraPaddingHSlider"):SetValue(VCB_SAVE["BF_GENERAL_padding_h"]) + getglobal("VCB_BF_BF_FRAME_AuraPaddingHSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["BF_GENERAL_padding_h"]) + getglobal("VCB_BF_BF_FRAME_AuraPaddingVSlider"):SetValue(VCB_SAVE["BF_GENERAL_padding_v"]) + getglobal("VCB_BF_BF_FRAME_AuraPaddingVSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["BF_GENERAL_padding_v"]) + getglobal("VCB_BF_BF_FRAME_ScaleSlider"):SetValue(VCB_SAVE["BF_GENERAL_scale"]) + getglobal("VCB_BF_BF_FRAME_ScaleSliderText"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["BF_GENERAL_scale"]) + getglobal("VCB_BF_BF_FRAME_BGOpaSlider"):SetValue(VCB_SAVE["BF_GENERAL_bgopacity"]) + getglobal("VCB_BF_BF_FRAME_BGOpaSliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["BF_GENERAL_bgopacity"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["BF_GENERAL_enablebgcolor"]) + getglobal("VCB_BF_BF_FRAME_Color1NormalTexture"):SetVertexColor(VCB_SAVE["BF_GENERAL_bgcolor_r"], VCB_SAVE["BF_GENERAL_bgcolor_g"], VCB_SAVE["BF_GENERAL_bgcolor_b"]) + getglobal("VCB_BF_BF_FRAME_Color1_SwatchBg").r = VCB_SAVE["BF_GENERAL_bgcolor_r"] + getglobal("VCB_BF_BF_FRAME_Color1_SwatchBg").g = VCB_SAVE["BF_GENERAL_bgcolor_g"] + getglobal("VCB_BF_BF_FRAME_Color1_SwatchBg").b = VCB_SAVE["BF_GENERAL_bgcolor_b"] + getglobal("VCB_BF_BF_FRAME_GFontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["BF_GENERAL_font"])) + getglobal("VCB_BF_BF_FRAME_GFontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["BF_GENERAL_font"]) + getglobal("VCB_BF_BF_FRAME_GFontOpacitySlider"):SetValue(VCB_SAVE["BF_GENERAL_fontopacity"]) + getglobal("VCB_BF_BF_FRAME_GFontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["BF_GENERAL_fontopacity"]) + getglobal("VCB_BF_BF_FRAME_GFontSizeSlider"):SetValue(VCB_SAVE["BF_GENERAL_fontsize"]) + getglobal("VCB_BF_BF_FRAME_GFontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["BF_GENERAL_fontsize"]) + getglobal("VCB_BF_BF_FRAME_GFontOffsetXSlider"):SetValue(VCB_SAVE["BF_GENERAL_fontoffset_x"]) + getglobal("VCB_BF_BF_FRAME_GFontOffsetXSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["BF_GENERAL_fontoffset_x"]) + getglobal("VCB_BF_BF_FRAME_GFontOffsetYSlider"):SetValue(VCB_SAVE["BF_GENERAL_fontoffset_y"]) + getglobal("VCB_BF_BF_FRAME_GFontOffsetYSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["BF_GENERAL_fontoffset_y"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON_FBorder"):SetChecked(VCB_SAVE["BF_GENERAL_enableborder"]) + getglobal("VCB_BF_BF_FRAME_Color_fontcolorNormalTexture"):SetVertexColor(VCB_SAVE["BF_GENERAL_fontcolor_r"], VCB_SAVE["BF_GENERAL_fontcolor_g"], VCB_SAVE["BF_GENERAL_fontcolor_b"]) + getglobal("VCB_BF_BF_FRAME_Color_fontcolor_SwatchBg").r = VCB_SAVE["BF_GENERAL_fontcolor_r"] + getglobal("VCB_BF_BF_FRAME_Color_fontcolor_SwatchBg").g = VCB_SAVE["BF_GENERAL_fontcolor_g"] + getglobal("VCB_BF_BF_FRAME_Color_fontcolor_SwatchBg").b = VCB_SAVE["BF_GENERAL_fontcolor_b"] + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON3"):SetChecked(VCB_SAVE["BF_GENERAL_invert"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON_IBO"):SetChecked(VCB_SAVE["BF_GENERAL_invertorientation"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON_CUSTOMFONT"):SetChecked(VCB_SAVE["BF_GENERAL_usecfont"]) + getglobal("VCB_BF_BF_FRAME_EDITBOX_CUSTOMFONT"):SetText(VCB_SAVE["BF_GENERAL_customfont"]) + elseif frame == "VCB_BF_BF_FRAME2" then + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON5"):SetChecked(VCB_SAVE["BF_BORDER_enableborder"]) + getglobal("VCB_BF_BF_FRAME_Color4NormalTexture"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"], VCB_SAVE["BF_BORDER_bordercolor_g"], VCB_SAVE["BF_BORDER_bordercolor_b"]) + getglobal("VCB_BF_BF_FRAME_Color4_SwatchBg").r = VCB_SAVE["BF_BORDER_bordercolor_r"] + getglobal("VCB_BF_BF_FRAME_Color4_SwatchBg").g = VCB_SAVE["BF_BORDER_bordercolor_g"] + getglobal("VCB_BF_BF_FRAME_Color4_SwatchBg").b = VCB_SAVE["BF_BORDER_bordercolor_b"] + getglobal("VCB_BF_BF_FRAME_BorderOpacitySlider"):SetValue(VCB_SAVE["BF_BORDER_borderopacity"]) + getglobal("VCB_BF_BF_FRAME_BorderOpacitySliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["BF_BORDER_borderopacity"]) + getglobal("VCB_BF_BF_FRAME_BorderSlider"):SetValue(VCB_SAVE["BF_BORDER_border"]) + getglobal("VCB_BF_BF_FRAME_BorderSliderText"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["BF_BORDER_border"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON6"):SetChecked(VCB_SAVE["BF_BORDER_usecustomborder"]) + getglobal("VCB_BF_BF_FRAME_EDITBOX_BORDER"):SetText(VCB_SAVE["BF_BORDER_customborderpath"]) + getglobal("VCB_BF_BF_FRAME_CHECKBUTTON4"):SetChecked(VCB_SAVE["BF_TIMER_border"]) + getglobal("VCB_BF_BF_FRAME_FontSizeSlider"):SetValue(VCB_SAVE["BF_TIMER_fontsize"]) + getglobal("VCB_BF_BF_FRAME_FontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["BF_TIMER_fontsize"]) + getglobal("VCB_BF_BF_FRAME_FontOpacitySlider"):SetValue(VCB_SAVE["BF_TIMER_fontopacity"]) + getglobal("VCB_BF_BF_FRAME_FontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["BF_TIMER_fontopacity"]) + getglobal("VCB_BF_BF_FRAME_Color2NormalTexture"):SetVertexColor(VCB_SAVE["BF_TIMER_fontcolor_r"], VCB_SAVE["BF_TIMER_fontcolor_g"], VCB_SAVE["BF_TIMER_fontcolor_b"]) + getglobal("VCB_BF_BF_FRAME_Color2_SwatchBg").r = VCB_SAVE["BF_TIMER_fontcolor_r"] + getglobal("VCB_BF_BF_FRAME_Color2_SwatchBg").g = VCB_SAVE["BF_TIMER_fontcolor_g"] + getglobal("VCB_BF_BF_FRAME_Color2_SwatchBg").b = VCB_SAVE["BF_TIMER_fontcolor_b"] + elseif frame == "VCB_BF_DBF_FRAME" then + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["DBF_GENERAL_verticalmode"]) + getglobal("VCB_BF_DBF_FRAME_NumPerRowSlider"):SetValue(VCB_SAVE["DBF_GENERAL_numperrow"]) + getglobal("VCB_BF_DBF_FRAME_NumPerRowSliderText"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["DBF_GENERAL_numperrow"]) + getglobal("VCB_BF_DBF_FRAME_AuraPaddingHSlider"):SetValue(VCB_SAVE["DBF_GENERAL_padding_h"]) + getglobal("VCB_BF_DBF_FRAME_AuraPaddingHSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["DBF_GENERAL_padding_h"]) + getglobal("VCB_BF_DBF_FRAME_AuraPaddingVSlider"):SetValue(VCB_SAVE["DBF_GENERAL_padding_v"]) + getglobal("VCB_BF_DBF_FRAME_AuraPaddingVSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["DBF_GENERAL_padding_v"]) + getglobal("VCB_BF_DBF_FRAME_BGOpaSlider"):SetValue(VCB_SAVE["DBF_GENERAL_bgopacity"]) + getglobal("VCB_BF_DBF_FRAME_BGOpaSliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["DBF_GENERAL_bgopacity"]) + getglobal("VCB_BF_DBF_FRAME_ScaleSlider"):SetValue(VCB_SAVE["DBF_GENERAL_scale"]) + getglobal("VCB_BF_DBF_FRAME_ScaleSliderText"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["DBF_GENERAL_scale"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["DBF_GENERAL_enablebgcolor"]) + getglobal("VCB_BF_DBF_FRAME_Color1NormalTexture"):SetVertexColor(VCB_SAVE["DBF_GENERAL_bgcolor_r"], VCB_SAVE["DBF_GENERAL_bgcolor_g"], VCB_SAVE["DBF_GENERAL_bgcolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color1_SwatchBg").r = VCB_SAVE["DBF_GENERAL_bgcolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color1_SwatchBg").g = VCB_SAVE["DBF_GENERAL_bgcolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color1_SwatchBg").b = VCB_SAVE["DBF_GENERAL_bgcolor_b"] + getglobal("VCB_BF_DBF_FRAME_GFontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["DBF_GENERAL_font"])) + getglobal("VCB_BF_DBF_FRAME_GFontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["DBF_GENERAL_font"]) + getglobal("VCB_BF_DBF_FRAME_GFontOpacitySlider"):SetValue(VCB_SAVE["DBF_GENERAL_fontopacity"]) + getglobal("VCB_BF_DBF_FRAME_GFontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["DBF_GENERAL_fontopacity"]) + getglobal("VCB_BF_DBF_FRAME_GFontSizeSlider"):SetValue(VCB_SAVE["DBF_GENERAL_fontsize"]) + getglobal("VCB_BF_DBF_FRAME_GFontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["DBF_GENERAL_fontsize"]) + getglobal("VCB_BF_DBF_FRAME_GFontOffsetXSlider"):SetValue(VCB_SAVE["DBF_GENERAL_fontoffset_x"]) + getglobal("VCB_BF_DBF_FRAME_GFontOffsetXSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["DBF_GENERAL_fontoffset_x"]) + getglobal("VCB_BF_DBF_FRAME_GFontOffsetYSlider"):SetValue(VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + getglobal("VCB_BF_DBF_FRAME_GFontOffsetYSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON_FBorder"):SetChecked(VCB_SAVE["DBF_GENERAL_enableborder"]) + getglobal("VCB_BF_DBF_FRAME_Color_fontcolorNormalTexture"):SetVertexColor(VCB_SAVE["DBF_GENERAL_fontcolor_r"], VCB_SAVE["DBF_GENERAL_fontcolor_g"], VCB_SAVE["DBF_GENERAL_fontcolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_fontcolor_SwatchBg").r = VCB_SAVE["DBF_GENERAL_fontcolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_fontcolor_SwatchBg").g = VCB_SAVE["DBF_GENERAL_fontcolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_fontcolor_SwatchBg").b = VCB_SAVE["DBF_GENERAL_fontcolor_b"] + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON3"):SetChecked(VCB_SAVE["DBF_GENERAL_invert"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON_IBO"):SetChecked(VCB_SAVE["DBF_GENERAL_invertorientation"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON_CUSTOMFONT"):SetChecked(VCB_SAVE["DBF_GENERAL_usecfont"]) + getglobal("VCB_BF_DBF_FRAME_EDITBOX_CUSTOMFONT"):SetText(VCB_SAVE["DBF_GENERAL_customfont"]) + elseif frame == "VCB_BF_DBF_FRAME2" then + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON5"):SetChecked(VCB_SAVE["DBF_BORDER_enableborder"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON6"):SetChecked(VCB_SAVE["DBF_BORDER_usecustomborder"]) + getglobal("VCB_BF_DBF_FRAME_EDITBOX_BORDER"):SetText(VCB_SAVE["DBF_BORDER_customborderpath"]) + getglobal("VCB_BF_DBF_FRAME_BorderSlider"):SetValue(VCB_SAVE["DBF_BORDER_border"]) + getglobal("VCB_BF_DBF_FRAME_BorderSliderText"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["DBF_BORDER_border"]) + getglobal("VCB_BF_DBF_FRAME_CHECKBUTTON4"):SetChecked(VCB_SAVE["DBF_TIMER_enableborder"]) + getglobal("VCB_BF_DBF_FRAME_Color2NormalTexture"):SetVertexColor(VCB_SAVE["DBF_TIMER_fontcolor_r"], VCB_SAVE["DBF_TIMER_fontcolor_g"], VCB_SAVE["DBF_TIMER_fontcolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color2_SwatchBg").r = VCB_SAVE["DBF_TIMER_fontcolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color2_SwatchBg").g = VCB_SAVE["DBF_TIMER_fontcolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color2_SwatchBg").b = VCB_SAVE["DBF_TIMER_fontcolor_b"] + getglobal("VCB_BF_DBF_FRAME_FontSizeSlider"):SetValue(VCB_SAVE["DBF_TIMER_fontsize"]) + getglobal("VCB_BF_DBF_FRAME_FontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["DBF_TIMER_fontsize"]) + getglobal("VCB_BF_DBF_FRAME_FontOpacitySlider"):SetValue(VCB_SAVE["DBF_TIMER_fontopacity"]) + getglobal("VCB_BF_DBF_FRAME_FontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["DBF_TIMER_fontopacity"]) + getglobal("VCB_BF_DBF_FRAME_BorderOpacitySlider"):SetValue(VCB_SAVE["DBF_BORDER_borderopacity"]) + getglobal("VCB_BF_DBF_FRAME_BorderOpacitySliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["DBF_BORDER_borderopacity"]) + getglobal("VCB_BF_DBF_FRAME_Color_NONENormalTexture"):SetVertexColor(VCB_SAVE["DBF_BORDER_nonecolor_r"], VCB_SAVE["DBF_BORDER_nonecolor_g"], VCB_SAVE["DBF_BORDER_nonecolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_NONE_SwatchBg").r = VCB_SAVE["DBF_BORDER_nonecolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_NONE_SwatchBg").g = VCB_SAVE["DBF_BORDER_nonecolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_NONE_SwatchBg").b = VCB_SAVE["DBF_BORDER_nonecolor_b"] + getglobal("VCB_BF_DBF_FRAME_Color_POISONNormalTexture"):SetVertexColor(VCB_SAVE["DBF_BORDER_poisoncolor_r"], VCB_SAVE["DBF_BORDER_poisoncolor_g"], VCB_SAVE["DBF_BORDER_poisoncolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_POISON_SwatchBg").r = VCB_SAVE["DBF_BORDER_poisoncolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_POISON_SwatchBg").g = VCB_SAVE["DBF_BORDER_poisoncolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_POISON_SwatchBg").b = VCB_SAVE["DBF_BORDER_poisoncolor_b"] + getglobal("VCB_BF_DBF_FRAME_Color_MAGICNormalTexture"):SetVertexColor(VCB_SAVE["DBF_BORDER_magiccolor_r"], VCB_SAVE["DBF_BORDER_magiccolor_g"], VCB_SAVE["DBF_BORDER_magiccolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_MAGIC_SwatchBg").r = VCB_SAVE["DBF_BORDER_magiccolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_MAGIC_SwatchBg").g = VCB_SAVE["DBF_BORDER_magiccolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_MAGIC_SwatchBg").b = VCB_SAVE["DBF_BORDER_magiccolor_b"] + getglobal("VCB_BF_DBF_FRAME_Color_CURSENormalTexture"):SetVertexColor(VCB_SAVE["DBF_BORDER_cursecolor_r"], VCB_SAVE["DBF_BORDER_cursecolor_g"], VCB_SAVE["DBF_BORDER_cursecolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_CURSE_SwatchBg").r = VCB_SAVE["DBF_BORDER_cursecolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_CURSE_SwatchBg").g = VCB_SAVE["DBF_BORDER_cursecolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_CURSE_SwatchBg").b = VCB_SAVE["DBF_BORDER_cursecolor_b"] + getglobal("VCB_BF_DBF_FRAME_Color_DISEASENormalTexture"):SetVertexColor(VCB_SAVE["DBF_BORDER_diseasecolor_r"], VCB_SAVE["DBF_BORDER_diseasecolor_g"], VCB_SAVE["DBF_BORDER_diseasecolor_b"]) + getglobal("VCB_BF_DBF_FRAME_Color_DISEASE_SwatchBg").r = VCB_SAVE["DBF_BORDER_diseasecolor_r"] + getglobal("VCB_BF_DBF_FRAME_Color_DISEASE_SwatchBg").g = VCB_SAVE["DBF_BORDER_diseasecolor_g"] + getglobal("VCB_BF_DBF_FRAME_Color_DISEASE_SwatchBg").b = VCB_SAVE["DBF_BORDER_diseasecolor_b"] + elseif frame == "VCB_BF_WP_FRAME" then + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["WP_GENERAL_verticalmode"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["WP_GENERAL_enablebgcolor"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON7"):SetChecked(VCB_SAVE["WP_GENERAL_attach"]) + getglobal("VCB_BF_WP_FRAME_Color1NormalTexture"):SetVertexColor(VCB_SAVE["WP_GENERAL_bgcolor_r"], VCB_SAVE["WP_GENERAL_bgcolor_g"], VCB_SAVE["WP_GENERAL_bgcolor_b"]) + getglobal("VCB_BF_WP_FRAME_Color1_SwatchBg").r = VCB_SAVE["WP_GENERAL_bgcolor_r"] + getglobal("VCB_BF_WP_FRAME_Color1_SwatchBg").g = VCB_SAVE["WP_GENERAL_bgcolor_g"] + getglobal("VCB_BF_WP_FRAME_Color1_SwatchBg").b = VCB_SAVE["WP_GENERAL_bgcolor_b"] + getglobal("VCB_BF_WP_FRAME_AuraPaddingHSlider"):SetValue(VCB_SAVE["WP_GENERAL_padding_h"]) + getglobal("VCB_BF_WP_FRAME_AuraPaddingHSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["WP_GENERAL_padding_h"]) + getglobal("VCB_BF_WP_FRAME_FontSizeSlider"):SetValue(VCB_SAVE["WP_GENERAL_fontsize"]) + getglobal("VCB_BF_WP_FRAME_FontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["WP_GENERAL_fontsize"]) + getglobal("VCB_BF_WP_FRAME_BGOpaSlider"):SetValue(VCB_SAVE["WP_GENERAL_bgopacity"]) + getglobal("VCB_BF_WP_FRAME_BGOpaSliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["WP_GENERAL_bgopacity"]) + getglobal("VCB_BF_WP_FRAME_ScaleSlider"):SetValue(VCB_SAVE["WP_GENERAL_scale"]) + getglobal("VCB_BF_WP_FRAME_ScaleSliderText"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["WP_GENERAL_scale"]) + getglobal("VCB_BF_WP_FRAME_FontSlider"):SetValue(VCB_Table_GetKeys(VCB_FONT_ARRAY, VCB_SAVE["WP_GENERAL_font"])) + getglobal("VCB_BF_WP_FRAME_FontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["WP_GENERAL_font"]) + getglobal("VCB_BF_WP_FRAME_FontOpacitySlider"):SetValue(VCB_SAVE["WP_GENERAL_fontopacity"]) + getglobal("VCB_BF_WP_FRAME_FontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["WP_GENERAL_fontopacity"]) + getglobal("VCB_BF_WP_FRAME_AuraPaddingVSlider"):SetValue(VCB_SAVE["WP_GENERAL_padding_v"]) + getglobal("VCB_BF_WP_FRAME_AuraPaddingVSliderText"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["WP_GENERAL_padding_v"]) + getglobal("VCB_BF_WP_FRAME_Color5NormalTexture"):SetVertexColor(VCB_SAVE["WP_GENERAL_fontcolor_r"], VCB_SAVE["WP_GENERAL_fontcolor_g"], VCB_SAVE["WP_GENERAL_fontcolor_b"]) + getglobal("VCB_BF_WP_FRAME_Color5_SwatchBg").r = VCB_SAVE["WP_GENERAL_fontcolor_r"] + getglobal("VCB_BF_WP_FRAME_Color5_SwatchBg").g = VCB_SAVE["WP_GENERAL_fontcolor_g"] + getglobal("VCB_BF_WP_FRAME_Color5_SwatchBg").b = VCB_SAVE["WP_GENERAL_fontcolor_b"] + getglobal("VCB_BF_WP_FRAME_OffsetXSlider"):SetValue(VCB_SAVE["WP_GENERAL_offset_x"]) + getglobal("VCB_BF_WP_FRAME_OffsetXSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["WP_GENERAL_offset_x"]) + getglobal("VCB_BF_WP_FRAME_OffsetYSlider"):SetValue(VCB_SAVE["WP_GENERAL_offset_y"]) + getglobal("VCB_BF_WP_FRAME_OffsetYSliderText"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["WP_GENERAL_offset_y"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON8"):SetChecked(VCB_SAVE["WP_GENERAL_enableborder"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON_CUSTOMFONT"):SetChecked(VCB_SAVE["WP_GENERAL_usecfont"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON_INVERTORDER"):SetChecked(VCB_SAVE["WP_GENERAL_invert"]) + getglobal("VCB_BF_WP_FRAME_EDITBOX_CUSTOMFONT"):SetText(VCB_SAVE["WP_GENERAL_customfont"]) + elseif frame == "VCB_BF_WP_FRAME2" then + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON5"):SetChecked(VCB_SAVE["WP_BORDER_enableborder"]) + getglobal("VCB_BF_WP_FRAME_Color4NormalTexture"):SetVertexColor(VCB_SAVE["WP_BORDER_bordercolor_r"], VCB_SAVE["WP_BORDER_bordercolor_g"], VCB_SAVE["WP_BORDER_bordercolor_b"]) + getglobal("VCB_BF_WP_FRAME_Color4_SwatchBg").r = VCB_SAVE["WP_BORDER_bordercolor_r"] + getglobal("VCB_BF_WP_FRAME_Color4_SwatchBg").g = VCB_SAVE["WP_BORDER_bordercolor_g"] + getglobal("VCB_BF_WP_FRAME_Color4_SwatchBg").b = VCB_SAVE["WP_BORDER_bordercolor_b"] + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON6"):SetChecked(VCB_SAVE["WP_BORDER_usecustomborder"]) + getglobal("VCB_BF_WP_FRAME_EDITBOX_BORDER"):SetText(VCB_SAVE["WP_BORDER_customborderpath"]) + getglobal("VCB_BF_WP_FRAME_BorderSlider"):SetValue(VCB_SAVE["WP_BORDER_border"]) + getglobal("VCB_BF_WP_FRAME_BorderSliderText"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["WP_BORDER_border"]) + getglobal("VCB_BF_WP_FRAME_CHECKBUTTON4"):SetChecked(VCB_SAVE["WP_TIMER_enableborder"]) + getglobal("VCB_BF_WP_FRAME_Color2NormalTexture"):SetVertexColor(VCB_SAVE["WP_TIMER_fontcolor_r"], VCB_SAVE["WP_TIMER_fontcolor_g"], VCB_SAVE["WP_TIMER_fontcolor_b"]) + getglobal("VCB_BF_WP_FRAME_Color2_SwatchBg").r = VCB_SAVE["WP_TIMER_fontcolor_r"] + getglobal("VCB_BF_WP_FRAME_Color2_SwatchBg").g = VCB_SAVE["WP_TIMER_fontcolor_g"] + getglobal("VCB_BF_WP_FRAME_Color2_SwatchBg").b = VCB_SAVE["WP_TIMER_fontcolor_b"] + getglobal("VCB_BF_WP_FRAME_TIMER_FontSizeSlider"):SetValue(VCB_SAVE["WP_TIMER_fontsize"]) + getglobal("VCB_BF_WP_FRAME_TIMER_FontSizeSliderText"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["WP_TIMER_fontsize"]) + getglobal("VCB_BF_WP_FRAME_TIMER_FontOpacitySlider"):SetValue(VCB_SAVE["WP_TIMER_fontopacity"]) + getglobal("VCB_BF_WP_FRAME_TIMER_FontOpacitySliderText"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["WP_TIMER_fontopacity"]) + getglobal("VCB_BF_WP_FRAME_BorderOpacitySlider"):SetValue(VCB_SAVE["WP_BORDER_borderopacity"]) + getglobal("VCB_BF_WP_FRAME_BorderOpacitySliderText"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["WP_BORDER_borderopacity"]) + elseif frame == "VCB_BF_MISC_FRAME" then + getglobal("VCB_BF_MISC_FRAME_CHECKBUTTON1"):SetChecked(VCB_SAVE["MISC_disable_CF"]) + getglobal("VCB_BF_MISC_FRAME_CHECKBUTTON2"):SetChecked(VCB_SAVE["MISC_disable_BB"]) + elseif frame == "VCB_BF_PM_FRAME" then + getglobal("VCB_BF_PM_FRAME_LEFT_CURRENT_INBOX_TEXT"):SetText(VCB_CUR_PROFILE) + end +end + +function VCB_BF_CHECKBUTTON(obj) + if (VCB_SAVE[obj]) then + VCB_SAVE[obj] = false + else + VCB_SAVE[obj] = true + end +end + +function VCB_BF_MINIMAP_OnClick(arg1) + if arg1 == "LeftButton" then + if VCB_BF_ConfigFrame:IsVisible() then + VCB_BF_ConfigFrame:Hide() + else + VCB_BF_ConfigFrame:Show() + end + else + VCB_BF_ToggleLock() + end +end + +function VCB_BF_OptionsFrame_SetColor() + local r,g,b = ColorPickerFrame:GetColorRGB(); + local swatch,frame; + swatch = getglobal(VCB_BF_COLOR_OBJ:GetName().."NormalTexture"); -- juste le visuel + frame = getglobal(VCB_BF_COLOR_OBJ:GetName().."_SwatchBg"); -- enregistre la couleur + swatch:SetVertexColor(r,g,b); + frame.r = r; + frame.g = g; + frame.b = b; + + VCB_SAVE[VCB_BF_COLOR_VAR.."color_r"] = r; + VCB_SAVE[VCB_BF_COLOR_VAR.."color_g"] = g; + VCB_SAVE[VCB_BF_COLOR_VAR.."color_b"] = b; + + if VCB_BF_COLOR_TYPE == "font" then + getglobal(VCB_BF_COLOR_TAR):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."fontopacity"]); + elseif VCB_BF_COLOR_TYPE=="bg" then + getglobal(VCB_BF_COLOR_TAR):SetBackdropColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opacity"]) + elseif VCB_BF_COLOR_TYPE=="border" then + getglobal(VCB_BF_COLOR_TAR):SetBackdropBorderColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opacity"]) + elseif VCB_BF_COLOR_TYPE=="buffsborder" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="buffsbg" then + for i=0, VCB_MAXINDEX["buff"] do + if VCB_SAVE[VCB_BF_COLOR_TAR] and getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="buffsfont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFbg" then + for i=0, VCB_MAXINDEX["buff"] do + if VCB_SAVE[VCB_BF_COLOR_TAR] and getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFborder" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME and VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFfont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="DebuffBG" then + for i=0,15 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="DebuffFont" then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="DebuffGFont" then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="BuffGFont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="CFGFont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WeaponBG" then + for i=0,1 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WPFont" then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="WPBorder" then + for i=0,1 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WPTimer" then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="DebuffBorderColor" then + for i=0,15 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + if i < 3 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_nonecolor_r"],VCB_SAVE["DBF_BORDER_nonecolor_g"],VCB_SAVE["DBF_BORDER_nonecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 3 and i < 6 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_poisoncolor_r"],VCB_SAVE["DBF_BORDER_poisoncolor_g"],VCB_SAVE["DBF_BORDER_poisoncolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 6 and i < 9 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_magiccolor_r"],VCB_SAVE["DBF_BORDER_magiccolor_g"],VCB_SAVE["DBF_BORDER_magiccolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 9 and i < 12 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_cursecolor_r"],VCB_SAVE["DBF_BORDER_cursecolor_g"],VCB_SAVE["DBF_BORDER_cursecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_diseasecolor_r"],VCB_SAVE["DBF_BORDER_diseasecolor_g"],VCB_SAVE["DBF_BORDER_diseasecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + end + end + end + end +end + +function VCB_BF_OptionsFrame_CancelColor() + local r = ColorPickerFrame.previousValues.r; + local g = ColorPickerFrame.previousValues.g; + local b = ColorPickerFrame.previousValues.b; + local swatch,frame; + swatch = getglobal(VCB_BF_COLOR_OBJ:GetName().."NormalTexture"); -- juste le visuel + frame = getglobal(VCB_BF_COLOR_OBJ:GetName().."_SwatchBg"); -- enregistre la couleur + swatch:SetVertexColor(r,g,b); + frame.r = r; + frame.g = g; + frame.b = b; + + if VCB_BF_COLOR_TYPE == "font" then + getglobal(VCB_BF_COLOR_TAR):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."fontopacity"]); + elseif VCB_BF_COLOR_TYPE=="bg" then + getglobal(VCB_BF_COLOR_TAR):SetBackdropColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opacity"]) + elseif VCB_BF_COLOR_TYPE=="border" then + getglobal(VCB_BF_COLOR_TAR):SetBackdropBorderColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opacity"]) + elseif VCB_BF_COLOR_TYPE=="buffsborder" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="buffsbg" then + for i=0, VCB_MAXINDEX["buff"] do + if VCB_SAVE[VCB_BF_COLOR_TAR] and getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="buffsfont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFbg" then + for i=0, VCB_MAXINDEX["buff"] do + if VCB_SAVE[VCB_BF_COLOR_TAR] and getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFborder" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME and VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="BFfont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="DebuffBG" then + for i=0,15 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="DebuffFont" then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="DebuffGFont" then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="BuffGFont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="CFGFont" then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WeaponBG" then + for i=0,1 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WPFont" then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="WPBorder" then + for i=0,1 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetVertexColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + end + elseif VCB_BF_COLOR_TYPE=="WPTimer" then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetTextColor(r,g,b,VCB_SAVE[VCB_BF_COLOR_VAR.."opactiy"]) + end + elseif VCB_BF_COLOR_TYPE=="DebuffBorderColor" then + for i=0,15 do + if VCB_SAVE[VCB_BF_COLOR_TAR] then + if i < 3 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_nonecolor_r"],VCB_SAVE["DBF_BORDER_nonecolor_g"],VCB_SAVE["DBF_BORDER_nonecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 3 and i < 6 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_poisoncolor_r"],VCB_SAVE["DBF_BORDER_poisoncolor_g"],VCB_SAVE["DBF_BORDER_poisoncolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 6 and i < 9 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_magiccolor_r"],VCB_SAVE["DBF_BORDER_magiccolor_g"],VCB_SAVE["DBF_BORDER_magiccolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 9 and i < 12 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_cursecolor_r"],VCB_SAVE["DBF_BORDER_cursecolor_g"],VCB_SAVE["DBF_BORDER_cursecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_diseasecolor_r"],VCB_SAVE["DBF_BORDER_diseasecolor_g"],VCB_SAVE["DBF_BORDER_diseasecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + end + end + end + end +end + +function VCB_BF_OpenColorPicker(obj, var, tar, type) + VCB_BF_COLOR_OBJ = obj + VCB_BF_COLOR_VAR = var + VCB_BF_COLOR_TAR = tar + VCB_BF_COLOR_TYPE = type + + CloseMenus(); + + button = getglobal(obj:GetName().."_SwatchBg"); + + ColorPickerFrame.func = VCB_BF_OptionsFrame_SetColor -- button.swatchFunc; + ColorPickerFrame:SetColorRGB(button.r, button.g, button.b); + ColorPickerFrame.previousValues = {r = button.r, g = button.g, b = button.b, opacity = button.opacity}; + ColorPickerFrame.cancelFunc = VCB_BF_OptionsFrame_CancelColor + + ColorPickerFrame:SetPoint("TOPLEFT", obj, "TOPRIGHT", 0, 0) + + ColorPickerFrame:SetFrameStrata("TOOLTIP") + + ColorPickerFrame:Show(); +end + +---------------------------------------START CONSOLIDATED BUFFS FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_CONSOLIDATED_FRAME_RIGHT_SCROLLFRAME_Update() + local line -- 1 through 5 of our window to scroll + local lineplusoffset -- an index into our data calculated from the scroll offset + local FRAME = getglobal("VCB_BF_CONSOLIDATED_FRAME_RIGHT_SCROLLFRAME") + FauxScrollFrame_Update(FRAME,VCB_tablelength(Consolidated_Buffs),10,40) + for line=1,10 do + lineplusoffset = line + FauxScrollFrame_GetOffset(FRAME) + if Consolidated_Buffs[lineplusoffset] ~= nil then + getglobal("VCB_CONSOLIDATED_BUFFS_ENTRY_TEXT"..line):SetText(lineplusoffset..". "..Consolidated_Buffs[lineplusoffset]) + getglobal("VCB_CONSOLIDATED_BUFFS_ENTRY"..line).buff = Consolidated_Buffs[lineplusoffset] + getglobal("VCB_CONSOLIDATED_BUFFS_ENTRY"..line):Show() + else + getglobal("VCB_CONSOLIDATED_BUFFS_ENTRY"..line):Hide() + end + end +end + +function VCB_CONSOLIDATED_SCROLLFRAME_ENTRY(button) + getglobal("VCB_BF_CONSOLIDATED_FRAME_LEFT_DELETE_INBOX_TEXT"):SetText(button.buff) +end + +function VCB_CONSOLIDATED_BUFFS_DELETE() + VCB_BF_ConsolidatedRemove(getglobal("VCB_BF_CONSOLIDATED_FRAME_LEFT_DELETE_INBOX_TEXT"):GetText()) + VCB_BF_CONSOLIDATED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +function VCB_CONSOLIDATED_BUFFS_ADD() + VCB_BF_ConsolidatedAdd(getglobal("VCB_BF_CONSOLIDATED_FRAME_EditBox"):GetText()) + VCB_BF_CONSOLIDATED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +function VCB_CONSOLIDATED_BUFFS_REMOVE_ALL() + VCB_BF_RemoveAllFromConsolidate() + VCB_BF_CONSOLIDATED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +---------------------------------------END CONSOLIDATED BUFFS FRAME----------------------------------------------------------------------------------------------------------------- + +---------------------------------------START BANNED BUFFS FRAME----------------------------------------------------------------------------------------------------------------- +function VCB_BF_BANNED_FRAME_RIGHT_SCROLLFRAME_Update() + local line -- 1 through 5 of our window to scroll + local lineplusoffset -- an index into our data calculated from the scroll offset + local FRAME = getglobal("VCB_BF_BANNED_FRAME_RIGHT_SCROLLFRAME") + FauxScrollFrame_Update(FRAME,VCB_tablelength(Banned_Buffs),10,40) + for line=1,10 do + lineplusoffset = line + FauxScrollFrame_GetOffset(FRAME) + if Banned_Buffs[lineplusoffset] ~= nil then + getglobal("VCB_BANNED_BUFFS_ENTRY_TEXT"..line):SetText(lineplusoffset..". "..Banned_Buffs[lineplusoffset]) + getglobal("VCB_BANNED_BUFFS_ENTRY"..line).buff = Banned_Buffs[lineplusoffset] + getglobal("VCB_BANNED_BUFFS_ENTRY"..line):Show() + else + getglobal("VCB_BANNED_BUFFS_ENTRY"..line):Hide() + end + end +end + +function VCB_BANNED_SCROLLFRAME_ENTRY(button) + getglobal("VCB_BF_BANNED_FRAME_LEFT_DELETE_INBOX_TEXT"):SetText(button.buff) +end + +function VCB_BANNED_BUFFS_DELETE() + VCB_BF_RemoveFromBanned(getglobal("VCB_BF_BANNED_FRAME_LEFT_DELETE_INBOX_TEXT"):GetText()) + VCB_BF_BANNED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +function VCB_BANNED_BUFFS_ADD() + VCB_BF_AddToBanned(getglobal("VCB_BF_BANNED_FRAME_EditBox"):GetText()) + VCB_BF_BANNED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +function VCB_BANNED_BUFFS_REMOVE_ALL() + VCB_BF_RemoveAllFromBanned() + VCB_BF_BANNED_FRAME_RIGHT_SCROLLFRAME_Update() +end + +---------------------------------------END BANNED BUFFS FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START TIMER FRAME----------------------------------------------------------------------------------------------------------------- +function VCB_BF_CHECKBUTTON_TIMER_HOURS() + if not VCB_SAVE["Timer_hours"] then + VCB_SAVE["Timer_hours"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON3:SetChecked(true) + VCB_SAVE["Timer_minutes"] = true + else + VCB_SAVE["Timer_hours"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON2:SetChecked(false) + VCB_SAVE["Timer_hours_convert"] = false + end +end + +function VCB_BF_CHECKBUTTON_TIMER_DISABLEUNIT() + if not VCB_SAVE["Timer_disableUnit"] then + VCB_SAVE["Timer_disableUnit"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON_DISABLE:SetChecked(true) + else + VCB_SAVE["Timer_disableUnit"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON_DISABLE:SetChecked(false) + end +end + +function VCB_BF_CHECKBUTTON_TIMER_HOURS_CONVERT() + if not VCB_SAVE["Timer_hours_convert"] then + VCB_SAVE["Timer_hours_convert"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON1:SetChecked(true) + VCB_SAVE["Timer_hours"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON3:SetChecked(true) + VCB_SAVE["Timer_minutes"] = true + else + VCB_SAVE["Timer_hours_convert"] = false + end +end + +function VCB_BF_CHECKBUTTON_TIMER_MINUTES() + if not VCB_SAVE["Timer_minutes"] then + VCB_SAVE["Timer_minutes"] = true + else + VCB_SAVE["Timer_minutes"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON1:SetChecked(false) + VCB_SAVE["Timer_hours"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON2:SetChecked(false) + VCB_SAVE["Timer_hours_convert"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON4:SetChecked(false) + VCB_SAVE["Timer_minutes_convert"] = false + end +end + +function VCB_BF_CHECKBUTTON_TIMER_MINUTES_CONVERT() + if not VCB_SAVE["Timer_minutes_convert"] then + VCB_SAVE["Timer_minutes_convert"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON3:SetChecked(true) + VCB_SAVE["Timer_minutes"] = true + else + VCB_SAVE["Timer_minutes_convert"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON1:SetChecked(false) + VCB_SAVE["Timer_hours"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON2:SetChecked(false) + VCB_SAVE["Timer_hours_convert"] = false + end +end + +function VCB_BF_CHECKBUTTON_ROUND() + if VCB_SAVE["Timer_round"] then + VCB_SAVE["Timer_round"] = false + VCB_BF_TIMER_FRAME_CHECKBUTTON7:SetChecked(false) + else + VCB_SAVE["Timer_round"] = true + VCB_BF_TIMER_FRAME_CHECKBUTTON6:SetChecked(false) + end +end + +function VCB_BF_CHECKBUTTON_TIMER_BORDER() + if VCB_SAVE["Timer_border"] then + VCB_SAVE["Timer_border"] = false + else + VCB_SAVE["Timer_border"] = true + end + for cat, tname in pairs(VCB_BUTTONNAME) do + for i=VCB_MININDEX[cat], VCB_MAXINDEX[cat] do + if VCB_SAVE["Timer_border"] then + getglobal(tname..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["Timer_fontsize"], "OUTLINE") + else + getglobal(tname..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["Timer_fontsize"]) + end + end + end +end + +function VCB_BF_TIMER_FRAME_FontSliderChange(obj) + VCB_SAVE["Timer_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal("VCB_BF_TIMER_FRAME_FontSliderText"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["Timer_font"]) + for cat, tname in pairs(VCB_BUTTONNAME) do + for i=VCB_MININDEX[cat], VCB_MAXINDEX[cat] do + if getglobal(tname..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal(tname..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"]) + else + getglobal(tname..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"]) + end + end + end +end + +function VCB_BF_TIMER_FRAME_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["Timer_usecfont"] then + VCB_SAVE["Timer_usecfont"] = false + for cat, template in pairs(VCB_BUTTONNAME) do + for i=VCB_MININDEX[cat], VCB_MAXINDEX[cat] do + local button = getglobal(template..i.."Duration") + if cat == "buff" then + if VCB_SAVE["BF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"]) + end + elseif cat == "debuff" then + if VCB_SAVE["DBF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + else + if VCB_SAVE["WP_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + end + end + else + VCB_SAVE["Timer_usecfont"] = true + for cat, template in pairs(VCB_BUTTONNAME) do + for i=VCB_MININDEX[cat], VCB_MAXINDEX[cat] do + local button = getglobal(template..i.."Duration") + if cat == "buff" then + if VCB_SAVE["BF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"]) + end + elseif cat == "debuff" then + if VCB_SAVE["DBF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + else + if VCB_SAVE["WP_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + end + end + end +end + +function VCB_BF_TIMER_FRAME_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["Timer_customfont"] = obj:GetText() + if VCB_SAVE["Timer_usecfont"] then + for cat, template in pairs(VCB_BUTTONNAME) do + for i=VCB_MININDEX[cat], VCB_MAXINDEX[cat] do + local button = getglobal(template..i.."Duration") + if cat == "buff" then + if VCB_SAVE["BF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"]) + end + elseif cat == "debuff" then + if VCB_SAVE["DBF_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + else + if VCB_SAVE["WP_TIMER_enableborder"] then + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + button:SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + end + end + end +end + +---------------------------------------END TIMER FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START CONSOLIDATED FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_CF_FRAME_AnchorSliderChange(obj) + VCB_SAVE["CF_BF_anchor"] = obj:GetValue() + getglobal("VCB_BF_CF_FRAME_AnchorSliderText"):SetText(VCB_CF_FRAME_BF_ANCHOR..": "..VCB_ANCHOR_ARRAY[VCB_SAVE["CF_BF_anchor"]]) + VCB_BF_CONSOLIDATED_BUFFFRAME:ClearAllPoints() + if VCB_SAVE["CF_BF_anchor"] == 1 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("TOP", VCB_BF_CONSOLIDATED_ICON, "BOTTOM", 0, 0) + elseif VCB_SAVE["CF_BF_anchor"] == 2 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("LEFT", VCB_BF_CONSOLIDATED_ICON, "RIGHT", 0, 0) + elseif VCB_SAVE["CF_BF_anchor"] == 3 then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("BOTTOM", VCB_BF_CONSOLIDATED_ICON, "TOP", 0, 0) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetPoint("RIGHT", VCB_BF_CONSOLIDATED_ICON, "LEFT", 0, 0) + end +end + +function VCB_BF_CF_FRAME_ScaleSliderChange(obj) + VCB_SAVE["CF_BF_scale"] = string.format("%.1f", obj:GetValue()) + getglobal("VCB_BF_CF_FRAME_ScaleSliderText"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["CF_BF_scale"]) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_INVERTBUTTON() + if VCB_SAVE["CF_BF_invert"] then + VCB_SAVE["CF_BF_invert"] = false + else + VCB_SAVE["CF_BF_invert"] = true + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_NumPerRowSliderChange(obj) + VCB_SAVE["CF_BF_numperrow"] = obj:GetValue() + getglobal("VCB_BF_CF_FRAME_NumPerRowSliderText"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["CF_BF_numperrow"]) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_CHANGE_PAGE() + if VCB_BF_CF_FRAME:IsVisible() then + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_CF_FRAME2", VCB_MENU_BUTTON4_LINK2) + else + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_CF_FRAME", VCB_MENU_BUTTON4_LINK) + end +end + +function VCB_BF_CF_FRAME_SizeSliderChange(obj) + VCB_SAVE["CF_icon_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_icon_fontsize"]) + if VCB_SAVE["CF_icon_usecfont"] then + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"]) + end + else + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + end +end + +function VCB_BF_CF_FRAME_FontSliderChange(obj) + VCB_SAVE["CF_icon_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_FONT_ARRAY[obj:GetValue()]) + if (not VCB_SAVE["CF_icon_usecfont"]) then + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + end +end + +function VCB_BF_CF_FRAME_CHECKBUTTON_BORDER_CLICK() + if VCB_SAVE["CF_icon_border"] then + VCB_SAVE["CF_icon_border"] = false + if VCB_SAVE["CF_icon_usecfont"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"]) + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + else + VCB_SAVE["CF_icon_border"] = true + if VCB_SAVE["CF_icon_usecfont"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + end + end +end + +function VCB_BF_CF_FRAME_AlphaSliderChange(obj) + VCB_SAVE["CF_icon_opacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText("Icon opacity: "..VCB_SAVE["CF_icon_opacity"]) + VCB_BF_CONSOLIDATED_ICON:SetAlpha(VCB_SAVE["CF_icon_opacity"]) +end + +function VCB_BF_CF_FRAME_FontAlphaSliderChange(obj) + VCB_SAVE["CF_icon_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_icon_fontopacity"]) + VCB_BF_CONSOLIDATED_ICONCount:SetAlpha(VCB_SAVE["CF_icon_fontopacity"]) +end + +function VCB_BF_CF_FRAME_TextureSliderChange(obj) + VCB_SAVE["CF_icon_texture"] = VCB_ICON_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText("Texture: "..VCB_SAVE["CF_icon_texture"]) + VCB_BF_CONSOLIDATED_ICONIcon:SetTexture(nil) + VCB_BF_CONSOLIDATED_ICONIcon:SetTexture("Interface\\AddOns\\VCB\\images\\"..VCB_SAVE["CF_icon_texture"]..".tga") +end + +function VCB_BF_CF_FRAME_BGOpaSliderChange(obj) + VCB_SAVE["CF_BF_bgopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) +end + +function VCB_BF_CF_FRAME_BFBorderSliderChange(obj) + VCB_SAVE["CF_BF_border"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["CF_BF_border"]) + if VCB_SAVE["CF_BF_customborder"] == false then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + end +end + +function VCB_BF_CF_FRAME_USE_CUSTOM_BORDER() + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_customborder"] then + VCB_SAVE["CF_BF_customborder"] = false + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + else + VCB_SAVE["CF_BF_customborder"] = true + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) +end + +function VCB_BF_CF_FRAME_USE_CUSTOM_BACKGROUND() + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_custombackground"] then + VCB_SAVE["CF_BF_custombackground"] = false + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + else + VCB_SAVE["CF_BF_custombackground"] = true + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) +end + +function VCB_BF_CF_FRAME_EDITBOX_BORDER_CHANGE(obj) + VCB_SAVE["CF_BF_customborderpath"] = obj:GetText() + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + end +end + +function VCB_BF_CF_FRAME_EDITBOX_BACKGROUND_CHANGE(obj) + VCB_SAVE["CF_BF_customborderpath"] = obj:GetText() + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + end +end + +function VCB_BF_CF_FRAME_BackdropSliderChange(obj) + VCB_SAVE["CF_BF_background"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_CF_FRAME_BF_BACKGROUND..": "..VCB_SAVE["CF_BF_background"]) + if VCB_SAVE["CF_BF_custombackground"] == false then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_BACKGROUND_ARRAY[VCB_SAVE["CF_BF_background"]], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + end +end + +function VCB_BF_CF_FRAME_BorderOpaSliderChange(obj) + VCB_SAVE["CF_BF_borderopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER_OPACITY..": "..VCB_SAVE["CF_BF_borderopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) +end + +function VCB_BF_CF_FRAME_EDITBOX_BACKGROUND_CHANGE(obj) + VCB_SAVE["CF_BF_custombackgroundpath"] = obj:GetText() + if VCB_SAVE["CF_BF_custombackground"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop(nil) + if VCB_SAVE["CF_BF_customborder"] then + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_SAVE["CF_BF_customborderpath"], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + else + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdrop({bgFile=VCB_SAVE["CF_BF_custombackgroundpath"], edgeFile=VCB_BORDER_ARRAY[VCB_SAVE["CF_BF_border"]], tile=true, tileSize=16, edgeSize=16, insets={left=4,right=4,top=4,bottom=4}}) + end + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropColor(VCB_SAVE["CF_BF_bgcolor_r"],VCB_SAVE["CF_BF_bgcolor_g"],VCB_SAVE["CF_BF_bgcolor_b"],VCB_SAVE["CF_BF_bgopacity"]) + VCB_BF_CONSOLIDATED_BUFFFRAME:SetBackdropBorderColor(VCB_SAVE["CF_BF_bordercolor_r"],VCB_SAVE["CF_BF_bordercolor_g"],VCB_SAVE["CF_BF_bordercolor_b"],VCB_SAVE["CF_BF_borderopacity"]) + end +end + +function VCB_BF_CF_FRAME2_ENABLEBORDER() + if VCB_SAVE["CF_AURA_enableborder"] then + VCB_SAVE["CF_AURA_enableborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["CF_AURA_bordercolor_r"],VCB_SAVE["CF_AURA_bordercolor_g"],VCB_SAVE["CF_AURA_bordercolor_b"],VCB_SAVE["CF_AURA_borderopactiy"]) + end + end + else + VCB_SAVE["CF_AURA_enableborder"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_customborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["CF_AURA_customborderpath"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["CF_AURA_border"]]) + end + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["CF_AURA_bordercolor_r"],VCB_SAVE["CF_AURA_bordercolor_g"],VCB_SAVE["CF_AURA_bordercolor_b"],VCB_SAVE["CF_AURA_borderopactiy"]) + end + end + end +end + +function VCB_BF_CF_FRAME2_AuraPaddingHSliderChange(obj) + VCB_SAVE["CF_AURA_padding_h"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["CF_AURA_padding_h"]) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME2_AuraPaddingVSliderChange(obj) + VCB_SAVE["CF_AURA_padding_v"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["CF_AURA_padding_v"]) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_AuraBorderSliderChange(obj) + VCB_SAVE["CF_AURA_border"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["CF_AURA_border"]) + if VCB_SAVE["CF_AURA_customborder"] == false and VCB_SAVE["CF_AURA_enableborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["CF_AURA_border"]]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["CF_AURA_bordercolor_r"],VCB_SAVE["CF_AURA_bordercolor_g"],VCB_SAVE["CF_AURA_bordercolor_b"],VCB_SAVE["CF_AURA_borderopactiy"]) + end + end + end +end + +function VCB_BF_CF_FRAME2_USE_CUSTOMBORDER() + if VCB_SAVE["CF_AURA_enableborder"] then + if VCB_SAVE["CF_AURA_customborder"] then + VCB_SAVE["CF_AURA_customborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["CF_AURA_border"]]) + end + end + else + VCB_SAVE["CF_AURA_customborder"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["CF_AURA_customborderpath"]) + end + end + end + end +end + +function VCB_BF_CF_FRAME2_EDITBOX_BORDER_CHANGE(obj) + VCB_SAVE["CF_AURA_customborderpath"] = obj:GetText() + if VCB_SAVE["CF_AURA_enableborder"] and VCB_SAVE["CF_AURA_customborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["CF_AURA_customborderpath"]) + end + end + end +end + +function VCB_BF_CF_FRAME2_ENABLEBGCOLOR() + if VCB_SAVE["CF_AURA_enablebgcolor"] then + VCB_SAVE["CF_AURA_enablebgcolor"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(1,1,1) + end + end + else + VCB_SAVE["CF_AURA_enablebgcolor"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["CF_AURA_bgcolor_r"],VCB_SAVE["CF_AURA_bgcolor_g"],VCB_SAVE["CF_AURA_bgcolor_b"]) + end + end + end +end + +function VCB_BF_CF_FRAME2_TIMER_ENABLEBORDER() + if VCB_SAVE["CF_TIMER_border"] then + VCB_SAVE["CF_TIMER_border"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["CF_TIMER_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"]) + end + end + end + else + VCB_SAVE["CF_TIMER_border"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["CF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"], "OUTLINE") + end + end + end + end +end + +function VCB_BF_CF_FRAME_AuraTimerFontSizeSliderChange(obj) + VCB_SAVE["CF_TIMER_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_TIMER_fontsize"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["Timer_usecfont"] then + if VCB_SAVE["CF_TIMER_border"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["CF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["CF_TIMER_fontsize"]) + end + else + if VCB_SAVE["CF_TIMER_border"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["CF_TIMER_fontsize"]) + end + end + end + end +end + +function VCB_BF_CF_FRAME_AuraTimerOpacitySliderChange(obj) + VCB_SAVE["CF_TIMER_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_TIMER_fontopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetAlpha(VCB_SAVE["CF_TIMER_fontopacity"]) + end + end +end + +function VCB_BF_CF_FRAME2_G_ENABLE_BORDER() + if VCB_SAVE["CF_AURA_enablefontborder"] then + VCB_SAVE["CF_AURA_enablefontborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + else + VCB_SAVE["CF_AURA_enablefontborder"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + end + end + end + end +end + +function VCB_BF_CF_FRAME2_GFontSizeSliderChange(obj) + VCB_SAVE["CF_AURA_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["CF_AURA_fontsize"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_enablefontborder"] then + if VCB_SAVE["CF_AURA_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["CF_AURA_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + end +end + +function VCB_BF_CF_FRAME2_GFontOffsetXSliderChange(obj) + VCB_SAVE["CF_AURA_fontoffset_x"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["CF_AURA_fontoffset_x"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["CF_AURA_fontoffset_x"],VCB_SAVE["CF_AURA_fontoffset_y"]) + end + end +end + +function VCB_BF_CF_FRAME2_GFontOffsetYSliderChange(obj) + VCB_SAVE["CF_AURA_fontoffset_y"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["CF_AURA_fontoffset_y"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["CF_AURA_fontoffset_x"],VCB_SAVE["CF_AURA_fontoffset_y"]) + end + end +end + +function VCB_BF_CF_FRAME2_GFontSliderChange(obj) + VCB_SAVE["CF_AURA_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["CF_AURA_font"]) + if (not VCB_SAVE["CF_AURA_usecfont"]) then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_enablefontborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + end +end + +function VCB_BF_CF_FRAME2_GFontOpacitySliderChange(obj) + VCB_SAVE["CF_AURA_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["CF_AURA_fontopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetAlpha(VCB_SAVE["CF_AURA_fontopacity"]) + end + end +end + +function VCB_BF_CF_FRAME_SHOW_POSSIBLE_BUFFS() + if VCB_SAVE["CF_icon_possiblebuffs"] then + VCB_SAVE["CF_icon_possiblebuffs"] = false + else + VCB_SAVE["CF_icon_possiblebuffs"] = true + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_SHOW_BUFFS_GRAYED_OUT() + if VCB_SAVE["CF_icon_showpbgrayedout"] then + VCB_SAVE["CF_icon_showpbgrayedout"] = false + else + VCB_SAVE["CF_icon_showpbgrayedout"] = true + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME2_GBGOpacitySliderChange(obj) + VCB_SAVE["CF_AURA_bgopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["CF_AURA_bgopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetAlpha(VCB_SAVE["CF_AURA_bgopacity"]) + end + end +end + +function VCB_BF_CF_FRAME_INVERT_BUFF_ORIENTATION() + if VCB_SAVE["CF_BF_invertorientation"] then + VCB_SAVE["CF_BF_invertorientation"] = false + else + VCB_SAVE["CF_BF_invertorientation"] = true + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_CHECKBUTTON_ATTACH_CLICK() + if VCB_SAVE["CF_icon_attach"] then + VCB_SAVE["CF_icon_attach"] = false + VCB_BF_CONSOLIDATED_ICON:ClearAllPoints() + VCB_BF_CONSOLIDATED_ICON:SetParent(UIParent) + VCB_BF_CONSOLIDATED_ICON:SetPoint(VCB_ICON_POINT, UIParent, VCB_ICON_POINT, VCB_ICON_POSX, VCB_ICON_POSY) + VCB_BF_CONSOLIDATED_ICON:SetScale(1) + else + VCB_SAVE["CF_icon_attach"] = true + VCB_BF_CONSOLIDATED_ICON:ClearAllPoints() + VCB_BF_CONSOLIDATED_ICON:SetParent(VCB_BF_BUFF_FRAME) + VCB_BF_CONSOLIDATED_ICON:SetPoint("TOPRIGHT", VCB_BF_BUFF_FRAME, "TOPRIGHT", 0, 0) + VCB_BF_WEAPON_FRAME:SetScale(1) + end + VCB_BF_WEAPON_BUTTON_OnEvent(false) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_CF_FRAME_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["CF_icon_usecfont"] then + VCB_SAVE["CF_icon_usecfont"] = false + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_font"], VCB_SAVE["CF_icon_fontsize"]) + end + else + VCB_SAVE["CF_icon_usecfont"] = true + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"]) + end + end +end + +function VCB_BF_CF_FRAME_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["CF_icon_customfont"] = obj:GetText() + if VCB_SAVE["CF_icon_usecfont"] then + if VCB_SAVE["CF_icon_border"] then + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"], "OUTLINE") + else + VCB_BF_CONSOLIDATED_ICONCount:SetFont(VCB_SAVE["CF_icon_customfont"], VCB_SAVE["CF_icon_fontsize"]) + end + end +end + +function VCB_BF_CF_FRAME2_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["CF_AURA_usecfont"] then + VCB_SAVE["CF_AURA_usecfont"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_font"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + else + VCB_SAVE["CF_AURA_usecfont"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + end +end + +function VCB_BF_CF_FRAME2_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["CF_AURA_customfont"] = obj:GetText() + if VCB_SAVE["CF_AURA_usecfont"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_CONSOLIDATED_BUFFFRAME then + if VCB_SAVE["CF_AURA_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["CF_AURA_customfont"], VCB_SAVE["CF_AURA_fontsize"]) + end + end + end + end +end + +---------------------------------------END CONSOLIDATED FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START BUFF FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_BF_FRAME_VERTICAL_MODE() + if VCB_SAVE["BF_GENERAL_verticalmode"] then + VCB_SAVE["BF_GENERAL_verticalmode"] = false + if VCB_SAVE["WP_GENERAL_attach"] and VCB_SAVE["WP_GENERAL_verticalmode"] then + VCB_BF_WP_FRAME_VERTICAL_MODE() + end + else + VCB_SAVE["BF_GENERAL_verticalmode"] = true + if VCB_SAVE["WP_GENERAL_attach"] and (not VCB_SAVE["WP_GENERAL_verticalmode"]) then + VCB_BF_WP_FRAME_VERTICAL_MODE() + end + end + VCB_BF_WEAPON_BUTTON_OnEvent(false) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_NumPerRowSlider_CHANGE(obj) + VCB_SAVE["BF_GENERAL_numperrow"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["BF_GENERAL_numperrow"]) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_AuraPaddingHChange(obj) + VCB_SAVE["BF_GENERAL_padding_h"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["BF_GENERAL_padding_h"]) + if VCB_SAVE["WP_GENERAL_attach"] and (not VCB_SAVE["WP_GENERAL_verticalmode"]) then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["BF_GENERAL_invertorientation"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["BF_GENERAL_padding_h"])*i, 0) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["BF_GENERAL_padding_h"])*i, 0) + end + end + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_AuraPaddingVChange(obj) + VCB_SAVE["BF_GENERAL_padding_v"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["BF_GENERAL_padding_v"]) + if VCB_SAVE["WP_GENERAL_attach"] and VCB_SAVE["WP_GENERAL_verticalmode"] then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["BF_GENERAL_invertorientation"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPLEFT", 0, -(44+VCB_SAVE["BF_GENERAL_padding_v"])*i) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", 0, -(44+VCB_SAVE["BF_GENERAL_padding_v"])*i) + end + end + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_ScaleSliderChange(obj) + VCB_SAVE["BF_GENERAL_scale"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["BF_GENERAL_scale"]) + VCB_BF_BUFF_FRAME:SetScale(VCB_SAVE["BF_GENERAL_scale"]) +end + +function VCB_BF_BF_FRAME_BGOpaSliderChange(obj) + VCB_SAVE["BF_GENERAL_bgopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["BF_GENERAL_bgopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i):SetAlpha(VCB_SAVE["BF_GENERAL_bgopacity"]) + end + end +end + +function VCB_BF_BF_FRAME_ENABLE_BGCOLOR() + if VCB_SAVE["BF_GENERAL_enablebgcolor"] then + VCB_SAVE["BF_GENERAL_enablebgcolor"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(1,1,1,VCB_SAVE["BF_GENERAL_bgopacity"]) + end + end + else + VCB_SAVE["BF_GENERAL_enablebgcolor"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["BF_GENERAL_bgcolor_r"],VCB_SAVE["BF_GENERAL_bgcolor_g"],VCB_SAVE["BF_GENERAL_bgcolor_b"],VCB_SAVE["BF_GENERAL_bgopacity"]) + end + end + end +end + +function VCB_BF_BF_FRAME_ENABLE_BORDER() + if VCB_SAVE["BF_BORDER_enableborder"] then + VCB_SAVE["BF_BORDER_enableborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + end + end + else + VCB_SAVE["BF_BORDER_enableborder"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["BF_BORDER_border"]]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"],VCB_SAVE["BF_BORDER_bordercolor_g"],VCB_SAVE["BF_BORDER_bordercolor_b"],VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end +end + +function VCB_BF_BF_FRAME_BorderOpacityChange(obj) + VCB_SAVE["BF_BORDER_borderopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["BF_BORDER_borderopacity"]) + if VCB_SAVE["BF_BORDER_enableborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetAlpha(VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end +end + +function VCB_BF_BF_FRAME_BorderChange(obj) + VCB_SAVE["BF_BORDER_border"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["BF_BORDER_border"]) + if VCB_SAVE["BF_BORDER_enableborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["BF_BORDER_border"]]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"],VCB_SAVE["BF_BORDER_bordercolor_g"],VCB_SAVE["BF_BORDER_bordercolor_b"],VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end +end + +function VCB_BF_BF_FRAME_USE_CUSTOM_BORDER() + if VCB_SAVE["BF_BORDER_usecustomborder"] then + VCB_SAVE["BF_BORDER_usecustomborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["BF_BORDER_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["BF_BORDER_border"]]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"],VCB_SAVE["BF_BORDER_bordercolor_g"],VCB_SAVE["BF_BORDER_bordercolor_b"],VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end + else + VCB_SAVE["BF_BORDER_usecustomborder"] = true + if VCB_SAVE["BF_BORDER_enableborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["BF_BORDER_customborderpath"]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"],VCB_SAVE["BF_BORDER_bordercolor_g"],VCB_SAVE["BF_BORDER_bordercolor_b"],VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end + end +end + +function VCB_BF_BF_FRAME_EDITBOX_BORDERCHANGE(obj) + VCB_SAVE["BF_BORDER_customborderpath"] = obj:GetText() + if VCB_SAVE["BF_BORDER_enableborder"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["BF_BORDER_customborderpath"]) + getglobal("VCB_BF_BUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["BF_BORDER_bordercolor_r"],VCB_SAVE["BF_BORDER_bordercolor_g"],VCB_SAVE["BF_BORDER_bordercolor_b"],VCB_SAVE["BF_BORDER_borderopacity"]) + end + end + end +end + +function VCB_BF_BF_FRAME_TIMER_ENABLE_BORDER() + if VCB_SAVE["BF_TIMER_border"] then + VCB_SAVE["BF_TIMER_border"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"]) + end + end + end + else + VCB_SAVE["BF_TIMER_border"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + end + end + end + end +end + +function VCB_BF_BF_FRAME_FontSizeChange(obj) + VCB_SAVE["BF_TIMER_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["BF_TIMER_fontsize"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_TIMER_border"] then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["BF_TIMER_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["BF_TIMER_fontsize"]) + end + end + end + end +end + +function VCB_BF_BF_FRAME_FontOpacityChange(obj) + VCB_SAVE["BF_TIMER_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["BF_TIMER_fontopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Duration"):SetAlpha(VCB_SAVE["BF_TIMER_fontopacity"]) + end + end +end + +function VCB_BF_BF_FRAME_CHANGE_PAGE() + if VCB_BF_BF_FRAME:IsVisible() then + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_BF_FRAME2", VCB_MENU_BUTTON5_LINK2) + else + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_BF_FRAME", VCB_MENU_BUTTON5_LINK) + end +end + +function VCB_BF_BF_FRAME_G_ENABLE_BORDER() + if VCB_SAVE["BF_GENERAL_enableborder"] then + VCB_SAVE["BF_GENERAL_enableborder"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + else + VCB_SAVE["BF_GENERAL_enableborder"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + end + end + end + end +end + +function VCB_BF_BF_FRAME_GFontSizeSliderChange(obj) + VCB_SAVE["BF_GENERAL_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["BF_GENERAL_fontsize"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_enableborder"] then + if VCB_SAVE["BF_GENERAL_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["BF_GENERAL_usecfont"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"]) + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + end +end + +function VCB_BF_BF_FRAME_GFontOffsetXSliderChange(obj) + VCB_SAVE["BF_GENERAL_fontoffset_x"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["BF_GENERAL_fontoffset_x"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["BF_GENERAL_fontoffset_x"],VCB_SAVE["BF_GENERAL_fontoffset_y"]) + end + end +end + +function VCB_BF_BF_FRAME_GFontOffsetYSliderChange(obj) + VCB_SAVE["BF_GENERAL_fontoffset_y"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["BF_GENERAL_fontoffset_y"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["BF_GENERAL_fontoffset_x"],VCB_SAVE["BF_GENERAL_fontoffset_y"]) + end + end +end + +function VCB_BF_BF_FRAME_GFontSliderChange(obj) + VCB_SAVE["BF_GENERAL_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["BF_GENERAL_font"]) + if (not VCB_SAVE["BF_GENERAL_usecfont"]) then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + end +end + +function VCB_BF_BF_FRAME_GFontOpacitySliderChange(obj) + VCB_SAVE["BF_GENERAL_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["BF_GENERAL_fontopacity"]) + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetAlpha(VCB_SAVE["BF_GENERAL_fontopacity"]) + end + end +end + +function VCB_BF_BF_FRAME_INVERTBUFFMODE() + if VCB_SAVE["BF_GENERAL_invert"] then + VCB_SAVE["BF_GENERAL_invert"] = false + else + VCB_SAVE["BF_GENERAL_invert"] = true + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_INVERT_AURA_ORIENTATION() + if VCB_SAVE["BF_GENERAL_invertorientation"] then + VCB_SAVE["BF_GENERAL_invertorientation"] = false + else + VCB_SAVE["BF_GENERAL_invertorientation"] = true + end + VCB_BF_WEAPON_BUTTON_OnEvent(false) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_BF_FRAME_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["BF_GENERAL_usecfont"] then + VCB_SAVE["BF_GENERAL_usecfont"] = false + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_font"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + else + VCB_SAVE["BF_GENERAL_usecfont"] = true + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + end +end + +function VCB_BF_BF_FRAME_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["BF_GENERAL_customfont"] = obj:GetText() + if VCB_SAVE["BF_GENERAL_usecfont"] then + for i=0, VCB_MAXINDEX["buff"] do + if getglobal("VCB_BF_BUFF_BUTTON"..i):GetParent() == VCB_BF_BUFF_FRAME then + if VCB_SAVE["BF_GENERAL_enableborder"] then + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_BUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["BF_GENERAL_customfont"], VCB_SAVE["BF_GENERAL_fontsize"]) + end + end + end + end +end + +---------------------------------------END BUFF FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START DEBUFF FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_DBF_FRAME_VERTICAL_MODE() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + VCB_SAVE["DBF_GENERAL_verticalmode"] = false + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + else + VCB_SAVE["DBF_GENERAL_verticalmode"] = true + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_NumPerRowSliderChange(obj) + VCB_SAVE["DBF_GENERAL_numperrow"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BUFFS_PER_ROW..": "..VCB_SAVE["DBF_GENERAL_numperrow"]) + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + else + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_AuraPaddingHSliderChange(obj) + VCB_SAVE["DBF_GENERAL_padding_h"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["DBF_GENERAL_padding_h"]) + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + else + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_AuraPaddingVSliderChange(obj) + VCB_SAVE["DBF_GENERAL_padding_v"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["DBF_GENERAL_padding_v"]) + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + else + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + end + else + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_BGOpaSliderChange(obj) + VCB_SAVE["DBF_GENERAL_bgopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["DBF_GENERAL_bgopacity"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetAlpha(VCB_SAVE["DBF_GENERAL_bgopacity"]) + end +end + +function VCB_BF_DBF_FRAME_ScaleSliderChange(obj) + VCB_SAVE["DBF_GENERAL_scale"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["DBF_GENERAL_scale"]) + VCB_BF_DEBUFF_FRAME:SetScale(VCB_SAVE["DBF_GENERAL_scale"]) +end + +function VCB_BF_DBF_FRAME_ENABLE_BGCOLOR() + if VCB_SAVE["DBF_GENERAL_enablebgcolor"] then + VCB_SAVE["DBF_GENERAL_enablebgcolor"] = false + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(1,1,1,VCB_SAVE["DBF_GENERAL_bgopacity"]) + end + else + VCB_SAVE["DBF_GENERAL_enablebgcolor"] = true + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["DBF_GENERAL_bgcolor_r"],VCB_SAVE["DBF_GENERAL_bgcolor_g"],VCB_SAVE["DBF_GENERAL_bgcolor_b"],VCB_SAVE["DBF_GENERAL_bgopacity"]) + end + end +end + +function VCB_BF_DBF_FRAME_ENABLE_BORDER() + if VCB_SAVE["DBF_BORDER_enableborder"] then + VCB_SAVE["DBF_BORDER_enableborder"] = false + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + end + else + VCB_SAVE["DBF_BORDER_enableborder"] = true + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["DBF_BORDER_usecustomborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["DBF_BORDER_customborderpath"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["DBF_BORDER_border"]]) + end + if i < 3 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_nonecolor_r"],VCB_SAVE["DBF_BORDER_nonecolor_g"],VCB_SAVE["DBF_BORDER_nonecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 3 and i < 6 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_poisoncolor_r"],VCB_SAVE["DBF_BORDER_poisoncolor_g"],VCB_SAVE["DBF_BORDER_poisoncolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 6 and i < 9 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_magiccolor_r"],VCB_SAVE["DBF_BORDER_magiccolor_g"],VCB_SAVE["DBF_BORDER_magiccolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + elseif i >= 9 and i < 12 then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_cursecolor_r"],VCB_SAVE["DBF_BORDER_cursecolor_g"],VCB_SAVE["DBF_BORDER_cursecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["DBF_BORDER_diseasecolor_r"],VCB_SAVE["DBF_BORDER_diseasecolor_g"],VCB_SAVE["DBF_BORDER_diseasecolor_b"],VCB_SAVE["DBF_BORDER_borderopacity"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_USE_CUSTOM_BORDER() + if VCB_SAVE["DBF_BORDER_usecustomborder"] then + VCB_SAVE["DBF_BORDER_usecustomborder"] = false + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["DBF_BORDER_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["DBF_BORDER_border"]]) + end + end + else + VCB_SAVE["DBF_BORDER_usecustomborder"] = true + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["DBF_BORDER_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["DBF_BORDER_customborderpath"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_EDITBOX_BORDER_CHANGE(obj) + VCB_SAVE["DBF_BORDER_customborderpath"] = obj:GetText() + if VCB_SAVE["DBF_BORDER_enableborder"] and VCB_SAVE["DBF_BORDER_usecustomborder"] then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["DBF_BORDER_customborderpath"]) + end + end +end + +function VCB_BF_DBF_FRAME_BorderSliderChange(obj) + VCB_SAVE["DBF_BORDER_border"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["DBF_BORDER_border"]) + if VCB_SAVE["DBF_BORDER_enableborder"] and (not VCB_SAVE["DBF_BORDER_usecustomborder"]) then + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetTexture(VCB_AURABORDER_ARRAY[VCB_SAVE["DBF_BORDER_border"]]) + end + end +end + +function VCB_BF_DBF_FRAME_ENABLE_FONTBORDER() + if VCB_SAVE["DBF_TIMER_enableborder"] then + VCB_SAVE["DBF_TIMER_enableborder"] = false + for i=0,15 do + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + end + else + VCB_SAVE["DBF_TIMER_enableborder"] = true + for i=0,15 do + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + end + end + end +end + +function VCB_BF_DBF_FRAME_FontSizeSliderChange(obj) + VCB_SAVE["DBF_TIMER_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["DBF_TIMER_fontsize"]) + for i=0,15 do + if VCB_SAVE["DBF_TIMER_enableborder"] then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["DBF_TIMER_fontsize"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["DBF_TIMER_fontsize"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_FontOpacitySliderChange(obj) + VCB_SAVE["DBF_TIMER_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["DBF_TIMER_fontopacity"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Duration"):SetAlpha(VCB_SAVE["DBF_TIMER_fontopacity"]) + end +end + +function VCB_BF_DBF_FRAME_BorderOpacitySliderChange(obj) + VCB_SAVE["DBF_BORDER_borderopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["DBF_BORDER_borderopacity"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Border"):SetAlpha(VCB_SAVE["DBF_BORDER_borderopacity"]) + end +end + +function VCB_BF_DBF_FRAME_CHANGE_PAGE() + if VCB_BF_DBF_FRAME:IsVisible() then + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_DBF_FRAME2", VCB_MENU_BUTTON6_LINK2) + else + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_DBF_FRAME", VCB_MENU_BUTTON6_LINK) + end +end + +function VCB_BF_DBF_FRAME_G_ENABLE_BORDER() + if VCB_SAVE["DBF_GENERAL_enableborder"] then + VCB_SAVE["DBF_GENERAL_enableborder"] = false + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + else + VCB_SAVE["DBF_GENERAL_enableborder"] = true + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + end + end + end +end + +function VCB_BF_DBF_FRAME_GFontSizeSliderChange(obj) + VCB_SAVE["DBF_GENERAL_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["DBF_GENERAL_fontsize"]) + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_enableborder"] then + if VCB_SAVE["DBF_GENERAL_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["DBF_GENERAL_usecfont"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"]) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_GFontOffsetXSliderChange(obj) + VCB_SAVE["DBF_GENERAL_fontoffset_x"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["DBF_GENERAL_fontoffset_x"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["DBF_GENERAL_fontoffset_x"],VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + end +end + +function VCB_BF_DBF_FRAME_GFontOffsetYSliderChange(obj) + VCB_SAVE["DBF_GENERAL_fontoffset_y"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):ClearAllPoints() + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["DBF_GENERAL_fontoffset_x"],VCB_SAVE["DBF_GENERAL_fontoffset_y"]) + end +end + +function VCB_BF_DBF_FRAME_GFontSliderChange(obj) + VCB_SAVE["DBF_GENERAL_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["DBF_GENERAL_font"]) + if (not VCB_SAVE["DBF_GENERAL_usecfont"]) then + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_GFontOpacitySliderChange(obj) + VCB_SAVE["DBF_GENERAL_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["DBF_GENERAL_fontopacity"]) + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetAlpha(VCB_SAVE["DBF_GENERAL_fontopacity"]) + end +end + +function VCB_BF_DBF_FRAME_INVERTBUFFORDER() + if VCB_SAVE["DBF_GENERAL_invert"] then + VCB_SAVE["DBF_GENERAL_invert"] = false + for i=0,15 do + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + else + VCB_SAVE["DBF_GENERAL_invert"] = true + for i=0,15 do + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_INVERT_AURA_ORIENTATION() + if VCB_SAVE["DBF_GENERAL_invertorientation"] then + VCB_SAVE["DBF_GENERAL_invertorientation"] = false + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["DBF_GENERAL_padding_h"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + else + VCB_SAVE["DBF_GENERAL_invertorientation"] = true + for i=0,15 do + if VCB_SAVE["DBF_GENERAL_invert"] then + local j = 15-i + getglobal("VCB_BF_DEBUFF_BUTTON"..j):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..j):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):ClearAllPoints() + if VCB_SAVE["DBF_GENERAL_verticalmode"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*i + floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(44+VCB_SAVE["DBF_GENERAL_padding_v"])) + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i):SetPoint("TOPLEFT", (32+VCB_SAVE["DBF_GENERAL_padding_h"])*i - floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])*VCB_SAVE["DBF_GENERAL_numperrow"]*(32+VCB_SAVE["DBF_GENERAL_padding_h"]), -(44+VCB_SAVE["DBF_GENERAL_padding_v"])*floor(i/VCB_SAVE["DBF_GENERAL_numperrow"])) + end + end + end + end +end + +function VCB_BF_DBF_FRAME_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["DBF_GENERAL_usecfont"] then + VCB_SAVE["DBF_GENERAL_usecfont"] = false + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_font"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + else + VCB_SAVE["DBF_GENERAL_usecfont"] = true + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_DBF_FRAME_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["DBF_GENERAL_customfont"] = obj:GetText() + if VCB_SAVE["DBF_GENERAL_usecfont"] then + for i=0, 15 do + if VCB_SAVE["DBF_GENERAL_enableborder"] then + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_DEBUFF_BUTTON"..i.."Count"):SetFont(VCB_SAVE["DBF_GENERAL_customfont"], VCB_SAVE["DBF_GENERAL_fontsize"]) + end + end + end +end + +---------------------------------------END DEBUFF FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START WP FRAME----------------------------------------------------------------------------------------------------------------- +function VCB_BF_WP_FRAME_VERTICAL_MODE() + if VCB_SAVE["WP_GENERAL_verticalmode"] then + VCB_SAVE["WP_GENERAL_verticalmode"] = false + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["WP_GENERAL_padding_h"])*i, 0) + end + if (VCB_SAVE["BF_GENERAL_verticalmode"]) and VCB_SAVE["WP_GENERAL_attach"] then + VCB_BF_BF_FRAME_VERTICAL_MODE() + end + else + VCB_SAVE["WP_GENERAL_verticalmode"] = true + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", 0, -(44+VCB_SAVE["WP_GENERAL_padding_v"])*i) + end + if (not VCB_SAVE["BF_GENERAL_verticalmode"]) and VCB_SAVE["WP_GENERAL_attach"] then + VCB_BF_BF_FRAME_VERTICAL_MODE() + end + end +end + +function VCB_BF_WP_FRAME_ENABLEBGCOLOR() + if VCB_SAVE["WP_GENERAL_enablebgcolor"] then + VCB_SAVE["WP_GENERAL_enablebgcolor"] = false + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(1,1,1, VCB_SAVE["WP_GENERAL_bgopacity"]) + end + else + VCB_SAVE["WP_GENERAL_enablebgcolor"] = true + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetVertexColor(VCB_SAVE["WP_GENERAL_bgcolor_r"],VCB_SAVE["WP_GENERAL_bgcolor_g"],VCB_SAVE["WP_GENERAL_bgcolor_b"],VCB_SAVE["WP_GENERAL_bgopacity"]) + end + end +end + +function VCB_BF_WP_FRAME_ATTACH() + if VCB_SAVE["WP_GENERAL_attach"] then + VCB_SAVE["WP_GENERAL_attach"] = false + VCB_BF_WEAPON_FRAME:ClearAllPoints() + VCB_BF_WEAPON_FRAME:SetParent(UIParent) + VCB_BF_WEAPON_FRAME:SetPoint(VCB_WP_POINT, UIParent, VCB_WP_POINT, VCB_WP_POSX, VCB_WP_POSY) + if VCB_SAVE["CF_icon_attach"] then + VCB_BF_CONSOLIDATED_ICON:ClearAllPoints() + VCB_BF_CONSOLIDATED_ICON:SetPoint("TOPRIGHT", 0, 0) + end + VCB_BF_WEAPON_FRAME:SetScale(VCB_SAVE["WP_GENERAL_scale"]) + else + VCB_SAVE["WP_GENERAL_attach"] = true + local point, relativeTo, relativePoint, xOfs, yOfs = VCB_BF_WEAPON_FRAME:GetPoint() + VCB_WP_POINT = point + VCB_WP_POSX = xOfs + VCB_WP_POSY = yOfs + VCB_BF_WEAPON_FRAME:ClearAllPoints() + VCB_BF_WEAPON_FRAME:SetParent(VCB_BF_BUFF_FRAME) + VCB_BF_WEAPON_FRAME:SetPoint("TOPRIGHT", VCB_BF_BUFF_FRAME, "TOPRIGHT", 0, 0) + if VCB_SAVE["CF_icon_attach"] then + VCB_BF_CONSOLIDATED_ICON:ClearAllPoints() + VCB_BF_CONSOLIDATED_ICON:SetPoint("TOPRIGHT", -2*(32+VCB_SAVE["BF_GENERAL_padding_h"]), 0) + end + if (VCB_SAVE["BF_GENERAL_verticalmode"] and (not VCB_SAVE["WP_GENERAL_verticalmode"])) or ((not VCB_SAVE["BF_GENERAL_verticalmode"]) and (VCB_SAVE["WP_GENERAL_verticalmode"])) then + VCB_BF_BF_FRAME_VERTICAL_MODE() + end + VCB_BF_WEAPON_FRAME:SetScale(1) + end + VCB_BF_WEAPON_BUTTON_OnEvent(false) + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_WP_FRAME_AuraPaddingHSliderChange(obj) + VCB_SAVE["WP_GENERAL_padding_h"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_H..": "..VCB_SAVE["WP_GENERAL_padding_h"]) + if (not VCB_SAVE["WP_GENERAL_attach"]) and (not VCB_SAVE["WP_GENERAL_verticalmode"]) then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", -(32+VCB_SAVE["WP_GENERAL_padding_h"])*i, 0) + end + end +end + +function VCB_BF_WP_FRAME_FontSizeSliderChange(obj) + VCB_SAVE["WP_GENERAL_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["WP_GENERAL_fontsize"]) + for i=0,1 do + if VCB_SAVE["WP_GENERAL_enableborder"] then + if VCB_SAVE["WP_GENERAL_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["WP_GENERAL_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_WP_FRAME_BGOpaSliderChange(obj) + VCB_SAVE["WP_GENERAL_bgopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["WP_GENERAL_bgopacity"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Icon"):SetAlpha(VCB_SAVE["WP_GENERAL_bgopacity"]) + end +end + +function VCB_BF_WP_FRAME_ScaleSliderChange(obj) + VCB_SAVE["WP_GENERAL_scale"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_SCALE..": "..VCB_SAVE["WP_GENERAL_scale"]) + if (not VCB_SAVE["WP_GENERAL_attach"]) then + VCB_BF_WEAPON_FRAME:SetScale(VCB_SAVE["WP_GENERAL_scale"]) + end +end + +function VCB_BF_WP_FRAME_FontSliderChange(obj) + VCB_SAVE["WP_GENERAL_font"] = VCB_FONT_ARRAY[obj:GetValue()] + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT..": "..VCB_SAVE["WP_GENERAL_font"]) + if (not VCB_SAVE["WP_GENERAL_usecfont"]) then + for i=0,1 do + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_WP_FRAME_ENABLE_BORDER() + if VCB_SAVE["WP_BORDER_enableborder"] then + VCB_SAVE["WP_BORDER_enableborder"] = false + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(nil) + end + else + VCB_SAVE["WP_BORDER_enableborder"] = true + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(nil) + if VCB_SAVE["WP_BORDER_usecustomborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["WP_BORDER_customborderpath"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_WEAPONBORDER_ARRAY[VCB_SAVE["WP_BORDER_border"]]) + end + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetVertexColor(VCB_SAVE["WP_BORDER_bordercolor_r"],VCB_SAVE["WP_BORDER_bordercolor_g"],VCB_SAVE["WP_BORDER_bordercolor_b"],VCB_SAVE["WP_BORDER_borderopacity"]) + end + end +end + +function VCB_BF_WP_FRAME_USE_CUSTOM_BORDER() + if VCB_SAVE["WP_BORDER_usecustomborder"] then + VCB_SAVE["WP_BORDER_usecustomborder"] = false + if VCB_SAVE["WP_BORDER_enableborder"] then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_WEAPONBORDER_ARRAY[VCB_SAVE["WP_BORDER_border"]]) + end + end + else + VCB_SAVE["WP_BORDER_usecustomborder"] = true + if VCB_SAVE["WP_BORDER_enableborder"] then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["WP_BORDER_customborderpath"]) + end + end + end +end + +function VCB_BF_WP_FRAME_EDITBOX_BORDER_CHANGE(obj) + VCB_SAVE["WP_BORDER_customborderpath"] = obj:GetText() + if VCB_SAVE["WP_BORDER_enableborder"] and VCB_SAVE["WP_BORDER_usecustomborder"] then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_SAVE["WP_BORDER_customborderpath"]) + end + end +end + +function VCB_BF_WP_FRAME_BorderSliderChange(obj) + VCB_SAVE["WP_BORDER_border"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BORDER..": "..VCB_SAVE["WP_BORDER_border"]) + if VCB_SAVE["WP_BORDER_enableborder"] and (not VCB_SAVE["WP_BORDER_usecustomborder"]) then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(nil) + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetTexture(VCB_WEAPONBORDER_ARRAY[VCB_SAVE["WP_BORDER_border"]]) + end + end +end + +function VCB_BF_WP_FRAME_TIMER_ENABLE_BORDER() + if VCB_SAVE["WP_TIMER_enableborder"] then + VCB_SAVE["WP_TIMER_enableborder"] = false + for i=0,1 do + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + else + VCB_SAVE["WP_TIMER_enableborder"] = true + for i=0,1 do + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + end + end + end +end + +function VCB_BF_WP_FRAME_TIMER_FontSizeSliderChange(obj) + VCB_SAVE["WP_TIMER_fontsize"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_SIZE..": "..VCB_SAVE["WP_TIMER_fontsize"]) + for i=0,1 do + if VCB_SAVE["WP_TIMER_enableborder"] then + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"], "OUTLINE") + end + else + if VCB_SAVE["Timer_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_customfont"], VCB_SAVE["WP_TIMER_fontsize"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetFont(VCB_SAVE["Timer_font"], VCB_SAVE["WP_TIMER_fontsize"]) + end + end + end +end + +function VCB_BF_WP_FRAME_TIMER_FontOpacitySliderChange(obj) + VCB_SAVE["WP_TIMER_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["WP_TIMER_fontopacity"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Duration"):SetAlpha(VCB_SAVE["WP_TIMER_fontopacity"]) + end +end + +function VCB_BF_WP_FRAME_CHANGE_PAGE() + if VCB_BF_WP_FRAME:IsVisible() then + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_WP_FRAME2", "Weapon Frame -2-") + else + VCB_OPTIONS_HIDE_ALL() + VCB_OPTIONS_SHOW("VCB_BF_WP_FRAME", "Weapon Frame -1-") + end +end + +function VCB_BF_WP_FRAME_BorderOpacitySliderChange(obj) + VCB_SAVE["WP_BORDER_borderopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_BACKGROUND_OPACITY..": "..VCB_SAVE["WP_BORDER_borderopacity"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Border"):SetAlpha(VCB_SAVE["WP_BORDER_borderopacity"]) + end +end + +function VCB_BF_WP_FRAME_FontOpacitySliderChange(obj) + VCB_SAVE["WP_GENERAL_fontopacity"] = string.format("%.1f", obj:GetValue()) + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OPACITY..": "..VCB_SAVE["WP_GENERAL_fontopacity"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetAlpha(VCB_SAVE["WP_GENERAL_fontopacity"]) + end +end + +function VCB_BF_WP_FRAME_AuraPaddingVSliderChange(obj) + VCB_SAVE["WP_GENERAL_padding_v"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_PADDING_V..": "..VCB_SAVE["WP_GENERAL_padding_v"]) + if VCB_SAVE["WP_GENERAL_verticalmode"] and (not VCB_SAVE["WP_GENERAL_attach"]) then + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i):ClearAllPoints() + getglobal("VCB_BF_WEAPON_BUTTON"..i):SetPoint("TOPRIGHT", 0, -(44+VCB_SAVE["WP_GENERAL_padding_v"])*i) + end + end +end + +function VCB_BF_WP_FRAME_ENABLE_FONT_BORDER() + if VCB_SAVE["WP_GENERAL_enableborder"] then + VCB_SAVE["WP_GENERAL_enableborder"] = false + for i=0,1 do + if VCB_SAVE["WP_GENERAL_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"]) + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + else + VCB_SAVE["WP_GENERAL_enableborder"] = true + for i=0,1 do + if VCB_SAVE["WP_GENERAL_usecfont"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + end + end + end +end + +function VCB_BF_WP_FRAME_OffsetXSliderChange(obj) + VCB_SAVE["WP_GENERAL_offset_x"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_X..": "..VCB_SAVE["WP_GENERAL_offset_x"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["WP_GENERAL_offset_x"], VCB_SAVE["WP_GENERAL_offset_y"]) + end +end + +function VCB_BF_WP_FRAME_OffsetYSliderChange(obj) + VCB_SAVE["WP_GENERAL_offset_y"] = obj:GetValue() + getglobal(obj:GetName().."Text"):SetText(VCB_COMMON_SLIDER_FONT_OFFSET_Y..": "..VCB_SAVE["WP_GENERAL_offset_y"]) + for i=0,1 do + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetPoint("BOTTOMRIGHT", VCB_SAVE["WP_GENERAL_offset_x"], VCB_SAVE["WP_GENERAL_offset_y"]) + end +end + +function VCB_BF_WP_FRAME_CHECKBUTTON_CUSTOMFONT_CLICK() + if VCB_SAVE["WP_GENERAL_usecfont"] then + VCB_SAVE["WP_GENERAL_usecfont"] = false + for i=0, 1 do + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_font"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + else + VCB_SAVE["WP_GENERAL_usecfont"] = true + for i=0, 1 do + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + end +end + +function VCB_BF_WP_FRAME_EDITBOX_CUSTOMFONT_CHANGE(obj) + VCB_SAVE["WP_GENERAL_customfont"] = obj:GetText() + if VCB_SAVE["WP_GENERAL_usecfont"] then + for i=0, 1 do + if VCB_SAVE["WP_GENERAL_enableborder"] then + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"], "OUTLINE") + else + getglobal("VCB_BF_WEAPON_BUTTON"..i.."Count"):SetFont(VCB_SAVE["WP_GENERAL_customfont"], VCB_SAVE["WP_GENERAL_fontsize"]) + end + end + end +end + +---------------------------------------END WP FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START MISC FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_MISC_FRAME_DISABLE_CF() + if VCB_SAVE["MISC_disable_CF"] then + VCB_SAVE["MISC_disable_CF"] = false + VCB_BF_CONSOLIDATED_ICON:Show() + VCB_BF_CONSOLIDATED_BUFFFRAME:Show() + VCB_BF_CONSOLIDATED_BUFFFRAME:Hide() + for i=0, 6 do + getglobal("VCB_BF_BUFF_BUTTON"..i):SetParent(VCB_BF_CONSOLIDATED_BUFFFRAME) + end + else + VCB_SAVE["MISC_disable_CF"] = true + VCB_BF_CONSOLIDATED_ICON:Hide() + for i=0, 6 do + getglobal("VCB_BF_BUFF_BUTTON"..i):SetParent(VCB_BF_BUFF_FRAME) + getglobal("VCB_BF_BUFF_BUTTON"..i):Show() + end + end + VCB_BF_RepositioningAndResizing() +end + +function VCB_BF_MISC_FRAME_ThemeSliderChange(obj) + getglobal(obj:GetName().."Text"):SetText(VCB_MISC_FRAME_TEXT_THEME..": "..VCB_THEME_NAME[obj:GetValue()]) +end + +function VCB_BF_MISC_FRAME_LOAD() + local value = getglobal("VCB_BF_MISC_FRAME_ThemeSlider"):GetValue() + for cat, val in pairs(VCB_SAVE) do + VCB_SAVE[cat] = VCB_THEME[value][cat] + end + VCB_INITIALIZE() + VCB_BF_RepositioningAndResizing() + VCB_PAGEINIT("VCB_BF_MISC_FRAME") + VCB_SendMessage(VCB_MISC_FRAME_TEXT_THEME..": "..VCB_THEME_NAME[value]..VCB_HAS_BEEN_LOADED) +end + +---------------------------------------END MISC FRAME----------------------------------------------------------------------------------------------------------------- +---------------------------------------START PROFILE MANAGER FRAME----------------------------------------------------------------------------------------------------------------- + +function VCB_BF_PM_FRAME_RIGHT_SCROLLFRAME_Update() + local line -- 1 through 5 of our window to scroll + local lineplusoffset -- an index into our data calculated from the scroll offset + local FRAME = getglobal("VCB_BF_PM_FRAME_RIGHT_SCROLLFRAME") + FauxScrollFrame_Update(FRAME,VCB_tablelength(VCB_Profile_Name),10,40) + for line=1,10 do + lineplusoffset = line + FauxScrollFrame_GetOffset(FRAME) + if VCB_Profile_Name[lineplusoffset] ~= nil then + getglobal("VCB_PM_ENTRY"..line.."_Text"):SetText(lineplusoffset..". "..VCB_Profile_Name[lineplusoffset]) + getglobal("VCB_PM_ENTRY"..line).name = VCB_Profile_Name[lineplusoffset] + getglobal("VCB_PM_ENTRY"..line):Show() + else + getglobal("VCB_PM_ENTRY"..line):Hide() + end + end +end + +function VCB_PM_SCROLLFRAME_ENTRY(button) + getglobal("VCB_BF_PM_FRAME_LEFT_SELECTED_INBOX_TEXT"):SetText(button.name) +end + +function VCB_BF_PM_FRAME_SAVE() + local name = getglobal("VCB_BF_PM_FRAME_EditBox"):GetText() + local temp = {} + if (name) then + for cat, val in pairs(VCB_SAVE) do + temp[cat] = VCB_SAVE[cat] + end + table.insert(VCB_Profile_Name, name) + table.insert(VCB_Profile, temp) + getglobal("VCB_BF_PM_FRAME_LEFT_CURRENT_INBOX_TEXT"):SetText(name) + VCB_CUR_PROFILE = name + VCB_SendMessage(VCB_TEXT_PROFILE..name..VCB_HAS_BEEN_SAVED) + end + VCB_BF_PM_FRAME_RIGHT_SCROLLFRAME_Update() +end + +function VCB_BF_PM_FRAME_LOAD() + local name = getglobal("VCB_BF_PM_FRAME_LEFT_SELECTED_INBOX_TEXT"):GetText() + if (name) then + local key = VCB_Table_GetKeys(VCB_Profile_Name, name) + if (key) then + for cat, val in pairs(VCB_SAVE) do + VCB_SAVE[cat] = VCB_Profile[key][cat] + end + VCB_INITIALIZE() + VCB_BF_RepositioningAndResizing() + getglobal("VCB_BF_PM_FRAME_LEFT_CURRENT_INBOX_TEXT"):SetText(name) + VCB_CUR_PROFILE = name + VCB_SendMessage(VCB_TEXT_PROFILE..name..VCB_HAS_BEEN_LOADED) + end + end +end + +function VCB_BF_PM_FRAME_DELETE() + local name = getglobal("VCB_BF_PM_FRAME_LEFT_SELECTED_INBOX_TEXT"):GetText() + if (name) then + local key = VCB_Table_GetKeys(VCB_Profile_Name, name) + if (key) then + table.remove(VCB_Profile_Name, key) + table.remove(VCB_Profile, key) + VCB_SendMessage(VCB_TEXT_PROFILE..name..VCB_HAS_BEEN_REMOVED) + end + end + VCB_BF_PM_FRAME_RIGHT_SCROLLFRAME_Update() +end + +---------------------------------------END PROFILE MANAGER FRAME----------------------------------------------------------------------------------------------------------------- \ No newline at end of file diff --git a/VCB.toc b/VCB.toc new file mode 100644 index 0000000..d934426 --- /dev/null +++ b/VCB.toc @@ -0,0 +1,15 @@ +## Interface: 11200 +## Title: VCB |cFFFF8080-Shino-|r +## Title-deDE: VCB |cFFFF8080-Shino-|r +## Title-enGB: VCB |cFFFF8080-Shino-|r +## Notes: Vanilla Consolidate Buff-Frames (VCB) is a smart system to manage your auras. The AddOn provides a lot functions to customize it to your tastes and adds a lot of helpful functions for a better overview, which is its purpose in the first place anyway. +## Notes-deDE: Vanilla Consolidate Buff-Frames (VCB) ist ein intelligentes Aura-Verwaltungs-System. Es verfügt über zahlreichen Funktionen, um das Modul nach eigenen Wünschen zu gestalten. Hauptsächlich verbessert es aber die Übersicht, was auch sein Hauptzweck ist. +## Notes-enGB: Vanilla Consolidate Buff-Frames (VCB) is a smart system to manage your auras. The AddOn provides a lot functions to customize it to your tastes and adds a lot of helpful functions for a better overview, which is its purpose in the first place anyway. +## Author: Shino - Kronos +## SavedVariables: VCB_Profile, VCB_Profile_Name +## SavedVariablesPerCharacter: Consolidated_Buffs, Banned_Buffs, VCB_BF_LOCKED, VCB_SAVE, VCB_CUR_PROFILE, VCB_WP_POSX, VCB_WP_POSY, VCB_WP_POINT, VCB_ICON_POINT, VCB_ICON_POSX, VCB_ICON_POSY, VCB_MM_ICON +## Version: 4.1 +VCB.lua +VCB_Buffframe.lua +VCB.xml +VCB_Buffframe.xml diff --git a/VCB.xml b/VCB.xml new file mode 100644 index 0000000..35005f8 --- /dev/null +++ b/VCB.xml @@ -0,0 +1,8017 @@ + + + ---------------------------------LACALIZATION---------------------------------------------------------------- + +