Skip to content

Commit

Permalink
Fix biglists losing focus (closes #1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
LordMonoxide committed Jan 30, 2025
1 parent f4d70ba commit 8acfc18
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.annotation.Nullable;
import java.io.IOException;
import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -136,6 +137,11 @@ private void onSelection(final Campaign campaign) {
}
}

@Override
public void setFocus(@Nullable final Control control) {
super.setFocus(this.campaignList);
}

@Override
protected void render() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import javax.annotation.Nullable;
import java.io.IOException;
import java.util.function.Consumer;

Expand Down Expand Up @@ -75,6 +76,11 @@ private void onMessageboxResult(final MessageBoxResult result, final SavedGame s
}
}

@Override
public void setFocus(@Nullable final Control control) {
super.setFocus(this.saveList);
}

@Override
protected void render() {
renderText("Load Game", 188, 10, UI_TEXT_CENTERED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ public SaveGameScreen(final Runnable unload) {
}
}

@Override
public void setFocus(@Nullable final Control control) {
super.setFocus(this.saveList);
}

@Override
protected void render() {
renderText("Save Game", 188, 10, UI_TEXT_CENTERED);
Expand Down

0 comments on commit 8acfc18

Please sign in to comment.