Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Commit

Permalink
pressing the advancements keybind ('L') when typing in the search box…
Browse files Browse the repository at this point in the history
… doesn't end the screen
  • Loading branch information
gbl committed Nov 5, 2020
1 parent 3d3ca56 commit e24a027
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ public boolean mouseScrolled(double X, double Y, double amount /*, CallbackInfoR
public void redirectKeysToSearch(int keyCode, int scanCode, int modifiers, CallbackInfoReturnable cir) {
if (search.isActive()) {
if (keyCode == GLFW.GLFW_KEY_ENTER) {
System.out.println("now");
AdvancementInfo.setMatchingFrom((AdvancementsScreen)(Object)this, search.getText());
cir.setReturnValue(true);
cir.cancel();
}
if (search.keyPressed(keyCode, scanCode, modifiers)) {
search.keyPressed(keyCode, scanCode, modifiers);
// Only let ESCAPE end the screen, we don't want the keybind ('L')
// to terminate the screen when we're typing text
if (keyCode != GLFW.GLFW_KEY_ESCAPE) {
cir.setReturnValue(true);
cir.cancel();
}
Expand Down

0 comments on commit e24a027

Please sign in to comment.