mirror of
https://github.com/fltk/fltk.git
synced 2026-05-21 06:21:26 +08:00
Replace fl_ask() with fl_choice() in FAQ
fl_ask() is deprecated and should be replaced with fl_choice().
This commit is contained in:
@@ -125,7 +125,7 @@ because Escape will still close pop-up windows:
|
||||
|
||||
\code
|
||||
void my_callback(Fl_Widget*, void*) {
|
||||
if (Fl::event()==FL_SHORTCUT && Fl::event_key()==FL_Escape)
|
||||
if (Fl::event() == FL_SHORTCUT && Fl::event_key() == FL_Escape)
|
||||
return; // ignore Escape
|
||||
exit(0);
|
||||
}
|
||||
@@ -136,7 +136,8 @@ done with:
|
||||
|
||||
\code
|
||||
void my_callback(Fl_Widget*, void*) {
|
||||
if (fl_ask("Are you sure you want to quit?"))
|
||||
if (fl_choice("Are you sure you want to quit?",
|
||||
"continue", "quit", NULL))
|
||||
exit(0);
|
||||
}
|
||||
\endcode
|
||||
|
||||
Reference in New Issue
Block a user