@@ -2,18 +2,16 @@ namespace TrafficManager.UI.SubTools {
2
2
using ColossalFramework ;
3
3
using CSUtil . Commons ;
4
4
using System . Collections . Generic ;
5
- using TrafficManager . API . Manager ;
6
5
using TrafficManager . Manager . Impl ;
7
6
using TrafficManager . State . ConfigData ;
8
7
using TrafficManager . State ;
9
- using TrafficManager . UI . Textures ;
10
8
using UnityEngine ;
11
9
using TrafficManager . State . Keybinds ;
12
10
using TrafficManager . UI . SubTools . PrioritySigns ;
13
- using TrafficManager . UI . MainMenu . OSD ;
14
11
using TrafficManager . Util ;
15
12
using static TrafficManager . Util . Shortcuts ;
16
13
using TrafficManager . UI . Helpers ;
14
+ using TrafficManager . UI . MainMenu . OSD ;
17
15
18
16
public class JunctionRestrictionsTool
19
17
: LegacySubTool ,
@@ -216,5 +214,33 @@ private void RefreshCurrentRestrictedNodeIds(ushort forceNodeId = 0) {
216
214
}
217
215
}
218
216
}
219
- }
217
+
218
+ private static string T ( string key ) => Translation . JunctionRestrictions . Get ( key ) ;
219
+
220
+ public void UpdateOnscreenDisplayPanel ( ) {
221
+ if ( SelectedNodeId == 0 ) {
222
+ // Select mode
223
+ var items = new List < OsdItem > ( ) ;
224
+ items . Add (
225
+ new UI . MainMenu . OSD . ModeDescription (
226
+ localizedText : T ( "JR.OnscreenHint.Mode:Select" ) ) ) ;
227
+ OnscreenDisplay . Display ( items ) ;
228
+ return ;
229
+ } else {
230
+ // Edit mode
231
+ var items = new List < OsdItem > ( ) ;
232
+ items . Add (
233
+ new UI . MainMenu . OSD . Shortcut (
234
+ keybindSetting : KeybindSettingsBase . LaneConnectorDelete ,
235
+ localizedText : T ( "JR.OnscreenHint.Reset:Reset to default" ) ) ) ;
236
+
237
+ items . Add ( OnscreenDisplay . RightClick_LeaveNode ( ) ) ;
238
+ OnscreenDisplay . Display ( items ) ;
239
+ return ;
240
+ }
241
+
242
+ // Default: no hint
243
+ // OnscreenDisplay.Clear();
244
+ }
245
+ } // end class
220
246
}
0 commit comments