Set gold laurel first in case of only one difficulty setting.
Also use dense formatting as per existing code.
(cherry picked from commit 1c78750176
)
This commit is contained in:
parent
c1d26698e9
commit
197bb5ee47
1 changed files with 7 additions and 12 deletions
|
@ -104,21 +104,16 @@ void campaign_difficulty::pre_show(window& window)
|
|||
if(preferences::is_campaign_completed(campaign_id_, d["define"])) {
|
||||
// Use different laurels according to the difficulty level, following the
|
||||
// pre-existing convention established in campaign_selection class.
|
||||
// Assumes ascending order of difficulty.
|
||||
if(difficulty_count == 0) {
|
||||
widget.set_label(game_config::images::victory_laurel_easy);
|
||||
}
|
||||
|
||||
else if(difficulty_count + 1 >= difficulty_max) {
|
||||
// Assumes ascending order of difficulty and gold laurel is set first
|
||||
// in case there is only one difficulty setting.
|
||||
if(difficulty_count + 1 >= difficulty_max) {
|
||||
widget.set_label(game_config::images::victory_laurel_hardest);
|
||||
}
|
||||
|
||||
else {
|
||||
} else if(difficulty_count == 0) {
|
||||
widget.set_label(game_config::images::victory_laurel_easy);
|
||||
} else {
|
||||
widget.set_label(game_config::images::victory_laurel);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
} else {
|
||||
widget.set_visible(widget::visibility::hidden);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue