コード例 #1
0
ファイル: TutorialMenu.cs プロジェクト: LatexBotox/SPACE
	public TutorialMenu (Rect area)
	{
		a = area;
		wm = new TutorialWeaponMenu(new Rect(a.width, 0, a.width, a.height));
		wm.SetDraw(false);

		float xOff = 0.0f;//0.15f * a.width;
		float yOff = 0.0f;//0.02f * a.height;
		float btnWidth = a.width - 2*xOff;
		float btnHeight = 0.05f * a.height; 

		Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);  

		weapBtn = new MenuButton(btnrec, "weapons", ButtonPressed);
		weapBtn.SetDraw(true);

		btnrec = new Rect(btnrec.x, btnrec.y + btnHeight + yOff, btnWidth, btnHeight);
		exitBtn = new MenuButton(btnrec, "exit", ButtonPressed);
		exitBtn.SetDraw(true);
	}
コード例 #2
0
ファイル: TutorialMenu.cs プロジェクト: lwsn/SPACE
    public TutorialMenu(Rect area)
    {
        a  = area;
        wm = new TutorialWeaponMenu(new Rect(a.width, 0, a.width, a.height));
        wm.SetDraw(false);

        float xOff      = 0.0f;   //0.15f * a.width;
        float yOff      = 0.0f;   //0.02f * a.height;
        float btnWidth  = a.width - 2 * xOff;
        float btnHeight = 0.05f * a.height;

        Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);

        weapBtn = new MenuButton(btnrec, "weapons", ButtonPressed);
        weapBtn.SetDraw(true);

        btnrec  = new Rect(btnrec.x, btnrec.y + btnHeight + yOff, btnWidth, btnHeight);
        exitBtn = new MenuButton(btnrec, "exit", ButtonPressed);
        exitBtn.SetDraw(true);
    }