private void ContextSensitiveClick_Process (bool doubleTap, Hotspot newHotspot) { if (hotspot != null && newHotspot == null) { DisableHotspot (false); } else if (newHotspot != null) { if (playerInput.mouseState == MouseState.HeldDown && playerInput.dragState == DragState.Player) { // Disable hotspots while dragging player DisableHotspot (false); } else if (newHotspot != hotspot) { DisableHotspot (false); hotspot = newHotspot; hotspot.Select (); if (settingsManager.SelectInteractionMethod () == SelectInteractions.CyclingCursorAndClickingHotspot) { runtimeInventory.MatchInteractions (); if (settingsManager.autoCycleWhenInteract) { RestoreHotspotInteraction (); } else { ResetInteractionIndex (); } } } else if (hotspot != null && doubleTap) { // Still work if not clicking on the active Hotspot HandleInteraction (); } } }
private void ChooseHotspotThenInteractionClick_Process (bool doubleTap) { Hotspot newHotspot = CheckForHotspots (); if (hotspot != null && newHotspot == null) { DisableHotspot (false); } else if (newHotspot != null) { if (newHotspot.IsSingleInteraction ()) { ContextSensitiveClick (); return; } if (playerInput.mouseState == MouseState.HeldDown && playerInput.dragState == DragState.Player) { // Disable hotspots while dragging player DisableHotspot (false); } else { bool clickedNew = false; if (newHotspot != hotspot) { clickedNew = true; if (hotspot) { hotspot.Deselect (); playerMenus.DisableHotspotMenus (); } hotspot = newHotspot; hotspot.Select (); playerMenus.SetInteractionMenus (false); } if (hotspot) { if (playerInput.mouseState == MouseState.SingleClick || (settingsManager.inventoryDragDrop && IsDroppingInventory ()) || (settingsManager.MouseOverForInteractionMenu () && runtimeInventory.hoverItem == null && clickedNew && !IsDroppingInventory ())) { if (runtimeInventory.selectedItem != null && settingsManager.inventoryInteractions == InventoryInteractions.Single) { if (!settingsManager.inventoryDragDrop && clickedNew && doubleTap) { return; } else { HandleInteraction (); } } else if (playerMenus) { if (playerInput.interactionMenuIsOn && settingsManager.SelectInteractionMethod () == SelectInteractions.CyclingMenuAndClickingHotspot) { ClickHotspotToInteract (); return; } if (clickedNew && doubleTap) { return; } if (KickStarter.player) { KickStarter.player.Halt (); } playerInput.hotspotMovingTo = null; StopInteraction (); runtimeInventory.SetNull (); playerMenus.SetInteractionMenus (true); } } else if (playerInput.mouseState == MouseState.RightClick) { hotspot.Deselect (); } } } } }