This shows you the differences between two versions of the page.
built_in:yesnodialog [2018/05/27 14:26] geez437 [Table] |
built_in:yesnodialog [2018/05/28 00:23] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== YesNoDialog ====== | ||
- | |||
- | ===== Methods ===== | ||
- | ^ Method | ||
- | | .GetType( ) | | | ||
- | | .Show( ) | Show YesNoDialog | ||
- | | .SetButtonText ( str1, str2 ) | Customize button text; default: str1 = " | ||
- | | .SetOnTouch( callback ) | Calls callback after hitting " | ||
- | | | | | ||
- | |||
- | <file javascript yesNoDialog.js> | ||
- | |||
- | // | ||
- | function OnStart() | ||
- | { | ||
- | trial = app.CreateYesNoDialog( " | ||
- | trial.SetOnTouch( tapped ); | ||
- | trial.Show(); | ||
- | |||
- | } | ||
- | |||
- | function tapped(button){ | ||
- | |||
- | alert(" | ||
- | |||
- | switch (button) | ||
- | { | ||
- | case " | ||
- | alert(" | ||
- | break; | ||
- | |||
- | case " | ||
- | alert(" | ||
- | break; | ||
- | |||
- | } | ||
- | |||
- | alert(" | ||
- | + trial.GetType()); | ||
- | |||
- | app.Exit(); | ||
- | } | ||
- | |||
- | </ | ||
- | |||
- | ===== Options ===== | ||
- | |||
- | ^ Option | ||
- | | ShowNow | ||