Thread Tools Display Modes
Prev Previous Post   Next Post Next
10/19/23, 08:52 AM   #1
ExoY
 
ExoY's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2020
Posts: 89
Popup Dialog - Disable Button and Real Time Check

hello,

I am currently trying to find a way, to dynamically change some aspects of the zos dialog popups.

Specifically, I have a Dialog with a Textbox, and a List of already existing strings. What I would like to achieve is to check the current input of the textbox against the string table, and if it already exists disable the confirm button.

Here is how i currently define the Dialog, and then I just call it with `ZO_Dialogs_ShowDialog(*uniqueId*)`

Lua Code:
  1. ESO_Dialogs[uniqueId] = {
  2.         canQueue = true,
  3.         uniqueIdentifier = uniqueId,
  4.         title = {text = "Title"},
  5.         mainText = {text = "Content"},
  6.         editBox = {},
  7.         buttons = {
  8.             [1] = {
  9.                 text = SI_DIALOG_CONFIRM,
  10.                 callback = function(dialog)
  11.                     local input = ZO_Dialogs_GetEditBoxText(dialog)
  12.                     d(input)
  13.                 end,
  14.             },
  15.             [2] = {
  16.                 text = SI_DIALOG_CANCEL,
  17.                 callback = function()
  18.                        d("cancel")
  19.                 end,
  20.             },
  21.         },
  22. }

Does anybody already has experience with that sort of thing or knows of an existing addon that already does it?
  Reply With Quote
 

ESOUI » Developer Discussions » General Authoring Discussion » Popup Dialog - Disable Button and Real Time Check


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off