Download
(3 Kb)
Download
Updated: 10/26/23 03:34 PM
Compatibility:
Endless Archive (9.2.5)
base-game patch (9.1.5)
Necrom (9.0.0)
Scribes of Fate (8.3.5)
Firesong (8.2.5)
Lost Depths (8.1.5)
High Isle (8.0.0)
Updated:10/26/23 03:34 PM
Created:03/04/18 11:59 AM
Monthly downloads:7,959
Total downloads:726,583
Favorites:482
MD5:
LibDialog - Custom confirmation dialog with 2 buttons  Popular! (More than 5000 hits)
Version: 1.27
by: Baertram [More]
LibDialog has removed LibStub support with the Greymoor API10031 update.
Please use the global variable "LibDialog" in your addons instead!




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, forceUpdate, additionalOptions, textParams)
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)
forceUpdate: boolean to force the update of an already registered dialog. If false the function will exit if the dialog already exists!
additionalOptions: table with additional options of ZO_Dialogs. See description below.
textParams: table with text parameters for zo_strformat replacement of placeholders in title, mainText and/or warning texts of ZO_Dialogs. See description below.

-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

Lua Code:
  1. --Add an editBox with parameters to a dialog
  2. --You can either pass in a table "editBoxParams" with the following contents (see below)
  3. --[[
  4.     Possible parameters in editBoxParams table could be:
  5.     --->defaultText: number (will be used with function GetString(number)), or string. The default text shown at the edit box. Will be replaced upon typing in it
  6.     --->textType: a textType constant (nil will be using TEXT_TYPE_ALL)
  7.     ---->  TEXT_TYPE_ALL = 0
  8.     ---->  TEXT_TYPE_PASSWORD = 1
  9.     ---->  TEXT_TYPE_NUMERIC = 2
  10.     ---->  TEXT_TYPE_NUMERIC_UNSIGNED_INT = 3
  11.     ---->  TEXT_TYPE_ALPHABETIC = 4
  12.     ---->  TEXT_TYPE_ALPHABETIC_NO_FULLWIDTH_LATIN = 5
  13.     --->specialCharacters: a table with characters which can be entered into the input field. Table key is a number, value a character
  14.     --->maxInputCharacters: number of maximum possible entered characters
  15.     --->validatesText: boolean should the text in the editbox be validated
  16.     --->validator: function for the text validation
  17.     --->matchingString: string, Should the input into the editbox be compared to this matching string (e.g. used for DESTROY confirm dialog)
  18.     --->autoComplete: table, containing info for a ZO_AutoComplete control attached to the editBox (will be created new if not existing).
  19.     ---->subtable includeFlags: table with the include flags of the ZO_AutoComplete, e.g. { AUTO_COMPLETE_FLAG_GUILD, AUTO_COMPLETE_FLAG_RECENT, AUTO_COMPLETE_FLAG_RECENT_TARGET, AUTO_COMPLETE_FLAG_RECENT_CHAT },
  20.     ---->subtable excludeFlags: table with the exclude flags of the ZO_AutoComplete, e.g.  {AUTO_COMPLETE_FLAG_FRIEND },
  21.     ---->boolean onlineOnly: boolean parameter online only, e.g. AUTO_COMPLETION_ONLINE_OR_OFFLINE
  22.     ---->number maxResults: number parameter max results, e.g. MAX_AUTO_COMPLETION_RESULTS
  23. ]]
  24. --Or you can use the single parameters after that editBoxParams, starting with "textType".
  25. --->The single parameters are of the same type as described above in the "editBoxParams" table.
  26. function lib:AddEditBox(uniqueAddonName, uniqueDialogName, editBoxParams, defaultText, textType, specialCharacters, maxInputCharacters, matchingString, validatesText, validator, autoComplete)


Lua Code:
  1. --Remove an editBox from a dialog
  2. function lib:RemoveEditBox(uniqueAddonName, uniqueDialogName)


