Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Containers/Form.cs
/// <summary>
/// Override this message to handle button pressed events internally.
/// </summary>
/// <param name="buttonId">Integer ID corresponding to the affected button</param>
/// <param name="handled">true if the event is handled. Set to true if handled.</param>
/// <remarks>
/// Forwards the message to <see cref="Container.ActiveChild"/> or if null, to the child under <see cref="Core.MousePosition"/>
/// </remarks>
Override this message to handle button pressed events internally.
Override this message to handle button pressed events internally .
protected override void ButtonPressedMessage(int buttonId, ref bool handled)
      {
         if (Children != null)
         {
            if (ActiveChild != null)
            {
               ActiveChild.SendButtonEvent(buttonId, true);
            }
            else
            {
               for (var i = 0; i < Children.Length; i++)
               {
                  if (Children[i].ScreenBounds.Contains(Core.MousePosition))
                  {
                     handled = true;
                     Children[i].SendButtonEvent(buttonId, true);
                     break;
                  }
               }
            }
         }
         base.ButtonPressedMessage(buttonId, ref handled);
      }
protected override void ButtonPressedMessage ( int buttonId , ref bool handled ) { if ( Children != null ) { if ( ActiveChild != null ) { ActiveChild . SendButtonEvent ( buttonId , true ) ; } else { for ( var i = 0 ; i < Children . Length ; i ++ ) { if ( Children [ i ] . ScreenBounds . Contains ( Core . MousePosition ) ) { handled = true ; Children [ i ] . SendButtonEvent ( buttonId , true ) ; break ; } } } } base . ButtonPressedMessage ( buttonId , ref handled ) ; }
Override this message to handle button pressed events internally.
Override this message to handle button pressed events internally .
//TODO: check if this code shouldn't go to Container
buttonId
int
Integer ID corresponding to the affected button
Integer ID corresponding to the affected button
bool
ref
<not_specific>
handled
<not_specific>
true if the event is handled. Set to true if handled.
true if the event is handled . Set to true if handled .
remarks
Forwards the message to  or if null, to the child under
Forwards the message to or if null to the child under