Download
(5 Kb)
Download
Updated: 05/21/24 06:36 AM
Pictures
File Info
Compatibility:
Scions of Ithelia (9.3.0)
Updated:05/21/24 06:36 AM
Created:05/21/24 04:32 AM
Monthly downloads:0
Total downloads:23
Favorites:1
MD5:
Categories:Info, Plug-in Bars, Data Mods, UI Media, Miscellaneous
9.3.0
DungeonHistory  New Today!
Version: 1.0.2
by: oInsideOut [More]
AddOn Description:

A simple Dungeon Log and GUI for successfully completed Dungeons.

Only designed for the Dungeon Finder. Dungeons that are done manually without the use of the Dungeon Finder or unfinished Dungeons won't be recoreded.

Shoutout to the ESOUI Add-on Wiki and especially to pills and ziggr for the Scroll List Example.

This is my first AddOn and first time working with Lua, but it gets the job done!

Settings/Keybinds:

You can bind a key to toggle the DungeonHistory Window.
  • Esc -> Controls -> Addon Keybinds -> DungeonHistory -> Show/Hide History Window

List of usable commands:
  • /dh -> Used to toggle the DungeonHistory Window
  • /dungeonhistory -> Used to toggle the DungeonHistory Window
Optional Files (0)


Post A Reply Comment Options
Unread Today, 05:49 AM  
oInsideOut
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 1
Uploads: 1
Originally Posted by Baertram
Welcome to ESO addon development.

A hint: All variables you declare in lua are global (accessible by other addons and overwriting existing variables), unless you add a local up in front.
To minimize compatibilty issues and pollution of the global namespace (table _G):

If you create an addon with an UI (like your scrolllist in XML, using variable DungeonHistoryXML as a global container), but you already got a global table (DungeonHistory) you could simply add a sub-table DungeonHistory.XML= {} (adding all variables and UI related functions to that)
instead of defining another 2nd global DungeonHistoryXML.

To speed-up the reference and make it easy to access them in your code you can add a local reference like local DungeonHistoryXML = DungeonHistory.XML at the top, below defining DungeonHistory.XML = {}
This will make your code below (in the same lua file) work the same as of before, only using the local reference, pointing to the global table DungeonHistory.XML (instead of a 2nd global variable DungeonHistoryXML).
-> Only in your XML files you'd need to change DungeonHistoryXML to DungeonHistory.XML as the variable DungeonHistoryXML would be local now, and not global anymore.

It's no "Must do it like that" but a best practice.
First of all thank you for taking the time to glance through my spaghetti code.

That makes a lot of sense. I will adapt my code to your suggestion.
Last edited by oInsideOut : 05/21/24 at 06:28 AM.
Report comment to moderator  
Reply With Quote
Unread Today, 04:57 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 5006
File comments: 6066
Uploads: 78
Welcome to ESO addon development.

A hint: All variables you declare in lua are global (accessible by other addons and overwriting existing variables), unless you add a local up in front.
To minimize compatibilty issues and pollution of the global namespace (table _G):

If you create an addon with an UI (like your scrolllist in XML, using variable DungeonHistoryXML as a global container), but you already got a global table (DungeonHistory) you could simply add a sub-table DungeonHistory.XML= {} (adding all variables and UI related functions to that)
instead of defining another 2nd global DungeonHistoryXML.

To speed-up the reference and make it easy to access them in your code you can add a local reference like local DungeonHistoryXML = DungeonHistory.XML at the top, below defining DungeonHistory.XML = {}
This will make your code below (in the same lua file) work the same as of before, only using the local reference, pointing to the global table DungeonHistory.XML (instead of a 2nd global variable DungeonHistoryXML).
-> Only in your XML files you'd need to change DungeonHistoryXML to DungeonHistory.XML as the variable DungeonHistoryXML would be local now, and not global anymore.

It's no "Must do it like that" but a best practice.
Last edited by Baertram : 05/21/24 at 05:02 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: