Skip to content

Commit

Permalink
Added dark scheme tiles support
Browse files Browse the repository at this point in the history
1. Added dark scheme tiles support.
2. Added corresponding fields in settings.
3. Added ranslations for settings (!!! Review all langs, please !!!)
  • Loading branch information
Petrprogs committed Jul 21, 2023
1 parent efae746 commit bfdf876
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 11 deletions.
3 changes: 2 additions & 1 deletion res/ar.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@
الإحداثيات
ساعات العمل
الموقع الإلكتروني
الهاتف
الهاتف
مخطط ، موضوع مظلم
5 changes: 3 additions & 2 deletions res/en.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Debug info
Save tiles
File system
Download tiles
Scheme, bright pallete
Scheme, light theme
Control buttons size (restart needed)
Auto
Tiles & search language (restart needed)
Expand Down Expand Up @@ -164,4 +164,5 @@ Description
Coords
Opening hours
Website
Phone
Phone
Scheme, dark theme
3 changes: 2 additions & 1 deletion res/fr.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@ Description
Coordonnées
Mode de fonctionnement
Site Internet
Téléphone
Téléphone
Schéma, palette sombre
3 changes: 2 additions & 1 deletion res/ru.txt
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,5 @@ J2ME клиент растровых Яндекс.Карт.
Координаты
Режим работы
Сайт
Телефон
Телефон
Схема, темная палитра
2 changes: 1 addition & 1 deletion src/mahomaps/MahoMapsApp.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public static void LoadLocale(String name) {
text = splitFull(getStringFromJAR("/" + name + ".txt"), '\n');
if (text == null)
throw new RuntimeException("Lang is not loaded");
if (text.length != 167)
if (text.length != 168)
throw new RuntimeException("Lang is outdated");
for (int i = 0; i < text.length; i++) {
if (text[i].endsWith("\r")) {
Expand Down
6 changes: 3 additions & 3 deletions src/mahomaps/api/YmapsApiBase.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
package mahomaps.api;

import cc.nnproject.json.*;
import java.io.ByteArrayOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Enumeration;
import java.util.Hashtable;

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;

import cc.nnproject.json.*;
import mahomaps.MahoMapsApp;
import mahomaps.Settings;



public abstract class YmapsApiBase {

private final String tokenMark = "token\":\"";
Expand Down
4 changes: 3 additions & 1 deletion src/mahomaps/map/TilesProvider.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,10 @@ public class TilesProvider implements Runnable {
private Thread cacheTh;

public static final String[] tilesUrls = new String[] {
// scheme
// scheme light
"https://core-renderer-tiles.maps.yandex.net/tiles?l=map&lang=",
// scheme dark
"https://core-renderer-tiles.maps.yandex.net/tiles?l=map&theme=dark&lang=",
// sat
"https://core-sat.maps.yandex.net/tiles?l=sat&lang=",
// hybrid
Expand Down
2 changes: 1 addition & 1 deletion src/mahomaps/screens/SettingsScreen.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class SettingsScreen extends Form implements CommandListener {
private ChoiceGroup download = new ChoiceGroup(MahoMapsApp.text[54], Choice.MULTIPLE,
new String[] { MahoMapsApp.text[17] }, null);
private ChoiceGroup map = new ChoiceGroup(MahoMapsApp.text[153], Choice.EXCLUSIVE,
new String[] { MahoMapsApp.text[55], MahoMapsApp.text[154], MahoMapsApp.text[155] }, null);
new String[] { MahoMapsApp.text[55], MahoMapsApp.text[167], MahoMapsApp.text[154], MahoMapsApp.text[155] }, null);
private ChoiceGroup proxyUsage = new ChoiceGroup(MahoMapsApp.text[19], Choice.MULTIPLE,
new String[] { MahoMapsApp.text[156], MahoMapsApp.text[157], }, null);
private TextField proxyServer = new TextField(MahoMapsApp.text[158], "", 256, TextField.URL);
Expand Down

0 comments on commit bfdf876

Please sign in to comment.