Quantcast
Download
(3 Kb)
Download
Updated: 05/31/19 06:55 AM
Compatibility:
Elsweyr (5.0.5)
Wrathstone (4.3)
Murkmire (4.2)
Wolfhunter (4.1)
Summerset (4.0)
Dragon Bones (3.3)
Updated:05/31/19 06:55 AM
Created:03/04/18 11:59 AM
Monthly downloads:8,981
Total downloads:89,233
Favorites:140
MD5:
5.0.5
LibDialog - Custom confirmation dialog with 2 buttons  Popular! (More than 5000 hits)
Version: 1.23
by: Baertram [More]
LibDialog
A library to create custom dialogs for your confirmation messages, containing customizable title and body text + 2 buttons (Accept, Decline) which can run your specified callback functions.

Usage
-Download, use as standalone library or strip the manifest txt file and just use the library file within your addon.
-Load the library within your addon code using the global variable LibDialog
Lua Code:
  1. local libDialog = LibDialog

-Specify a new dialog for your addon, giving it a unique dialog name, and using a unique addon name:
Lua Code:
  1. libDialog:RegisterDialog("YourAddonName", "DialogNameConfirmation1", "Title of the dialog", "Body text of the dialog.\n\nAre you sure?", callbackYes, callbackNo, callbackSetup)
Title of the dialog: Can be a string, an integer registered for function GetString(Integer) or a function which returns a string
Body text of the dialog: Can be a string, an integer registered for function GetString(Integer) or a function which returns a string
callbackYes: The function which will be executed as the dialog button "Accept" is pressed (Obligatory)
callbackNo: The function which will be executed as the dialog button "Decline" is pressed (Can be nil)
callbackSetup: The function which will be executed as the dialog is created (Can be nil)

-Show the dialog using the same unique addon and unique dialog name which you have used to register a dialog before:
Lua Code:
  1. libDialog:ShowDialog("YourAddonName", "DialogNameConfirmation1", data)
data: Data which can be passed to the dialog

Amount of dialogs per addon
You can define as much dialogs as you want to.


Where are the dialogs stored ingame?
The dialogs will be stored in the library variable which you have deifned via libStub, e.g. libDialog.
You can check your "libDialog" variable ingame (if you expose it to the globals) to see a list of addons which use the library, where a dialog was registered for the addon already.

You can also check the global ESO variable for dialogs
Code:
ESO_Dialogs[dialogName]
where "dialogName" is the concatenated string of uniqueAddonName and uniqueDialogName.
Version 1.23
Fixed: Loading of library without LibStub
Removed: UTF-8 BOM on txt file

Version 1.22
-Updated API fopr Elsweyr
-Added ##IsLibrary: true tag to manifest txt
-Added ##AddOnVersion tag to manifest txt
-Made lib work with LibStub, or without using global variable LibDialog
-Removed LibStub from the archive and made LibDialog optional depending on LibStub

Version 1.21
Fixed: Archive contained a non-wanted subfolder LibDialog_1_2 which was removed.

Version 1.2
Changed: API
Fixed: Dependency to library LibStub

Version 1.1
Added: callBack function for dialog setup
Added: Support for "title" and "body" to be a normal String, a registered integer for the function GetString(integer) or a function which returns the string
Added: data can be passed to the dialog's data now (access it via dialog.data)
Optional Files (0)


Archived Files (5)
File Name
Version
Size
Uploader
Date
1.22
3kB
Baertram
05/19/19 04:49 PM
1.21
4kB
Baertram
09/03/18 01:05 PM
1.2
4kB
Baertram
08/30/18 11:24 AM
1.1
4kB
Baertram
07/26/18 05:18 AM
1.0
4kB
03/04/18 11:59 AM


Post A Reply Comment Options
Unread 05/27/19, 04:07 AM  
Marazota

Forum posts: 135
File comments: 1097
Uploads: 0
Originally Posted by Baertram
Originally Posted by Marazota
this lib prevents Skyshard addon from counting skyshards in Skill UI
numbers always the same no matter how many skyshards you gathererd
only after reloadui numbers will change
And why should this lib have to do with this? It's a dialog library and got nothing to do with skills nor Skyshards
i dont know

tested with only Skyshards+Addon Selector active first
and then without it

Ah looks like its Addon Selector then.... reported to that addon page
Last edited by Marazota : 05/27/19 at 11:15 AM.
Report comment to moderator  
Reply With Quote
Unread 05/27/19, 03:48 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2201
File comments: 2425
Uploads: 57
Originally Posted by Marazota
this lib prevents Skyshard addon from counting skyshards in Skill UI
numbers always the same no matter how many skyshards you gathererd
only after reloadui numbers will change
And why should this lib have to do with this? It's a dialog library and got nothing to do with skills nor Skyshards
Report comment to moderator  
Reply With Quote
Unread 05/27/19, 03:26 AM  
Marazota

Forum posts: 135
File comments: 1097
Uploads: 0
this lib prevents Skyshard addon from counting skyshards in Skill UI
numbers always the same no matter how many skyshards you gathererd
only after reloadui numbers will change
Report comment to moderator  
Reply With Quote
Unread 09/06/18, 05:27 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2201
File comments: 2425
Uploads: 57
Originally Posted by Marazota
differences of version at esoui and in manifest
1.2.1
vs
1.21

its confusing Minion, because it want to update it every time after launch
Thanks, will fix ESOUI.
Report comment to moderator  
Reply With Quote
Unread 09/05/18, 09:46 AM  
Marazota

Forum posts: 135
File comments: 1097
Uploads: 0
differences of version at esoui and in manifest
1.2.1
vs
1.21

its confusing Minion, because it want to update it every time after launch
Report comment to moderator  
Reply With Quote
Unread 07/26/18, 05:21 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 2201
File comments: 2425
Uploads: 57
Version 1.1
Added: callBack function for dialog setup
Added: Support for "title" and "body" to be a normal String, a registered integer for the function GetString(integer) or a function which returns the string
Added: data can be passed to the dialog's data now (access it via dialog.data)

The callBackSetup function can be used to change some stuff within the dialog as it gets created/setup.

The data parameter can be used to pass custom variables to the dialog and use them inside the callbackYes or callbackNo functions via dialog.data then.

Te parameters title and bodyText can be a string like "Titel" or a registered integer for the function GetString(integer) like SI_MY_DIALOG_TITLE, or a function returning a string like
Lua Code:
  1. function() return "Titel" end
or
Lua Code:
  1. function() return GetString(SI_MY_DIALOG_TITEL) or "No titel specified" end
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: