From a293cb46871242d708e130e40aa03a664e2d35dd Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 18 Sep 2024 07:05:34 -0400 Subject: [PATCH] Fixed campaign rules in portrait mode --- core/src/mindustry/ui/dialogs/CampaignRulesDialog.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/mindustry/ui/dialogs/CampaignRulesDialog.java b/core/src/mindustry/ui/dialogs/CampaignRulesDialog.java index 317d321287..64adb4df2c 100644 --- a/core/src/mindustry/ui/dialogs/CampaignRulesDialog.java +++ b/core/src/mindustry/ui/dialogs/CampaignRulesDialog.java @@ -29,6 +29,10 @@ public class CampaignRulesDialog extends BaseDialog{ } } }); + + onResize(() -> { + rebuild(); + }); } void rebuild(){ @@ -50,6 +54,10 @@ public class CampaignRulesDialog extends BaseDialog{ t.button(diff.localized(), style, () -> { rules.difficulty = diff; }).group(group).checked(b -> rules.difficulty == diff); + + if(Core.graphics.isPortrait() && diff.ordinal() % 2 == 1){ + t.row(); + } } }).left().fill(false).expand(false, false).row();