Skip to content

Commit

Permalink
Merge pull request #89 from mahomaps/geo-status-toogle
Browse files Browse the repository at this point in the history
Geo status toogle
  • Loading branch information
Feodor0090 committed Jun 13, 2023
2 parents 78e9705 + 1270bbc commit 85f7c83
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/mahomaps/screens/KeyboardHelpScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ public KeyboardHelpScreen() {
super(MahoMapsApp.text[10]);
add(new StringItem(MahoMapsApp.text[76], "D-PAD"));
add(new StringItem(MahoMapsApp.text[77], "*, #"));
add(new StringItem(MahoMapsApp.text[78], "1"));
add(new StringItem("Toggle geo status", "3"));
add(new StringItem(MahoMapsApp.text[27], "7"));
add(new StringItem(MahoMapsApp.text[78], "9"));
// add(new StringItem("Bookmarks", "9"));
add(new StringItem(MahoMapsApp.text[79], MahoMapsApp.text[81]));
add(new StringItem(MahoMapsApp.text[80], MahoMapsApp.text[82]));
addCommand(MahoMapsApp.back);
setCommandListener(this);
}

private void add(StringItem item) {
item.setLayout(Item.LAYOUT_NEWLINE_AFTER | Item.LAYOUT_NEWLINE_BEFORE);
append(item);
Expand Down
21 changes: 14 additions & 7 deletions src/mahomaps/screens/MapCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,26 @@ protected void keyPressed(int k) {
break handling;
}
switch (k) {
case KEY_NUM3:
case KEY_POUND:
state = state.ZoomOut();
break handling;
case KEY_NUM1:
case KEY_STAR:
state = state.ZoomIn();
ShowGeo();
break handling;
case KEY_NUM3:
// geo status toggle
Settings.showGeo++;
if (Settings.showGeo > 2)
Settings.showGeo = 0;
break handling;
case KEY_NUM7:
BeginTextSearch();
break handling;
case KEY_NUM9:
ShowGeo();
// bookmarks
break handling;
case KEY_STAR:
state = state.ZoomIn();
break handling;
case KEY_POUND:
state = state.ZoomOut();
break handling;
}
} else {
Expand Down

0 comments on commit 85f7c83

Please sign in to comment.