Skip to content

Commit

Permalink
Add setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Feodor0090 committed May 28, 2023
1 parent eee3f0a commit 5197e49
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/mahomaps/screens/SettingsScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ public class SettingsScreen extends Form implements CommandListener {
new String[] { "Отключено", "nnchan.ru", }, null);
private ChoiceGroup uiSize = new ChoiceGroup("Размер кнопок управления (нужен перезапуск)", Choice.POPUP,
new String[] { "Автоматически", "50x50", "30x30" }, null);
private ChoiceGroup lang = new ChoiceGroup("Язык тайлов и поиска (нужен перезапуск)", Choice.POPUP,
new String[] { "Русский", "Английский", "Турецкий" }, null);

public SettingsScreen() {
super("Настройки");
Expand Down Expand Up @@ -68,6 +70,7 @@ public SettingsScreen() {
// апи отслеживается отдельно, однако предполагается что оно включено вместе с
// тайлами.
uiSize.setSelectedIndex(Settings.uiSize, true);
lang.setSelectedIndex(Settings.lang, true);

append(focusZoom);
append(geoLook);
Expand All @@ -77,6 +80,7 @@ public SettingsScreen() {
append(download);
append(proxyTiles);
append(uiSize);
append(lang);
}

private void Apply() {
Expand All @@ -89,6 +93,7 @@ private void Apply() {
Settings.proxyTiles = proxyTiles.getSelectedIndex() == 1;
Settings.proxyApi = proxyTiles.getSelectedIndex() == 1;
Settings.uiSize = uiSize.getSelectedIndex();
Settings.lang = lang.getSelectedIndex();
if (Settings.allowDownload) {
MahoMapsApp.tiles.ForceMissingDownload();
}
Expand Down

0 comments on commit 5197e49

Please sign in to comment.