Maintenance for the week of January 27:
• PC/Mac: NA and EU megaservers for patch maintenance – January 27, 4:00AM EST (9:00 UTC) - 8:00AM EST (13:00 UTC)
• ESO Website for maintenance – January 27, 1:00PM EST (18:00 UTC) - 4:00PM EST (21:00 UTC)

Message box with ok button

cyx54tc
cyx54tc
✭✭✭
Can someone make an example of how to make a messagebox with only one OK button? Had been struggling with the poorly written documentation....thx
  • Ayantir
    Ayantir
    ✭✭✭✭
    the best way to do it in teso is to do a dialog.


    Define it :
       local confirmDialog = {
          title = { text = "MyTitle" },
          mainText = { text = "MyText" },
          buttons = {
             { text = SI_DIALOG_ACCEPT, callback = functionToCall},
             { text = SI_DIALOG_CANCEL }
          }
       }
       ZO_Dialogs_RegisterCustomDialog("MYADDON_MYDIALOG", confirmDialog )
    

    Call it
    ZO_Dialogs_ShowDialog("MYADDON_MYDIALOG")
    
    Edited by Ayantir on November 14, 2015 11:37PM
    Obsessive Compulsive Elder Scrolls addons Coder
    A Few millions downloads of ESO addons now.
    Master crafter on my main char since release. All tradeskills, recipes \o/, researchs (since long), 35 styles known
    My little french Guild: Cercle de l'Eveil
  • cyx54tc
    cyx54tc
    ✭✭✭
    Ayantir wrote: »
    the best way to do it in teso is to do a dialog.


    Define it :
       local confirmDialog = {
          title = { text = "MyTitle" },
          mainText = { text = "MyText" },
          buttons = {
             { text = SI_DIALOG_ACCEPT, callback = functionToCall},
             { text = SI_DIALOG_CANCEL }
          }
       }
       ZO_Dialogs_RegisterCustomDialog("MYADDON_MYDIALOG", confirmDialog )
    

    Call it
    ZO_Dialogs_ShowDialog("MYADDON_MYDIALOG")
    

    OMG awesome... thanks a bunch. btw whats the function to call for closing the dialog
Sign In or Register to comment.