Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Containers/VKB.cs
/// <summary>
/// Called when a touch down occurs and the control is active
/// </summary>
/// <param name="sender">Sending object</param>
/// <param name="point">Location of touch</param>
Called when a touch down occurs and the control is active
Called when a touch down occurs and the control is active
public void SendTouchDown(object sender, point point)
      {
         if (!_enabled || !_visible || _suspended)
            return;
         if (point.Y >= _vkY)
         {
            point.X -= _vkX;
            point.Y -= _vkY;
            for (int i = 0; i < _btns.Length; i++)
            {
               if (_btns[i].Rect.Contains(point))
               {
                  _iSel = i;
                  _iRender = i;
                  _btns[i].Down = true;
                  _btns[i].Pressed = true;
                  RenderButton(_iSel);
                  return;
               }
            }
         }
         if (_rTxt.Contains(point))
            _txtDown = true;
         _iSel = -1;
         _mDown = true;
         OnTouchDown(sender, point);
      }
public void SendTouchDown ( object sender , point point ) { if ( ! _enabled || ! _visible || _suspended ) return ; if ( point . Y >= _vkY ) { point . X -= _vkX ; point . Y -= _vkY ; for ( int i = 0 ; i < _btns . Length ; i ++ ) { if ( _btns [ i ] . Rect . Contains ( point ) ) { _iSel = i ; _iRender = i ; _btns [ i ] . Down = true ; _btns [ i ] . Pressed = true ; RenderButton ( _iSel ) ; return ; } } } if ( _rTxt . Contains ( point ) ) _txtDown = true ; _iSel = - 1 ; _mDown = true ; OnTouchDown ( sender , point ) ; }
Called when a touch down occurs and the control is active
Called when a touch down occurs and the control is active
// Exit if needed // Allow Override // Check buttons // Set down state // Raise Event
sender
object
None
point
point
Location of touch
Location of touch