Login | Register 

window with multiple options?

General discussion about anything TouchDesigner

window with multiple options?

Postby finleywhite » Thu May 17, 2018 10:42 am

Not sure if it's there or if this is a somewhat urgent RFE, but I only found confirm as the only command that can open a window. Unfortunately it only allows the user to press ok (not even "cancel", or "don't confirm", so I'm not sure if there's doc missing or what this is for most of the times).....

in my scripts I do desperately need a multiple choice window to pop up and say things like "this will import all this data. Proceed? [yes] [cancel]" etc.

is there something out there already, if not, could you guys add it? It's very useful when designing any kind of UI to be able to query the user about choices.

Posts: 1
Joined: Thu May 17, 2018 10:40 am

Re: window with multiple options?

Postby Ennui » Thu May 17, 2018 10:52 am

Have you looked at the UI class?

An example of a messagebox from the wiki:

# basic usage
ui.messageBox('Warning', 'Have a nice day.')
# specify options and report result
a = ui.messageBox('Please select:', 'Buttons:', buttons=['a', 'b', 'c'])
ui.messageBox('Results', 'You selected item: ' + str(a))
Richard Burns
User avatar
Posts: 464
Joined: Sat Oct 03, 2009 2:23 pm

Re: window with multiple options?

Postby Ivan » Fri May 18, 2018 2:29 am

There's also popDialog in the UI section of the palette if you e want an editable one
Posts: 122
Joined: Fri Mar 18, 2016 7:12 pm

Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: Bing [Bot] and 5 guests