LUI V4

Change log

------------------------------------------------------------------------
r64 | chaoslux | 2014-07-26 04:07:27 +0000 (Sat, 26 Jul 2014) | 6 lines
Changed paths:
   M /trunk/.pkgmeta
   M /trunk/LUI.toc
   M /trunk/api/options.lua
   A /trunk/libs/LibSerialize
   A /trunk/libs/LibSerialize/serializer.lua
   M /trunk/locale/enUS.lua
   M /trunk/modules/infotext/clock.lua
   M /trunk/modules/infotext/guild.lua

Various unrelated fixes:
- Bumped the TOC to 60000 so it works on the beta.
- Now Hard-Embed the LibSerailize with a fix about Division By Zero.
- Localization: The previous commit added many new options but i forgot to also add the new localized strings in the commit, so doing it now.
- Guild Infotext: Message of the Day now wraps over multiple lines to prevent the tooltip taking half the screen in certain cases.
- Clock Infotext: element:GetTime's Inverse parameter logic was faulty and if Local Time was disabled, it would show realm time for both Local and Realm in the tooltip. Changed it to element:GetTime(useLocal) to make it a little less confusing on how the function works and also fixes the bug.
------------------------------------------------------------------------
r63 | chaoslux | 2014-07-24 09:41:41 +0000 (Thu, 24 Jul 2014) | 10 lines
Changed paths:
   M /trunk/api/options.lua
   M /trunk/modules/infotext/clock.lua

API Changes in this commit:
- Added a new :RefreshOptionsPanel() to force the options to refresh. Should only be called when something outside of the panel would modify it, such as changing a Blizzard option and having it reflect in our options.
- Fixed an issue in SetupMeta where giving an empty table would still call setmetatable()
- Fixed an issue where meta param wasn't option in :NewToggle
- You can now have get and set keys in meta to override that option's Get/Set.

Added Module-Specific Options for Clock infotext:
- No longer uses placeholder db values (dbInstance).
- Now features setting to disable World PVP timers, hide raid lockouts, hide world boss loot lockouts and hiding the instance difficulty next to the clock.
- Also has the ability to change the clock's 24Hour mode or Local Time mode without having using db entries, instead modify CVars directly.
------------------------------------------------------------------------
r62 | chaoslux | 2014-07-22 06:36:25 +0000 (Tue, 22 Jul 2014) | 2 lines
Changed paths:
   M /trunk/libs/libs.xml
   M /trunk/modules/infotext/friends.lua
   M /trunk/modules/infotext/guild.lua

- Libs: Fixed loading LibDataBroker.
- Friends/Guild: Added <Away> and <Busy> tags.
------------------------------------------------------------------------
r61 | chaoslux | 2014-07-22 02:10:27 +0000 (Tue, 22 Jul 2014) | 14 lines
Changed paths:
   M /trunk/api/strings.lua
   M /trunk/modules/infotext/currency.lua
   M /trunk/modules/infotext/friends.lua
   M /trunk/modules/infotext/guild.lua
   M /trunk/modules/infotext/infotext.lua
   M /trunk/modules/infotext/social.lua
   M /trunk/modules/layout.lua

- Currency: Removed offset in CURRENCY_FORMAT. (Text should have less blank space)

Several API changes in this commit:
- Changed :ColorToString to :LUIColorToString (and :StringToLUIColor) because they convert a LUI color table into a string.
- Added :ColorToHex(r,g,b,a), turns the given color into an hex string.
- Added :ColorToString(text, r, g, b), returns a |cff escape string of the given color for use in format and other kinds of strings.
- Added :GetTokenFromClassName(class), takes a localized class name ("Death Knight") and returns the class token ("DEATHKNIGHT")

