Skip to content

Commit a0b1717

Browse files
authored
Merge pull request #635 from kianzarrin/625-boost-lane-hover-hitpos
#625: revived the lane hovering code from Traffic ++ Lane Connector now highlights lanes with Lane Sheath overlay. Train markers use right color. embolden lane curves for selected lane. fixed drawing lane curves underground made performance optimization by caching mouse pointer and lane bounds. They are recalculated only if user moves the mouse ray. #543: I fixed the vertical mismatch by intersecting the mouse ray at the place where it hits the road.
2 parents c286caa + eebbb65 commit a0b1717

File tree

4 files changed

+307
-107
lines changed

4 files changed

+307
-107
lines changed

TLM/TLM/UI/SubTool.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
namespace TrafficManager.UI {
22
using ColossalFramework.UI;
33
using JetBrains.Annotations;
4-
using TrafficManager.UI.Textures;
54
using UnityEngine;
65

76
public abstract class SubTool {
@@ -78,6 +77,10 @@ private Texture2D BorderlessTexture {
7877

7978
private GUIStyle borderlessStyle_;
8079

80+
protected virtual Vector3 HitPos => TrafficManagerTool.HitPos;
81+
82+
protected virtual Vector3 MousePosition => MainTool.MousePosition;
83+
8184
protected virtual ushort HoveredNodeId {
8285
get => TrafficManagerTool.HoveredNodeId;
8386
set => TrafficManagerTool.HoveredNodeId = value;

TLM/TLM/UI/SubTools/LaneArrowTool.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,6 @@ protected override ushort HoveredNodeId {
187187
}
188188
return base.HoveredNodeId;
189189
}
190-
set => base.HoveredNodeId = value;
191190
}
192191

193192
/// <summary>

0 commit comments

Comments
 (0)