Lua Code:
  1. --Add radio buttons with parameters to a dialog
  2. --You can either pass in a table "radioButtonsParams" with the following contents (see below)
  3. --[[
  4.     -->Table specifiying radio buttons at the dialog. The table needs the radioButtonIndex as key and a subTable as value for each radio button.
  5.     -->The following parameters can be added to the subTable of each radioButton:
  6.     --->text: String
  7.     --->data: Table with data of the radioButton
  8.     --->clickedCallback: function called as the radio button was clicked. parameters of the function are:
  9.     ---->radioButtonControl control
  10.     ---->mouseButton MOUSE_BUTTON_INDEX_*, e.g.
  11.     ----->MOUSE_BUTTON_INDEX_LEFT = 1
  12.     ----->MOUSE_BUTTON_INDEX_RIGHT = 2
  13.     ----->MOUSE_BUTTON_INDEX_MIDDLE = 3
  14.     ----->MOUSE_BUTTON_INDEX_4 = 4
  15.     ----->MOUSE_BUTTON_INDEX_5 = 5
  16.     ----->MOUSE_BUTTON_INDEX_LEFT_AND_RIGHT = 6
  17.     ---->upInside boolean, was the mouse released over the control
  18.     ---->shift boolean: Was SHIFT key pressed
  19.     ---->alt boolean: Was ALT key pressed
  20.     ---->ctrl boolean: Was CTRL key pressed
  21.     ---->command boolean: Was COMMAND (MAC only!) key pressed
  22. ]]
  23. --Or you can use the single parameters after that radioButtonsParams, starting with "rb<number>", e.g. rb1Text, rb1Data, rb1Callback and so on.
  24. --->The single parameters are of the same type as described above in the "radioButtonsParams" table.
  25. function lib:AddRadioButtons(uniqueAddonName, uniqueDialogName, radioButtonsParams, rb1Text, rb1Data, rb1ClickedCallback, rb2Text, rb2Data, rb2ClickedCallback, rb3Text, rb3Data, rb3ClickedCallback, rb4Text, rb4Data, rb4ClickedCallback, rb5Text, rb5Data, rb5ClickedCallback)


Lua Code:
  1. --Remove the radioButtons from a dialog
  2. --radioButtonNumbers table: key is the radioButtonNumber which should be removed, and value boolean true -> remove
  3. -->if table radioButtonNumbers is not given ALL radioButtons will be removed
  4. function lib:RemoveRadioButtons(uniqueAddonName, uniqueDialogName, radioButtonNumbers)


Amount of dialogs per addon
You can define as much dialogs as you want to as the names are unique.


Additional options and textParams
Code:
------------------------------------------------------------------------
-- ZO_Dialogs - possible parameters
------------------------------------------------------------------------
--> See example calls inside file LibDialog.lua, lines starting with (and below)
--v-- TEST FUNCTION - BEGIN 


--Valid dialog additional options
--Options like "editBox = { ... }, warning, or "customControl = {...}"
--You can find all options here in the lines ff
--https://github.com/esoui/esoui/blob/0569f38e70254b4e08a5eab088c4ce5e7e46be55/esoui/libraries/zo_dialog/zo_dialog.lua#L568

