mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-30 15:46:11 +00:00
Fix wrong state handling.
This commit is contained in:
parent
74117329b8
commit
60c278b416
@ -104,13 +104,13 @@ void tristate_button::set_pressed(PRESSED_STATE new_pressed_state) {
|
|||||||
|
|
||||||
switch (new_pressed_state) {
|
switch (new_pressed_state) {
|
||||||
case LEFT:
|
case LEFT:
|
||||||
new_state = PRESSED_LEFT;
|
new_state = (state_ == PRESSED_ACTIVE_LEFT) ? PRESSED_ACTIVE_LEFT : PRESSED_LEFT;
|
||||||
break;
|
break;
|
||||||
case RIGHT:
|
case RIGHT:
|
||||||
new_state = PRESSED_RIGHT;
|
new_state = (state_ == PRESSED_ACTIVE_RIGHT) ? PRESSED_ACTIVE_RIGHT : PRESSED_RIGHT;
|
||||||
break;
|
break;
|
||||||
case BOTH:
|
case BOTH:
|
||||||
new_state = PRESSED_BOTH;
|
new_state = (state_ == PRESSED_ACTIVE_BOTH) ? PRESSED_ACTIVE_BOTH : PRESSED_BOTH;
|
||||||
break;
|
break;
|
||||||
case NONE:
|
case NONE:
|
||||||
new_state = NORMAL;
|
new_state = NORMAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user