The previous Friends/Guild text proves to be pretty hard to decode, so while I work to create a new tooltip frame for them, I created basic tooltips in the same fashion as the infotexts:
- No longer uses a confusingly merged function to display both guild and friends.
- Guild Message of the Day header now uses Blizzard's MOTD_COLON
- BN Friends now displays all games/clients they are currently on, as opposed to just displaying their "main" one displayed in the Friends Frame.
- Do not display the Battle.Net Client if you are on any other client.
- Friends now uses the official BNFriend color as well as the official color for their battletag when they are playing something other than WoW.
------------------------------------------------------------------------
r60 | chaoslux | 2014-07-19 09:17:19 +0000 (Sat, 19 Jul 2014) | 8 lines
Changed paths:
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/friends.lua
   M /trunk/modules/infotext/guild.lua

- Dualspec: Changed ToggleTalentTab to use ShowUIPanel/HideUIPanel instead of :Show/:Hide
- Dualspec: Fixed an issue with switching between Talent/Glyph tabs while the frame was already open.

Guild and Friends infotexts have now been updated to their V3 counterparts:
- OnClick no longer has a Button5 event as the hints will be built into the tooltip
- Removed the GuildRoster and ShowFriends hooks in favor of simply resetting the update timer inside the event (as opposed to the function that triggers the event)
- Removed CHAT_MSG_SYSTEM event as it is obsolete for our purpose and FRIENDLIST_UPDATE triggers when a friend comes online/offline anyway.
- Moved the if-then mess of the Guild OnClick into element:ToggleGuildTab
------------------------------------------------------------------------
r59 | chaoslux | 2014-07-15 08:47:57 +0000 (Tue, 15 Jul 2014) | 4 lines
Changed paths:
   M /trunk/modules/infotext/durability.lua
   A /trunk/modules/infotext/friends.lua
   A /trunk/modules/infotext/guild.lua
   M /trunk/modules/infotext/infotext.lua
   A /trunk/modules/infotext/social.lua

- Infotext Durability: Fixed an error with last commit's clean up.
- Infotext: Added :ResetUpdateTimer()

Added Basic Guild and Friends infotexts. So far, supports showing online people.
------------------------------------------------------------------------
r58 | chaoslux | 2014-07-14 06:09:09 +0000 (Mon, 14 Jul 2014) | 3 lines
Changed paths:
   M /trunk/modules/infotext/clock.lua
   M /trunk/modules/infotext/durability.lua
   M /trunk/modules/infotext/fps.lua
   M /trunk/modules/infotext/gold.lua
   M /trunk/modules/infotext/memory.lua

Infotext: New pass over elements to fix some magic numbers:
- All calls to :AddUpdate() now uses an _UPDATE_TIME constant.
- Added constants for continent IDs in the clock infotext.
------------------------------------------------------------------------
r57 | chaoslux | 2014-07-12 03:00:56 +0000 (Sat, 12 Jul 2014) | 14 lines
Changed paths:
   M /trunk/api/coreapi.lua
   M /trunk/locale/enUS.lua
   M /trunk/modules/colors.lua
   M /trunk/modules/infotext/durability.lua
   M /trunk/modules/infotext/fps.lua
   M /trunk/modules/infotext/gold.lua
   M /trunk/modules/infotext/memory.lua

API Changes:
- Added LUI:ColorGradient() which makes a gradient between three colors, this is an adaptation of wowpedia's ColorGradient (which is also used by oUF). By default it goes Green>Yellow>Red
- Added LUI:InverseGradient, which goes Red>Yellow>Green.
- Added LUI:PositiveColor() and LUI:NegativeColor() as quick functions when we need positive/negative coloring.

Infotext changes:
- Updated all infotext to use LUI:ColorGradient
- Memory gradient was adjusted to be closer to what V3 gradient is like now that we use a less agressive red color.
- FPS: Moved the fps's magic number 60 and latency's magic number 400 into constants. (Those numbers were the points at which fps turns green and latency red respectively)
- FPS: Now use Blizzard's lag tolerance value (600) instead of our own (400)
- FPS: fixed remaining unlocalized strings.
- Gold: Fixed Money Deficit, it should no longer be fixed at "0c"
- Gold: Fixed a typo in previous commit, Global listing now uses the GlobalDB instead of the realm one.
- Gold: Now make use of :PositiveColor() and :NegativeColor()
------------------------------------------------------------------------
r56 | chaoslux | 2014-07-11 03:19:22 +0000 (Fri, 11 Jul 2014) | 7 lines
Changed paths:
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/gold.lua
   M /trunk/modules/infotext/infotext.lua