--Valid additional dialog parameters
additionalOptions = {
    ["canQueue"]        = { paramTypes = {"boolean", "function"} },
    ["title"]           = { paramTypes = {"table", } },
    -- text: String or function returning a string (can contain placeholders <<1>> etc. for zo_strformat)
    -- align: TEXT_ALIGN_* member to set the alignment of the text (TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT, or TEXT_ALIGN_CENTER....left is default).
    -- timer: index,  which indicates that a certain parameter should be treated as seconds in a timer, and converted to time format
    --      (so if title contains "timer = 2", the 2nd parameter (<<2>>) in title.text is converted via zo_strformat to time format before being placed
    --      in the string).
    --Can this dialog be queued and called later, or not?
    ["mainText"]        = { paramTypes = {"table", } },
    -- text: String or function returning a string (can contain placeholders <<1>> etc. for zo_strformat)
    -- align: TEXT_ALIGN_* member to set the alignment of the text (TEXT_ALIGN_LEFT, TEXT_ALIGN_RIGHT, or TEXT_ALIGN_CENTER....left is default).
    -- timer: index,  which indicates that a certain parameter should be treated as seconds in a timer, and converted to time format
    --      (so if mainText contains "timer = 2", the 2nd parameter (<<2>>) in mainText.text is converted via zo_strformat to time format before being placed
    --      in the string).
    --Can this dialog be queued and called later, or not?
    ["callback"]        = { paramTypes = {"function"}, },
    -- A callback function of the dialog, fired as the dialog is shown via ZO_Dialogs_ShowDialog
    -- 1 parameter in the callback function: number dialogID
    ["updateFn"]        = { paramTypes = {"function"}, },
    -- an update function called automatically as OnUpdate fires for the dialog
    ["gamepadInfo"]     = { paramTypes = {"table"} },
    --dialogType = any dialog of GAMEPAD_DIALOGS:
    --->GAMEPAD_DIALOGS.BASIC
    --->GAMEPAD_DIALOGS.CENTERED
    --->GAMEPAD_DIALOGS.COOLDOWN
    --->GAMEPAD_DIALOGS.CUSTOM
    --->GAMEPAD_DIALOGS.ITEM_SLIDER
    --->GAMEPAD_DIALOGS.PARAMETRIC
    --->GAMEPAD_DIALOGS.STATIC_LIST
    --text = number e.g. SI_DIALOG_CANCEL string constant, string text, or function returning a string
    --allowShowOnNextScene = boolean
    ["showLoadingIcon"] = { paramTypes = {"boolean"} },
    --An option to show an animated loading icon near the main text. See parameter "loadingIcon" below
    ["customLoadingIcon"]     = { paramTypes = {"string", "function"} },
    --You can specify your own texture here which should be used as the loading icon.
    --dialog.loadingIcon = "string texture" (see https://github.com/esoui/esoui/blob/0569f38e70254b4e08a5eab088c4ce5e7e46be55/esoui/libraries/zo_dialog/zo_dialog.lua#L580)
    --As the "dialog" table will be created within function ZO_Dialogs_ShowDialog we need to apply our custom texture somehow to the control.
    --We will use the "callback" function of the dialog to achieve this! If a callback function was already defined we will "PreHook" this function to insert the texture first.
    ["modal"]           = { paramTypes = {"boolean"} },
    --Show the dialog modal or not
    ["warning"]         = { paramTypes = {"table"} },
    --Show a warning text at teh dialog.
    -- table with parameters
    --->string or function text,
    --->number timer,
    -----> You specify the timer index number here.
    -----> And inside the table "textParams" (see below) the warningParams the key must be the timer index, and the value the milliseconds left of that timer.
    -----> The attribute above (warning.text) should contain placeholders like <<1>> and <<2>> for a zo_strformat with the timer numbers! It will show a countdown then.
    --->boolean verboseTimer,
    ----> Show more details at the cooldown
    ["editBox"]         = { paramTypes = {"table"} },
    --Table specifiying an input edit control at the dialog. The following parameters can be added to the table:
    --->defaultText: number (will be used with function GetString(number)), or string. The default text shown at the edit box. Will be replaced upon typing in it
    --->textType: a textType constant (nil will be using TEXT_TYPE_ALL)
    ---->  TEXT_TYPE_ALL = 0
    ---->  TEXT_TYPE_PASSWORD = 1
    ---->  TEXT_TYPE_NUMERIC = 2
    ---->  TEXT_TYPE_NUMERIC_UNSIGNED_INT = 3
    ---->  TEXT_TYPE_ALPHABETIC = 4
    ---->  TEXT_TYPE_ALPHABETIC_NO_FULLWIDTH_LATIN = 5
    --->specialCharacters: a table with characters which can be entered into the input field. Table key is a number, value a character
    --->maxInputCharacters: number of maximum possible entered characters
    --->validatesText: boolean should the text in the editbox be validated
    --->validator: function for the text validation
    --->matchingString: string, Should the input into the editbox be compared to this matching string (e.g. used for DESTROY confirm dialog)
    --->autoComplete: table, containing info for a ZO_AutoComplete control attached to the editBox (will be created new if not existing).
    ---->subtable includeFlags: table with the include flags of the ZO_AutoComplete, e.g. { AUTO_COMPLETE_FLAG_GUILD, AUTO_COMPLETE_FLAG_RECENT, AUTO_COMPLETE_FLAG_RECENT_TARGET, AUTO_COMPLETE_FLAG_RECENT_CHAT },
    ---->subtable excludeFlags: table with the exclude flags of the ZO_AutoComplete, e.g.  {AUTO_COMPLETE_FLAG_FRIEND },
    ---->boolean onlineOnly: boolean parameter online only, e.g. AUTO_COMPLETION_ONLINE_OR_OFFLINE
    ---->number maxResults: number parameter max results, e.g. MAX_AUTO_COMPLETION_RESULTS
    ["radioButtons"]  = { paramTypes = {"table"} },
    -->Table specifiying radio buttons at the dialog. The table needs the radioButtonIndex as key and a subTable as value for each radio button.
    -->The following parameters can be added to the subTable of each radioButton:
    --->text: String
    --->data: Table with data of the radioButton
    ["customControl"]   = { paramTypes = {"userdata", "function"} },
    --An own created control you would like to anchor and show in the dialog

    ["buttonData"]      = { paramTypes = {"table"} }, -- needs to be a table with key = buttonIndex (1 or 2). Subdata can be visible (boolean or function returning a boolean)
    -->Table with key = buttonIndex (1 or 2) and a table as value. This table can contain the following entries:
    --->text: number (read via GetString(number), function returning a string, or string
    --->callback: function
    --->visible: function returning boolean, or boolean
    --->keybind: function returning a keybind, or keybind (if nil DIALOG_PRIMARY will be used for buttonIndex1 and DIALOG_NEGATIVE for buttonIndex2)
    --->noReleaseOnClick: boolean
    --->enabled: function returning boolean, or boolean
    --->clickSound: SOUNDS.SOUND_NAME
    --->requiresTextInput: boolean
}

--Valid text parameters (3rd parameter of function ZO_Dialogs_ShowDialog)
textParams = {
    ["titleParams"]             = { paramTypes = {"table"} },
    --table containing key = number 1 to n and value = string or function returning a string.
    --Used to change the placeholders <<1>>, <<2>> etc. in the dialog's title.text string
    ["mainTextParams"]          = { paramTypes = {"table"} },
    --table containing key = number 1 to n and value = string text or function returning string.
    --Used to change the placeholders <<1>>, <<2>> etc. in the dialog's mainText.text string
    --Example:
    -- If the main text in the dialog has 2 parameters (e.g "Hello <<1>> <<2>>"), then the 3rd parameter of ZO_Dialogs_ShowDialog should contain a subtable called
    -- "mainTextParams" which itself contains 2 members, the first will go into the <<1>> and the second will go into the <<2>>. The 3rd parameter
    -- in ZO_Dialogs_ShowDialog can also contain a titleParams subtable which is used to fill in the parameters in the title, if needed.
    --
    -- So as an example, let's say you had defined a dialog in InGameDialogs called "TEST_DIALOG" with
    --      title = { text = "Dialog <<1>>" } and mainText = { text = "Main <<1>> Text <<2>>" }
    -- And you called
    --      ZO_Dialogs_ShowDialog("TEST_DIALOG", {5}, {titleParams={"Test1"}, mainTextParams={"Test2", "Test3"}})
    -- The resulting dialog would have a title that read "Dialog Test1" and a main text field that read "Main Test2 Text Test3".
    -- The 5 passed in the second parameter could be used by the callback functions to perform various tasks based on this value.
    ["warningParams"]           = { paramTypes = {"table"} },
    --table with parameters: Like the mainTextparams table is acting for maintext, this table is acrting for the warning table.
    --{ number timer }
    --The table here needs as key the parameter which should be replaced in the warning.text field placeholder <<[table key]>>
    ["buttonTextOverrides"]     = { paramTypes = {"table"} },
    --needs to be a table with key = buttonIndex (1 or 2) and will then overwrite the text of the buttons
    ["initialEditText"]         = { paramTypes = {"string"} },
    --used for additionalOptions.editBox as initial edit box text shown
}

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.27
-Updated API
-Added "noChoiceCallback" function parameter to the RegisterDialog API function (e.g. if you press ESC key to close the dialog)


Version 1.26
Reverted back to same as version 1.2.4 due to title and maintext not working properly.
More tests needed before the 1.2.5 changes will be brought online again, sorry.

Version 1.25
Updated API
-Added support for additionalOptions and textParams tables to the register dialog function
-Added functions to add/remove an editBox to a dialog
-Added functions to add/remove a radioButtons to a dialog, including an "OnMouseUp" handler for each radiobutton
See the description for the API functions and the additionalOptions and textParams table descriptions.

Version 1.24
Updated API
Removed LibStub support! Please use the global variable LibDialog to call the library and strip LibStub from your addons as it is obsolete.

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 (9)
File Name
Version
Size
Uploader
Date
1.26
6kB
Baertram
06/10/20 11:41 AM
1.25
13kB
Baertram
06/10/20 04:02 AM
1.24
3kB
Baertram
05/24/20 06:20 PM
1.23
3kB
Baertram
05/31/19 06:55 AM
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 07/23/20, 03:10 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
Thanks as wlel for your update.

It could be really a lot of different things that cause this problem.
Maybe even LibDialog causes it indirectly somehow but I personally never experienced this, and as a lot of other players already reported their client crashes on logout even with addons disabled, or it does crash as they load a character etc. I'm noit quite sure it's related to addons at all.

I personally am not able to test this as there is no way to reproduce it reliably
Last edited by Baertram : 07/23/20 at 03:10 AM.
Report comment to moderator  
Reply With Quote
Unread 07/22/20, 10:29 PM  
AzraelDrakePhoenix

Forum posts: 0
File comments: 15
Uploads: 0
Hi Baertram,

Harven's Quest Journal is my largest SV file, at 120MB, but HQJ doesn't use LibDialog and the issue I'm talking about happens even with HQJ disabled. All others are pretty standard size, ranging from 1KB minimalist ones to 12MB, but 1MB or less is most common.

Also, I should note that the problem seems to be slightly intermittent, which strikes me as odd.

Addon Selector uses LibDialog, and given my large list of addons that I work with combined with several saved sets, I would expect that SV file to be fairly large, but it's only 140KB.

As for other dependent addons, the only ones I have that depend upon LibDialog are Addon Selector and Beam Me Up. However, when I disabled all addons except for libraries (including disabling Addon Selector and Beam Me Up), the problem persisted, but when I also disabled LibDialog, that's when the issue stopped, which is why I wanted to at least mention the issue to you here.

I renamed LibDebugLogger.lua to LibDebugLogger.lua.bak and reinstalled both LibDebugLogger and LibDialog even though I was already using the latest versions fo both. Hopefully that will help. At least it shouldn't hurt.

I've also noticed that it seems like, maybe, the problem is less frequent or possibly even resolved (at least for me personally) if I use Addon Selector to change addon sets at least once. By which I mean that for each character that I do this with, logging out from that character then seems to work as expected. So I'm wondering if it's an issue of the Addon Selector SV having become corrupted somehow (I haven't looked through the file itself to see if there are any unidentifiable characters where there should be names, or anything similar to that). So if renaming LibDebugLogger.lua and reinstalling the 2 libraries doesn't resolve the issue, at least I have a possibility (will just take a little time).

Anyway, thanks for getting back to me on this. Although I really just wanted to give you a heads-up, I appreciate the info and insight.


Originally Posted by Baertram
Nope it's not this lib but maybe any of your active addons that depend on this lib as they will automatically be switched off if you unload LibDialog!
So check your addons which use this libs.

Oh and btw: I heard the same problem from other addon devs in the past days, but related to no special addon. Maybe it's just a ZOs error or problem, or one of your addon creates SavedVariable files that are TOO big (too many lines/characters) to be handled by the game.
Check your SV folder for big files, and check if disabling the addons creating these files (the names should be similar/equal to the addon!) fixes this.

Maybe also backup/delete the file LibDebugLogger and update the library as it was a known probem of this lib a few months ago. But you should be using a newer versin meanwhile (I hope ).
Last edited by AzraelDrakePhoenix : 07/22/20 at 10:30 PM.
Report comment to moderator  
Reply With Quote
Unread 07/20/20, 05:57 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
Nope it's not this lib but maybe any of your active addons that depend on this lib as they will automatically be switched off if you unload LibDialog!
So check your addons which use this libs.

Oh and btw: I heard the same problem from other addon devs in the past days, but related to no special addon. Maybe it's just a ZOs error or problem, or one of your addon creates SavedVariable files that are TOO big (too many lines/characters) to be handled by the game.
Check your SV folder for big files, and check if disabling the addons creating these files (the names should be similar/equal to the addon!) fixes this.

Maybe also backup/delete the file LibDebugLogger and update the library as it was a known probem of this lib a few months ago. But you should be using a newer versin meanwhile (I hope ).

Originally Posted by AzraelDrakePhoenix
Hi Baertram,

I'm not convinced this is an issue with the library itself, but I have been having issues for the past 24 hours or so where the game will close to desktop instead of logging out to character select when choosing the log out option. I discovered just a few minutes ago that if I disable libdialog, this no longer happens. Since neither the game nor the library have been updated in the last 24 hours it seems odd, and I don't see how an addon or library could alter the log out behavior in such a way, but I thought you should at least be aware of it, just in case there is something odd going on with the library's code.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 07/20/20, 01:34 AM  
AzraelDrakePhoenix

Forum posts: 0
File comments: 15
Uploads: 0
Hi Baertram,

I'm not convinced this is an issue with the library itself, but I have been having issues for the past 24 hours or so where the game will close to desktop instead of logging out to character select when choosing the log out option. I discovered just a few minutes ago that if I disable libdialog, this no longer happens. Since neither the game nor the library have been updated in the last 24 hours it seems odd, and I don't see how an addon or library could alter the log out behavior in such a way, but I thought you should at least be aware of it, just in case there is something odd going on with the library's code.

Thanks.
Report comment to moderator  
Reply With Quote
Unread 05/27/20, 09:17 AM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
Originally Posted by Crunatus
Hi, Baertram! Have you known a similar library, but with a edit string dialog?
Nope, sorry.

Edit:
Found the editBox in dialog source here:
https://github.com/esoui/esoui/blob/...ialog.lua#L593

Seems one could add it to each dialog so we could add it to LibDialog :-)
Would look like this then
Lua Code:
  1. local additionalOptions = {
  2.         editBox = {
  3.             textType = TEXT_TYPE_ALL,
  4.             specialCharacters = {"a", "b", "c", "d"},
  5.             maxInputCharacters = 3,
  6.             defaultText = "a",
  7.         },
  8.     }
  9.     LibDialog:RegisterDialog("MyAddonTest", "MyAddonTest_Dialog1", "Title", "body", function() d("yes") end, d("yes"), nil, true, additionalOptions)
  10.         LibDialog:ShowDialog("MyAddonTest", "MyAddonTest_Dialog1", nil)

