allow advanced preference booleans and mp modifications double click toggle.
This commit is contained in:
parent
49c06cc943
commit
818ffad098
4 changed files with 21 additions and 4 deletions
|
@ -87,6 +87,8 @@ Version 1.11.7+dev:
|
|||
* Middle click scrolling is now based on distance from initial click instead
|
||||
of the centre of the screen.
|
||||
* Make sliders able to be scrolled with the mouse wheel
|
||||
* Allow advanced preference booleans and mp modifications to be toggled
|
||||
via double click
|
||||
* WML engine:
|
||||
* WML variable turn_number is set correctly (to 1) in prestart and start
|
||||
events. Previously, it retained its last value from the previous scenario
|
||||
|
|
|
@ -60,6 +60,8 @@ Version 1.11.7+dev:
|
|||
* Middle click scrolling is now based on distance from initial click instead
|
||||
of the centre of the screen.
|
||||
* Make sliders able to be scrolled with the mouse wheel
|
||||
* Allow advanced preference booleans and mp modifications to be toggled
|
||||
via double click
|
||||
|
||||
|
||||
Version 1.11.7:
|
||||
|
|
|
@ -1078,11 +1078,24 @@ void preferences_dialog::process_event()
|
|||
}
|
||||
|
||||
const config* const adv = get_advanced_pref();
|
||||
if(advanced_button_.pressed()) {
|
||||
const config& pref = *adv;
|
||||
const bool double_click_toggle_boolean = advanced_.double_clicked() &&
|
||||
pref["type"] == "boolean";
|
||||
|
||||
if(advanced_button_.pressed() || double_click_toggle_boolean) {
|
||||
bool advanced_button_check = advanced_button_.checked();
|
||||
if (double_click_toggle_boolean) {
|
||||
if (advanced_button_.checked()) {
|
||||
advanced_button_check = false;
|
||||
}
|
||||
else {
|
||||
advanced_button_check = true;
|
||||
}
|
||||
advanced_button_.set_check(advanced_button_check);
|
||||
}
|
||||
if(adv != NULL) {
|
||||
const config& pref = *adv;
|
||||
preferences::set(pref["field"],
|
||||
advanced_button_.checked());
|
||||
preferences::set(pref["field"], advanced_button_check);
|
||||
set_advanced_menu();
|
||||
|
||||
if(pref["field"] == "color_cursors") {
|
||||
|
|
|
@ -262,7 +262,7 @@ void create::process_event()
|
|||
}
|
||||
|
||||
bool update_mod_button_label = mod_selection_ != mods_menu_.selection();
|
||||
if (select_mod_.pressed()) {
|
||||
if (select_mod_.pressed() || mods_menu_.double_clicked()) {
|
||||
int index = mods_menu_.selection();
|
||||
engine_.set_current_mod_index(index);
|
||||
engine_.toggle_current_mod();
|
||||
|
|
Loading…
Add table
Reference in a new issue