public void ApplyHotkeys() { if (!_session.IsChatFocused) { if (Commands.Unload) { _selectionManager.DispatchUnloadCommand(); } else if (Commands.Load) { _selectionManager.DispatchLoadCommand(); } else if (Commands.FirePos && !_selectionManager.Empty) { EnterFirePosMode(); } else if (Commands.ReverseMove && !_selectionManager.Empty) { EnterReverseMoveMode(); } else if (Commands.FastMove && !_selectionManager.Empty) { EnterFastMoveMode(); } else if (Commands.Split && !_selectionManager.Empty) { EnterSplitMode(); } else if (Commands.VisionRuler && !_selectionManager.Empty) { EnterVisionRulerMode(); } } }
public void ApplyHotkeys() { if (!_session.IsChatFocused) { if (_commands.Unload) { _selectionManager.DispatchUnloadCommand(); } else if (_commands.Load) { _selectionManager.DispatchLoadCommand(); } else if (_commands.ToggleMenu) { EnterMenuMode(); } else if (_commands.FirePos && !_selectionManager.Empty) { EnterFirePosMode(); } else if (_commands.AttackMove && !_selectionManager.Empty) { Debug.LogWarning("Attack move is not implemented."); } else if (_commands.ReverseMove && !_selectionManager.Empty) { EnterReverseMoveMode(); } else if (_commands.FastMove && !_selectionManager.Empty) { EnterFastMoveMode(); } else if (_commands.Split && !_selectionManager.Empty) { EnterSplitMode(); } else if (_commands.VisionTool && !_selectionManager.Empty) { EnterVisionRulerMode(); } else if (_commands.Stop) { _selectionManager.DispatchStopCommand(); } else if (_commands.WeaponsOff && !_selectionManager.Empty) { _selectionManager.DispatchToggleWeaponsCommand(); } else if (_commands.Smoke && !_selectionManager.Empty) { Logger.LogWithoutSubsystem(LogLevel.BUG, "Smoke not implemented"); } } }
public void ApplyHotkeys() { if (!_session.IsChatFocused) { if (_commands.Unload) { _selectionManager.DispatchUnloadCommand(); } else if (_commands.Load) { _selectionManager.DispatchLoadCommand(); } else if (_commands.ToggleMenu) { EnterMenuMode(); } else if (_commands.FirePos && !_selectionManager.Empty) { EnterFirePosMode(); } else if (_commands.AttackMove && !_selectionManager.Empty) { Debug.LogWarning("Attack move is not implemented."); } else if (_commands.ReverseMove && !_selectionManager.Empty) { EnterReverseMoveMode(); } else if (_commands.FastMove && !_selectionManager.Empty) { EnterFastMoveMode(); } else if (_commands.Split && !_selectionManager.Empty) { EnterSplitMode(); } else if (_commands.VisionTool && !_selectionManager.Empty) { EnterVisionRulerMode(); } } }
public void ApplyHotkeys() { if (IsChatOpen) { if (Input.GetButtonDown("Chat")) //< TODO convert this to command-style { _chatManager.OnToggleChat(); } } else { if (_commands.Unload) { _selectionManager.DispatchUnloadCommand(); } else if (_commands.Load) { _selectionManager.DispatchLoadCommand(); } else if (_commands.ToggleMenu) { EnterMenuMode(); } else if (_commands.FirePos && !_selectionManager.Empty) { EnterFirePosMode(); } else if (_commands.AttackMove && !_selectionManager.Empty) { Debug.LogWarning("Attack move is not implemented."); } else if (_commands.ReverseMove && !_selectionManager.Empty) { EnterReverseMoveMode(); } else if (_commands.FastMove && !_selectionManager.Empty) { EnterFastMoveMode(); } else if (_commands.Split && !_selectionManager.Empty) { EnterSplitMode(); } else if (_commands.VisionTool && !_selectionManager.Empty) { EnterVisionRulerMode(); } else if (_commands.Stop) { _selectionManager.DispatchStopCommand(); } else if (_commands.WeaponsOff && !_selectionManager.Empty) { _selectionManager.DispatchToggleWeaponsCommand(); } else if (_commands.Smoke && !_selectionManager.Empty) { Logger.LogWithoutSubsystem(LogLevel.BUG, "Smoke not implemented"); } else if (_commands.ShowUnitInfo) { PlatoonBehaviour platoon = _selectionManager.FindPlatoonAtCursor(); if (platoon) { _unitInfoPanel.ShowUnitInfo(platoon.Unit, platoon.Units[0].AllWeapons); } else { _unitInfoPanel.HideUnitInfo(); } } else if (_commands.PlaceAttackFlare) { EnterFlareMode("Attack!"); } else if (_commands.PlaceStopFlare) { EnterFlareMode("Stop!"); } else if (_commands.PlaceCustomFlare) { // TODO the behavior here should be - use whatever the user types // before clicking to place the flare as the message EnterFlareMode("Help!"); } else if (Input.GetButtonDown("Chat")) //< TODO convert this to command-style { _chatManager.OnToggleChat(); } } }