public void UpdateOnscreenDisplayPanel()
        {
            var items = new List <OsdItem>();

            items.Add(new ModeDescription(localizedText: T("ToggleTL.Mode:Click to toggle")));
            OnscreenDisplay.Display(items);
        }
        public void UpdateOnscreenDisplayPanel()
        {
            if (SelectedNodeId == 0)
            {
                // Select mode
                var items = new List <OsdItem>();
                items.Add(new UI.MainMenu.OSD.ModeDescription(T("JR.OnscreenHint.Mode:Select")));
                OnscreenDisplay.Display(items);
            }
            else
            {
                // Edit mode
                var items = new List <OsdItem>();
                items.Add(new UI.MainMenu.OSD.ModeDescription(T("JR.OnscreenHint.Mode:Edit")));
                items.Add(
                    new UI.MainMenu.OSD.Shortcut(
                        keybindSetting: KeybindSettingsBase.RestoreDefaultsKey,
                        localizedText: T("JR.OnscreenHint.Reset:Reset to default")));

                items.Add(OnscreenDisplay.RightClick_LeaveNode());
                OnscreenDisplay.Display(items);
            }

            // Default: no hint
            // OnscreenDisplay.Clear();
        }
Beispiel #3
0
        public void UpdateOnscreenDisplayPanel()
        {
            var items = new List <OsdItem>();

            items.Add(new ModeDescription(localizedText: T("Parking.OnscreenHint.Mode:Click to toggle")));
            items.Add(
                new HardcodedMouseShortcut(
                    button: UIMouseButton.Left,
                    shift: true,
                    ctrl: false,
                    alt: false,
                    localizedText: T("Parking.ShiftClick:Apply to entire road")));
            OnscreenDisplay.Display(items);
        }
Beispiel #4
0
        /// <summary>
        /// Called from the <see cref="TrafficManagerTool"/> when update for the Keybinds panel
        /// in MainMenu is requested. Or when we need to change state.
        /// Never call this directly, only as: MainTool.RequestOnscreenDisplayUpdate();
        /// </summary>
        void IOnscreenDisplayProvider.UpdateOnscreenDisplayPanel()
        {
            if (fsm_ == null)
            {
                OnscreenDisplay.Clear();
                return;
            }

            switch (fsm_.State)
            {
            case State.Select: {
                var items = new List <OsdItem>();
                items.Add(
                    new MainMenu.OSD.ModeDescription(
                        localizedText: T("LaneArrows.Mode:Select")));
                items.Add(
                    new MainMenu.OSD.HardcodedMouseShortcut(
                        button: UIMouseButton.Left,
                        shift: false,
                        ctrl: true,
                        alt: false,
                        localizedText: T("LaneArrows.Click:Separate lanes for entire junction")));
                items.Add(
                    new MainMenu.OSD.HardcodedMouseShortcut(
                        button: UIMouseButton.Left,
                        shift: false,
                        ctrl: false,
                        alt: true,
                        localizedText: T("LaneArrows.Click:Separate lanes for segment")));
                OnscreenDisplay.Display(items: items);
                return;
            }

            case State.EditLaneArrows: {
                var items = new List <OsdItem>();
                items.Add(
                    item: new MainMenu.OSD.Shortcut(
                        keybindSetting: KeybindSettingsBase.RestoreDefaultsKey,
                        localizedText: T(key: "LaneConnector.Label:Reset to default")));
                items.Add(item: OnscreenDisplay.RightClick_LeaveSegment());
                OnscreenDisplay.Display(items: items);
                return;
            }

            default: {
                OnscreenDisplay.Clear();
                return;
            }
            }
        }
 public void UpdateOnscreenDisplayPanel()
 {
     if (SelectedNodeId == 0)
     {
         // Select mode
         var items = new List <OsdItem>();
         items.Add(new ModeDescription(localizedText: T("ManualTL.Mode:Select")));
         OnscreenDisplay.Display(items);
     }
     else
     {
         // Modify traffic light settings
         var items = new List <OsdItem>();
         items.Add(new ModeDescription(localizedText: T("ManualTL.Mode:Edit")));
         items.Add(OnscreenDisplay.RightClick_LeaveNode());
         OnscreenDisplay.Display(items);
     }
 }
Beispiel #6
0
 public void UpdateOnscreenDisplayPanel()
 {
     if (SelectedSegmentId == 0)
     {
         // Select mode
         var items = new List <OsdItem>();
         items.Add(new ModeDescription(localizedText: T("VR.OnscreenHint.Mode:Select segment")));
         OnscreenDisplay.Display(items);
     }
     else
     {
         // Modify traffic light settings
         var items = new List <OsdItem>();
         items.Add(new ModeDescription(localizedText: T("VR.OnscreenHint.Mode:Toggle restrictions")));
         items.Add(
             item: new Shortcut(
                 keybindSetting: KeybindSettingsBase.RestoreDefaultsKey,
                 localizedText: T("VR.Label:Revert to default")));
         items.Add(OnscreenDisplay.RightClick_LeaveSegment());
         OnscreenDisplay.Display(items);
     }
 }
Beispiel #7
0
 /// <summary>Called from GenericFsm when user leaves lane arrow editor, to hide the GUI.</summary>
 private void OnLeaveEditorState()
 {
     OnscreenDisplay.Clear();
     DestroyToolWindow();
 }
Beispiel #8
0
 private void OnLeaveSelectState()
 {
     OnscreenDisplay.Clear();
 }