Maintenance for the week of March 25:
• [COMPLETE] Xbox: NA and EU megaservers for patch maintenance – March 26, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)
• [COMPLETE] PlayStation®: NA and EU megaservers for patch maintenance – March 26, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)
• ESO Store and Account System for maintenance – March 28, 9:00AM EDT (13:00 UTC) - 12:00PM EDT (16: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.