public override void HandleInput(MyGuiInput input, bool receivedFocusInThisUpdate) { base.HandleInput(input, receivedFocusInThisUpdate); if ((input.IsAnyKeyPress() == true) || (input.IsAnyMousePress() == true)) { CloseScreen(); } }
public override bool HandleInput(MyGuiInput input, bool hasKeyboardActiveControl, bool hasKeyboardActiveControlPrevious, bool receivedFocusInThisUpdate) { bool inputCaptured = base.HandleInput(input, hasKeyboardActiveControl, hasKeyboardActiveControlPrevious, receivedFocusInThisUpdate); if (Visible /*&& !inputCaptured && CheckMouseOver()*/) { foreach (MyGuiControlBase control in m_sortedControlsByPriority) { if (control.HandleInput(input, false, false, receivedFocusInThisUpdate)) { inputCaptured = true; break; } } //Always steal input if clicked on voxel hand control area return(IsMouseOver() && input.IsAnyMousePress()); } return(false); }
public override bool HandleInput(MyGuiInput input, bool hasKeyboardActiveControl, bool hasKeyboardActiveControlPrevious, bool receivedFocusInThisUpdate) { bool inputCaptured = base.HandleInput(input, hasKeyboardActiveControl, hasKeyboardActiveControlPrevious, receivedFocusInThisUpdate); if (Visible /*&& !inputCaptured && CheckMouseOver()*/) { foreach (MyGuiControlBase control in m_sortedControlsByPriority) { if (control.HandleInput(input, false, false, receivedFocusInThisUpdate)) { inputCaptured = true; break; } } //Always steal input if clicked on voxel hand control area return IsMouseOver() && input.IsAnyMousePress(); } return false; }