{ \
toggle_button*
sound = find_widget<toggle_button>(prefs_list::pref_item_sound,
false,
true); \
sound->set_value(
prefs::get().pref_item_sound()); \
connect_signal_mouse_left_click(*
sound, std::bind([
sound]() {
prefs::get().set_##pref_item_sound(
sound->get_value_bool()); })); \
\
toggle_button* notif = find_widget<toggle_button>(prefs_list::pref_item_notif, false, true); \
\
notif->set_value(false); \
notif->set_active(
false);
\
} else { \
notif->set_active(true); \
notif->set_value(
prefs::get().pref_item_notif()); \
connect_signal_mouse_left_click(*notif, std::bind([notif]() {
prefs::get().set_##pref_item_notif(notif->get_value_bool()); }));\
} \
\
toggle_button* lobby = find_widget<toggle_button>(prefs_list::pref_item_lobby, false, true); \
lobby->set_value(
prefs::get().pref_item_lobby()); \
connect_signal_mouse_left_click(*lobby, std::bind([lobby]() {
prefs::get().set_##pref_item_lobby(lobby->get_value_bool()); })); \
}
bool available()
Returns whether we were compiled with support for desktop notifications.
Audio output for sound and music.
Sets up the toggle buttons for a set of three MP lobby alerts.