Example #1
0
        /// <summary>
        /// Returns state of the specified button on the InputFrom
        /// </summary>
        /// <param name="form">Input form to check against</param>
        /// <param name="bttnID">ID of what button to check</param>
        /// <returns></returns>
        private static buttonState GetButtonState(InputForm form, GenericButtonID bttnID) {

            // Bitwise operation to see if it has the button (means it is/was pressed)
            if ((form.m_button & bttnID) != 0) { return buttonState.PRESSED; }

            return buttonState.RELEASED;
        }
Example #2
0
        /// <summary>
        /// Returns state of the specified button on the InputFrom
        /// </summary>
        /// <param name="form">Input form to check against</param>
        /// <param name="bttnID">ID of what button to check</param>
        /// <returns></returns>
        private static buttonState GetButtonState(InputForm form, GenericButtonID bttnID)
        {
            // Bitwise operation to see if it has the button (means it is/was pressed)
            if ((form.m_button & bttnID) != 0)
            {
                return(buttonState.PRESSED);
            }

            return(buttonState.RELEASED);
        }