Going to test it a bit.
Last edited by Baertram : 05/27/20 at 09:37 AM.
Report comment to moderator  
Reply With Quote
Unread 05/27/20, 08:41 AM  
Crunatus
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 42
Uploads: 3
Hi, Baertram! Have you known a similar library, but with a edit string dialog?
Report comment to moderator  
Reply With Quote
Unread 04/25/20, 03:06 PM  
Baertram
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
LibDialog has remove LibStub support with the Greymoor API10031 update.
Please use the global variable "LibDialog" in your addons instead!

In your code change lines like this:
Code:
local ld = LibStub("LibDialog")
to this:
Lua Code:
  1. local ld = LibDialog

In your addon's txt manifest file:
Use the same ## OptionaDependsOn: LibDialog or ## DependsOn: LibDialog
You should remove any OptionalDependsOn or DependsOn: LibStub though if none of the libraries in your addon need it anymore.
Last edited by Baertram : 05/24/20 at 06:20 PM.
Report comment to moderator  
Reply With Quote
Unread 05/27/19, 04:07 AM  
Marazota
AddOn Author - Click to view AddOns

Forum posts: 257
File comments: 1517
Uploads: 2
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
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
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
AddOn Author - Click to view AddOns

Forum posts: 257
File comments: 1517
Uploads: 2
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
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
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
AddOn Author - Click to view AddOns

Forum posts: 257
File comments: 1517
Uploads: 2
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
Super Moderator
 
Baertram's Avatar
ESOUI Super Moderator
AddOn Author - Click to view AddOns

Forum posts: 4903
File comments: 5975
Uploads: 78
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: