Update highlight sections list when controls have been reloaded.

Co-authored-by: r3cp3ct <45179536+r3cp3ct@users.noreply.github.com>
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
sigonasr2, Sig, Sigo 2022-06-21 13:08:55 +00:00 committed by GitHub
parent d3bc17a26e
commit 4531e1653c
5 changed files with 3 additions and 2 deletions

0
Java/scripts/zip.sh Normal file → Executable file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -35,7 +35,7 @@ public class ConfigureControls extends Object{
Action selectedAction = Action.MOVE_RIGHT; Action selectedAction = Action.MOVE_RIGHT;
KeyBind selectedKeybind = null; KeyBind selectedKeybind = null;
boolean assigningKey = false; boolean assigningKey = false;
List<List<Integer>> actionHighlightSections = new ArrayList<>(); static List<List<Integer>> actionHighlightSections = new ArrayList<>();
int storedX=-1; int storedX=-1;
int storedY=-1; int storedY=-1;
int storedEndX=-1; int storedEndX=-1;
@ -99,6 +99,7 @@ public class ConfigureControls extends Object{
port = stream.readByte(); port = stream.readByte();
} while (port!='\0'); } while (port!='\0');
} }
updateHighlightSections();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
RabiClone.setupDefaultControls(); RabiClone.setupDefaultControls();
@ -151,7 +152,7 @@ public class ConfigureControls extends Object{
stream.writeChar('\0'); stream.writeChar('\0');
} }
private void updateHighlightSections() { private static void updateHighlightSections() {
for (int i=0;i<Action.values().length;i++) { for (int i=0;i<Action.values().length;i++) {
Action a = Action.values()[i]; Action a = Action.values()[i];
actionHighlightSections.add(new ArrayList<Integer>()); actionHighlightSections.add(new ArrayList<Integer>());