Tinkr2/4.2/AphelionCore/AphelionCore/Controls/Control.cs
/// <summary>
/// Directly inform control of button events
/// </summary>
/// <param name="buttonId">Integer ID corresponding to the affected button</param>
/// <param name="pressed">True if the button is currently being pressed; false if released</param>
Directly inform control of button events
Directly inform control of button events
public void SendButtonEvent(int buttonId, bool pressed)
      {
         bool handled = false;
         if (pressed)
         {
            ButtonPressedMessage(buttonId, ref handled);
            if (handled)
            {
               return;
            }
            OnButtonPressed(this, buttonId);
            if (buttonId == (int) ButtonIDs.Click || buttonId == (int) ButtonIDs.Select)
            {
               SendTouchDown(this, Core.MousePosition);
            }
         }
         else
         {
            ButtonReleasedMessage(buttonId, ref handled);
            if (handled)
            {
               return;
            }
            if (buttonId == (int) ButtonIDs.Click || buttonId == (int) ButtonIDs.Select)
            {
               SendTouchUp(this, Core.MousePosition);
            }
            OnButtonReleased(this, buttonId);
         }
      }
public void SendButtonEvent ( int buttonId , bool pressed ) { bool handled = false ; if ( pressed ) { ButtonPressedMessage ( buttonId , ref handled ) ; if ( handled ) { return ; } OnButtonPressed ( this , buttonId ) ; if ( buttonId == ( int ) ButtonIDs . Click || buttonId == ( int ) ButtonIDs . Select ) { SendTouchDown ( this , Core . MousePosition ) ; } } else { ButtonReleasedMessage ( buttonId , ref handled ) ; if ( handled ) { return ; } if ( buttonId == ( int ) ButtonIDs . Click || buttonId == ( int ) ButtonIDs . Select ) { SendTouchUp ( this , Core . MousePosition ) ; } OnButtonReleased ( this , buttonId ) ; } }
Directly inform control of button events
Directly inform control of button events
buttonId
int
Integer ID corresponding to the affected button
Integer ID corresponding to the affected button
pressed
bool
True if the button is currently being pressed; false if released
True if the button is currently being pressed ; false if released