Automatically trigger the focus handler for the active field when toasting the dialog, and don't toast if the handler returns false
- But provide an option to skip this step, for the purpose of cancel buttons
This commit is contained in:
@@ -122,9 +122,9 @@ void flash_rect(RECT /*to_flash*/)
|
||||
sf::sleep(time_in_ticks(5));
|
||||
}
|
||||
|
||||
static bool get_num_event_filter(cDialog& me, std::string, eKeyMod)
|
||||
static bool get_num_event_filter(cDialog& me, std::string id, eKeyMod)
|
||||
{
|
||||
me.toast();
|
||||
me.toast(id == "okay");
|
||||
me.setResult<long long>(me["number"].getTextAsNum());
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user