コード例 #1
0
 private void InitializeButton()
 {
     advanceButton = new GameButton("NextLevelButton",
                                    Rectangle.FromCenter(0.5f, 0.6f, 0.2f, 0.1f));
     advanceButton.RenderLayer = 11;
     advanceButton.Clicked    += HideAndStartNextLevel;
 }
コード例 #2
0
		private void InitializeButton()
		{
			advanceButton = new GameButton("NextLevelButton",
				Rectangle.FromCenter(0.5f, 0.6f, 0.2f, 0.1f));
			advanceButton.RenderLayer = 11;
			advanceButton.Clicked += HideAndStartNextLevel;
		}
コード例 #3
0
ファイル: StartupScreen.cs プロジェクト: whztt07/DeltaEngine
		private void CreateStartButton()
		{
			const float ButtonWidth = 268.0f / 1280.0f;
			const float ButtonHeight = 164.0f / 1280.0f;
			const float BottomRightGap = 0.025f;
			float xPos = DrawArea.Right - BottomRightGap - ButtonWidth;
			float yPos = DrawArea.Bottom - BottomRightGap - ButtonHeight;
			Rectangle startDrawArea = new Rectangle(xPos, yPos, ButtonWidth, ButtonHeight);
			StartButton = new GameButton("StartButton", startDrawArea);
			StartButton.Clicked += StartGame;
		}
コード例 #4
0
        private void CreateStartButton()
        {
            const float ButtonWidth    = 268.0f / 1280.0f;
            const float ButtonHeight   = 164.0f / 1280.0f;
            const float BottomRightGap = 0.025f;
            float       xPos           = DrawArea.Right - BottomRightGap - ButtonWidth;
            float       yPos           = DrawArea.Bottom - BottomRightGap - ButtonHeight;
            Rectangle   startDrawArea  = new Rectangle(xPos, yPos, ButtonWidth, ButtonHeight);

            StartButton          = new GameButton("StartButton", startDrawArea);
            StartButton.Clicked += StartGame;
        }