Skip to content

Commit

Permalink
Make route overlay a little lower
Browse files Browse the repository at this point in the history
  • Loading branch information
Feodor0090 committed Jun 1, 2023
1 parent 667d185 commit 4136edb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/mahomaps/overlays/RouteOverlay.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import mahomaps.route.RouteTracker;
import mahomaps.screens.MapCanvas;
import mahomaps.ui.Button;
import mahomaps.ui.ColumnsContainer;
import mahomaps.ui.FillFlowContainer;
import mahomaps.ui.IButtonHandler;
import mahomaps.ui.SimpleText;
Expand All @@ -43,7 +44,6 @@ public class RouteOverlay extends MapOverlay implements Runnable, IButtonHandler
private Command discard = new Command("Да", Command.OK, 0);
private Command back = new Command("Назад", Command.BACK, 0);

private final Button showHideAnchors = new Button("Показать манёвры", 4, this);
private boolean anchorsShown = false;

public RouteOverlay(Geopoint a, Geopoint b, int method) {
Expand Down Expand Up @@ -95,9 +95,11 @@ public void run() {

public void LoadRoute() {
// route field must be non-null here!
ColumnsContainer cols = new ColumnsContainer(
new UIElement[] { new Button("Подробности", 3, this), new Button("Манёвры", 4, this) });
content = new FillFlowContainer(new UIElement[] { new SimpleText("Маршрут " + Type(method)),
new SimpleText(route.distance + ", " + route.time), new Button("Подробнее", 3, this), showHideAnchors,
new Button("Поехали!", 5, this), new Button("Закрыть", 0, this) });
new SimpleText(route.distance + ", " + route.time), new Button("Поехали!", 5, this), cols,
new Button("Закрыть", 0, this) });
MahoMapsApp.GetCanvas().line = new Line(a, route.points);
}

Expand Down Expand Up @@ -156,10 +158,8 @@ public void OnButtonTap(UIElement sender, int uid) {
case 4:
if (anchorsShown) {
ShowAB();
showHideAnchors.text = "Показать манёвры";
} else {
ShowAnchors();
showHideAnchors.text = "Скрыть манёвры";
}
anchorsShown = !anchorsShown;
break;
Expand Down

0 comments on commit 4136edb

Please sign in to comment.