System Dialog Boxes

What is a good way to get a native system dialog box that is not just one string and an OK button, but where you can specify the Subject text, the Body text, and the text of multiple button responses, and find out which one was selected?

All I have found is:

ofSystemAlertDialog(string errorMessage) - Great, but needs a version with the other abilities.
ofSystemTextBoxDialog() - Great, seems to prove we there could be what I want, but there just isn’t?
ofSystemLoadDialog and ofSystemSaveDialog - similar comment

And some addons that are mostly several years old and seem to be mostly designed to get away from some more cumbersome process - that might work but I don’t know which still work or are recommendable or not.

I see a couple of questions about this from 2009 and 2013 which don’t seem to have got any answers.

Coding my own imitation out of 2D OF graphics seems easiest to me at the moment, but of course has the disadvantages of not really being a native dialog.

Would anyone please offer any guidance or pointers to functions, docs, examples, recommended addons, anything? (I am mostly looking to do this on Android and iOS.)

Thanks!

The system guis are created by code and it is done internaly by OF for each platform.
At least for Android you can take a look here and add whatever you need to that dialog box.
For iOS I am not sure where that is, just made a fast search and couldnt find anything. If you call ofSystemTextBoxDialog() when using iOS do you get anything?

cheers

1 Like

No, nothing happens on iOS for any of those four ofSystem…Dialog functions.

You’re right, there’s no code for iOS in them.

The ofxAndroid code does look like it might be reasonable modifiable to get what I want, for Android.

Looking at the ofxiOS… code though, there doesn’t seem to be anything for dialogs, and I’m not familiar enough with iOS native code to see anything that’d be a starting point for me in there.

However people do seem to have written OF add ons that I think do this. For example, https://github.com/trentbrooks/ofxiOSBridgeUtils

The alert dialog code there actually makes it look to me like it might be straightforward.

please let us know if it works.
cheers

I will! Thanks for the feedback. :slight_smile: