Пример #1
0
        void initializeButtons()
        {
            createButton = new SimpleButton(new Rectangle((int)(viewport.Width * .25f - buttonWidth / 2), (int)(viewport.Height * .75f - buttonHeight / 2), buttonWidth, buttonHeight));
            SimpleButton.AddButton(createButton);

            joinLanButton = new SimpleButton(new Rectangle((int)(viewport.Width * .5f - buttonWidth / 2), (int)(viewport.Height * .75f - buttonHeight / 2), buttonWidth, buttonHeight));
            SimpleButton.AddButton(joinLanButton);

            joinIPButton = new SimpleButton(new Rectangle((int)(viewport.Width * .5f - buttonWidth / 2), (int)(viewport.Height * .75f - buttonHeight / 2 + buttonHeight + 1), buttonWidth, buttonHeight));
            SimpleButton.AddButton(joinIPButton);

            exitButton = new SimpleButton(new Rectangle((int)(viewport.Width * .75f - buttonWidth / 2), (int)(viewport.Height * .75f - buttonHeight / 2), buttonWidth, buttonHeight));
            SimpleButton.AddButton(exitButton);
        }