Maintenance for the week of December 23:
• NA megaservers for maintenance – December 23, 4:00AM EST (9:00 UTC) - 9:00AM EST (14:00 UTC)
• EU megaservers for maintenance – December 23, 9:00 UTC (4:00AM EST) - 14:00 UTC (9:00AM EST)

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.