mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 03:15:21 +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
|
\code
|
||||||
void my_callback(Fl_Widget*, void*) {
|
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
|
return; // ignore Escape
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -136,7 +136,8 @@ done with:
|
|||||||
|
|
||||||
\code
|
\code
|
||||||
void my_callback(Fl_Widget*, void*) {
|
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);
|
exit(0);
|
||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|||||||
Reference in New Issue
Block a user