Example #1
0
 private void ButtonCreator()
 {
     for (int i = 0; i < 4; i++)
     {
         for (int j = 0; j < 10; j++)
         {
             KeyboardButtons keyboardButton = new KeyboardButtons(_frameIndicator, buttonValue);
             buttonList.Add(keyboardButton);
             AddChild(keyboardButton);
             keyboardButton.SetXY(_buttonStartPointX + j * _buttonSize, _buttonStartPointY + i * _buttonSize);
             keyboardButton.SetFrame(_frameIndicator);
             _frameIndicator += 2;
             buttonValue++;
         }
     }
 }
Example #2
0
        private void drawInput()
        {
            Sprite background = new Sprite("keyboardbg.png");
            AddChild(background);

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 10; j++)
                {
                    KeyboardButtons keyboardButton = new KeyboardButtons(_frameIndicator, _buttonValue);
                    buttonList.Add(keyboardButton);
                    AddChild(keyboardButton);
                    keyboardButton.SetXY(_buttonStartPointX + j * BUTTONSIZE, _buttonStartPointY + i * BUTTONSIZE);
                    keyboardButton.SetFrame(_frameIndicator);
                    _frameIndicator += 2;
                    _buttonValue++;
                }
            }

            _mouse = new Mouse();
            AddChild(_mouse);
        }