Skip to content

Commit

Permalink
Edit last segment text
Browse files Browse the repository at this point in the history
  • Loading branch information
Feodor0090 committed Jun 7, 2023
1 parent c3804f5 commit fc3833f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mahomaps/route/RouteTracker.java
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ private void ProcessRegularSegment() {
float d = distTo(vertex[ev]);
if (d < 200) {
final String dist = "Через " + ((int) d) + "м";
final String info = getCurrentSegmentInfo(ns == null ? s : ns);
final String info = ns == null ? "Конец маршрута" : getCurrentSegmentInfo(ns);
final int icon = ns == null ? RouteSegment.ICON_FINISH : ns.GetIcon();
tos = new TrackerOverlayState(icon, getSegmentAngle(ns), dist, na, info);
} else {
Expand Down Expand Up @@ -352,6 +352,9 @@ private static String getCurrentSegmentInfo(RouteSegment rs) {
return rs.GetDescription();
}

/**
* @return Null if rs was null, segment action angle if it's auto, 0 if not.
*/
private static float getSegmentAngle(RouteSegment rs) {
if (rs == null)
return 0f;
Expand Down

0 comments on commit fc3833f

Please sign in to comment.