private void UpdateLastKeyPressTimes(MyContextMenuKeys key) { MyContextMenuKeyTimerController keyEx = m_keys[(int)key]; if (keyEx != null) { keyEx.LastKeyPressTime = MyGuiManager.TotalTimeInMilliseconds; } }
private bool IsEnoughDelay(MyContextMenuKeys key, int forcedDelay) { MyContextMenuKeyTimerController keyEx = m_keys[(int)key]; if (keyEx == null) { return(true); } return((MyGuiManager.TotalTimeInMilliseconds - keyEx.LastKeyPressTime) > forcedDelay); }
private bool IsEnoughDelay(MyContextMenuKeys key, int forcedDelay) { MyContextMenuKeyTimerController keyEx = m_keys[(int)key]; if (keyEx == null) return true; return ((MyGuiManager.TotalTimeInMilliseconds - keyEx.LastKeyPressTime) > forcedDelay); }