- Dualspec: Fixed an error that shows up for characters without Dual Specialization

Gold module has been completely updated:
- Click and Right Click events now works as intended.
- The tooltip now shows gold for all characters on current realm and a list of the gold you have on various realms/factions.
- Your faction will always be listed before the opposing faction. (without duplication of the code, like in V3)
-
------------------------------------------------------------------------
r55 | chaoslux | 2014-07-09 04:19:48 +0000 (Wed, 09 Jul 2014) | 15 lines
Changed paths:
   M /trunk/api/coreapi.lua
   M /trunk/api/modapi.lua
   M /trunk/api/options.lua
   M /trunk/modules/colors.lua
   M /trunk/modules/infotext/clock.lua
   M /trunk/modules/infotext/currency.lua
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/durability.lua
   M /trunk/modules/infotext/gold.lua
   M /trunk/modules/infotext/infotext.lua

- Infotext: TooltipHeader now adds a colon at the end of the name if it's missing. (Prevent having to format("%s:", name) half the elements.

API changes:
- Renamed GetColor and SetColor to ColorGetter and ColorSetter to prevent confusion with :Color(), they should've been named this way to begin with.
- :IsElement() automatically returns false if self doesn't have a GetParent function. Fix errors with LUI:IsElement()
- :Color now make use of :GetDB() to work with elements.
- Added LUI:GetFactionColor() which returns selected faction RGB, otherwise returns white.

New gold infotext changes:
- Gold amounts are now broken up if it's a large number. (11,950 instead of 11950)
- Infotext tooltip now has a header and hints.

Colors have been updated:
- Added new category next to Class Colors which i called "Context Colors" for a lack of a better name. Currently contains: Alliance, Horde, Neutral, Friendly, Hostile, Sanctuary.
- No longer has a enable/disable button.
------------------------------------------------------------------------
r54 | chaoslux | 2014-07-07 08:41:04 +0000 (Mon, 07 Jul 2014) | 8 lines
Changed paths:
   M /trunk/LUI.lua
   M /trunk/LUI.xml
   M /trunk/api/strings.lua
   A /trunk/modules/infotext/gold.lua

- Added the Gold infotext and pre-emptively added guild/friends to the xml.
- Core: Element Defaults merging now support all database data types (scopes)

First commit of the Gold infotext:
- FormatMoney now uses Blizzard constants to get the "g", "s", "c" values.
- Moved the colors for gold, silver and copper into constant strings.
- New option: "Use Blizzard Format", will display the money string like how its seen in the bags (with gold icon and everything) as opposed to how LUI normally shows it.
- Added option to show copper values.
------------------------------------------------------------------------
r53 | chaoslux | 2014-07-06 08:41:23 +0000 (Sun, 06 Jul 2014) | 16 lines
Changed paths:
   M /trunk/LUI.lua
   M /trunk/locale/enUS.lua
   M /trunk/modules/infotext/clock.lua
   M /trunk/modules/infotext/currency.lua
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/durability.lua
   M /trunk/modules/infotext/fps.lua
   M /trunk/modules/infotext/infotext.lua
   M /trunk/modules/minimap.lua

Localization pass!
- Removed several strings that had a GlobalStrings version, such as "General", or "FPS:"
- Renamed all Minimap localization strings to use new naming style.
- Added localizations for Dualspec and Currency.
- Uses "Realm Time:" instead of "Server Time:" due to GlobalStrings.
- Core_ModuleEnabled and Disabled now have the full color code in the string, because it looked weird otherwise.

DualSpec:
- The tooltip header now shows "Dual Specialization:" for the same reason as the earlier "No Spec" change. There also happened to be a GlobalStrings for that.
- Updating the element's text is now its own function, separate from UpdateTalents.

Minimap:
- While changing the locale strings, updated a few things.
- the local table that contains the formats for coordPrecisions is now a constant at the top of the file instead of hidden inside a function. (COORD_FORMAT_LIST)
- The MaskTextures have been moved to constants that make it even more clear what why we're using said texture.
- Some comments have been re-aligned using spaces instead of tabs.
------------------------------------------------------------------------
r52 | chaoslux | 2014-07-05 05:37:05 +0000 (Sat, 05 Jul 2014) | 20 lines
Changed paths:
   M /trunk/api/modapi.lua
   M /trunk/api/options.lua
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/infotext.lua

Second part of big backend changes to support elements in the api, especially the ability to create options.

Modapi changes:
- Added :IsElement(), this returns true if the object calling it is an element or false if its a module (direct child of the LUI object)
- Added :GetDB() it will fetch a database table. A module calling it will receive module.db.profile an element calling it will receive its subtable. You can also specify a scope to get another table than .profile

Options API changes:
- Getter/Setter functions make use of :GetDB() to support element options.
- When checking for "root" in the meta, it now make sure it's a boolean.

Infotext:
- LoadOptions now look up for any elements with LoadOptions to embed.
- Properly embed LUI API to infotext elements.
- Cleaned up testing code.

Dualspec Changes:
- Received the first infotext option: LootSpec, toggles the display of your loot specialization in the spec text.
- Loot Specialization also shows up in the tooltip, regardless of option settings.
- If you do not have a specialization, it will say "No Specialization" instead of "No Spec"
- Switched the conditional for HasDualSpec to prevent Lua shenanigans from occuring. (Cond and false or true has proved to be dodgy at best due to the way Lua analyze "or")
------------------------------------------------------------------------
r51 | chaoslux | 2014-07-02 08:18:02 +0000 (Wed, 02 Jul 2014) | 14 lines
Changed paths:
   M /trunk/LUI.lua
   M /trunk/api/coreapi.lua
   M /trunk/api/modapi.lua
   M /trunk/api/options.lua
   M /trunk/modules/infotext/dualspec.lua
   M /trunk/modules/infotext/infotext.lua
   M /trunk/modules/uielements/uielements.lua

This commit is the first part of a large backend change to support elements in the API without requiring specialized support from its parent module.

API major changes:
- Added LUI:CopyTable() it copies the entire content of a table into target destination.
- Added :GetParent() to all modules and elements upon creation. It will return the name and object of its parent. (which is either a module or the LUI object)
- RegisterModule now merges defaults from a module's elements before creating the namespace. An element database is stored in module.db.profile.element (from element.defaults.profile
- Infotext now has its own module:IterateModules() so that it doesnt need any special treatment.

API minor changes:
- Added new modcreate prototype. It will automatically embed itself upon creation of the module (instead of the moment the module is registered). This should only be used when you really need to.
- :PrintTable and :PrintFullTable now prints an message and no longer stops execution if  it receives a nil table.
- :PrintTable and :PrintFullTable now shows lines at the top and bottom of the print to help readability.
- Renamed the devapi prototype in modapi.lua to moadpi to make it more clear.
- Slight cleanup of module.defaultDisabled in RegisterModule
------------------------------------------------------------------------
r50 | chaoslux | 2014-06-29 21:21:48 +0000 (Sun, 29 Jun 2014) | 11 lines
Changed paths:
   M /trunk/api/coreapi.lua
   M /trunk/api/options.lua
   M /trunk/api/strings.lua
   M /trunk/modules/layout.lua
   M /trunk/modules/minimap.lua

- Minimap: Removed commented code.

Strings API changes:
- Now an actual api module. Moved RGBToString and StringToRGB in it.
- RGBToString and StringToRBG have been renamed ColorToString and StringToColor due to expecting a LUI Color (as opposed to RGB color)
- Uncommented LUI.Corners and LUI.Sides

Options API changes:
- Now uses the good localized string. (thanks Mule)
- SetupMeta will now make the call to setmetatable() unless uniqueTable is true.
- Added a new OptionHook() function, it faciliate injecting functions that make use of info table. It takes care of many things such as making sure it only ever run once, notifying AceConfig, and giving information about the parent option to the called function.
------------------------------------------------------------------------
r49 | chaoslux | 2014-06-28 18:36:28 +0000 (Sat, 28 Jun 2014) | 9 lines
Changed paths:
   M /trunk/api/coreapi.lua
   M /trunk/api/modapi.lua
   M /trunk/api/options.lua
   M /trunk/locale/enUS.lua
   M /trunk/modules/minimap.lua

- API: Reorganized and cleaned the files so they didnt keep declarations from before the split that do not concern them.
- Minimap: Updated the options to make use of the Options API Improvements listed below.

Options API Improvements:
- The whole Meta concept has been improved. The API no longer need to assume that there IS a metatable in the option.
- Added new CheckMeta(info, entry [, datatype]) function that grabs the "entry" value if it exists, nil otherwise. Optional datatype can be used to enforce a type check.
- Meta-SetFunc now uses more than a rudimentary check if the value exists. It now also check that it is in fact a function that is beind passed.
- You can now use a string in Meta-SetFunc to call a method function.
- Changed SetupMeta logic: It used return a unique table unless you passed an optional "useBasic" boolean. Now it will return a basic table unless you pass an optional uniqueTable boolean. This change was done because 90% of options api calls do NOT need an unique table.
------------------------------------------------------------------------
r48 | chaoslux | 2014-06-27 05:12:26 +0000 (Fri, 27 Jun 2014) | 4 lines
Changed paths:
   M /trunk/LUI.lua
   M /trunk/LUI.xml
   A /trunk/api
   A /trunk/api/coreapi.lua
   A /trunk/api/modapi.lua
   A /trunk/api/options.lua
   A /trunk/api/strings.lua
   D /trunk/devapi.lua
   M /trunk/modules/infotext/dualspec.lua
   D /trunk/modules/strings.lua
   D /trunk/optapi.lua

- Moved all the API files into their own folder.
- API now uses a module structure. There's the core that contains LUI: methods, along with two elements: Modules and Options, for providing generic embeddable module api and the options api.
- Considering the core api has nothing that can be embedded, it allows for a better structure to choose and control what api functions get embedded.
- Also, add AceEvent as a default module library because nearly everything uses it.
------------------------------------------------------------------------
r47 | chaoslux | 2014-06-27 02:38:55 +0000 (Fri, 27 Jun 2014) | 2 lines
Changed paths:
   M /trunk/modules/infotext/dualspec.lua

- Only set MAX_SPECS during OnCreate as it caused errors creating the spec info cache.
- Moved cacheSpecInfo into an element method.
------------------------------------------------------------------------
r46 | chaoslux | 2014-06-26 08:39:23 +0000 (Thu, 26 Jun 2014) | 3 lines
Changed paths:
   M /trunk/modules/infotext/dualspec.lua

- Tooltip says "Primary/Secondary Talents" instead of "Primary/Secondary Spec" to allow us to use Blizzard localized strings.
- Now displays your chosen talents for a given spec in the tooltip in the format of "Spec (123123)"
- Only scans for talents of your inactive spec once as they cannot change unless it becomes the active spec.
------------------------------------------------------------------------
r45 | chaoslux | 2014-06-24 08:30:34 +0000 (Tue, 24 Jun 2014) | 5 lines
Changed paths:
   M /trunk/modules/infotext/dualspec.lua

Dualspec Infotext:
- Combined the OnMouseDown and OnClick functions.
- The specCache now goes from 1 to GetNumSpecializations(), as opposed to 1 to 4 (causing 10 out of 11 classes to get a 4th useless entry)
- Moved the duplicate code handling Talent Frame tabs into ToggleTalentTab(id)
- Moved the Glyph Frame click event from "Click on Icon" to "Shift-Click"
------------------------------------------------------------------------

Facts

Uploaded on
Jul 26, 2014
Game version
  • 5.4.8
Filename
LUI-r64.zip
Size
526.8 KiB
MD5
b52f851711bcc387986fd2755c44cd1f
Type
Alpha
Status
Normal
Downloads
12

Authors