bool DrawSignInButton() { DrawSignInBar(); // draw the sign in button GUI.skin = SignInButtonGuiSkin; bool result = Gu.Button(Gu.Center(GameConsts.Menu.SignInButtonX), Gu.Bottom(GameConsts.Menu.SignInButtonY), Gu.Dim(GameConsts.Menu.SignInButtonWidth), Gu.Dim(GameConsts.Menu.SignInButtonHeight), Gu.Dim(GameConsts.Menu.SignInButtonFontSize), " " + Strings.SignIn); GUI.skin = GuiSkin; // draw the Google+ logo GUI.DrawTexture(new Rect(Gu.Center(GameConsts.Menu.GooglePlusLogoX), Gu.Bottom(GameConsts.Menu.GooglePlusLogoY), Gu.Dim(GameConsts.Menu.GooglePlusLogoSize), Gu.Dim(GameConsts.Menu.GooglePlusLogoSize)), GooglePlusTex); // draw sign in encouragement text DrawSignInBlurb(Strings.SignInBlurb); return(result); }
bool DrawSignOutButton() { return(Gu.Button(Gu.Right(GameConsts.Menu.SignOutButtonX), Gu.Bottom(GameConsts.Menu.SignOutButtonY), Gu.Dim(GameConsts.Menu.SignOutButtonWidth), Gu.Dim(GameConsts.Menu.SignOutButtonHeight), Gu.Dim(GameConsts.Menu.SignInButtonFontSize), Strings.SignOut)); }
bool DrawQuitButton() { Gu.SetColor(Color.white); return(Gu.Button(Gu.Center(GameConsts.PauseScreen.QuitX), Gu.Middle(GameConsts.PauseScreen.QuitY), Gu.Dim(GameConsts.PauseScreen.ButtonWidth), Gu.Dim(GameConsts.PauseScreen.ButtonHeight), Gu.Dim(GameConsts.PauseScreen.ButtonFontSize), Strings.QuitGame)); }
bool DrawUpButton() { return(Gu.Button( Gu.Left(GameConsts.Menu.UpButtonLeft), Gu.Top(GameConsts.Menu.UpButtonTop), Gu.Dim(GameConsts.Menu.UpButtonWidth), Gu.Dim(GameConsts.Menu.UpButtonHeight), Gu.Dim(GameConsts.Menu.UpButtonFontSize), "<<")); }
bool DrawQuitButton() { float w = GameConsts.Menu.AchButtonWidth; float h = GameConsts.Menu.AchButtonHeight; float x = -500; float y = 200; return(Gu.Button(Gu.Center(x), Gu.Middle(y), Gu.Dim(w), Gu.Dim(h), Gu.Dim(GameConsts.Menu.AchFontSize), Strings.QuitGame)); }
bool DrawLbButton() { float w = GameConsts.Menu.LbButtonWidth; float h = GameConsts.Menu.LbButtonHeight; float x = GameConsts.Menu.LbButtonX; float y = GameConsts.Menu.LbButtonY; return(Gu.Button(Gu.Center(x), (int)Util.Interpolate(0.0f, Screen.height, 1.0f, Gu.Middle(y), mTransition.NormalizedElapsed), Gu.Dim(w), Gu.Dim(h), Gu.Dim(GameConsts.Menu.LbFontSize), Strings.Leaderboards)); }
bool DrawPlayButton() { float w = GameConsts.Menu.PlayButtonWidth; float h = GameConsts.Menu.PlayButtonHeight; Gu.SetColor(Color.white); return(Gu.Button( Gu.Center(-w / 2), (int)Util.Interpolate(0.0f, Screen.height, 1.0f, Gu.Middle(-h / 2), mTransition.NormalizedElapsed), Gu.Dim(w), Gu.Dim(h), Gu.Dim(GameConsts.Menu.PlayButtonFontSize), Strings.Play)); }
bool DrawLevelButton(int levelNo, int col, int row) { LevelProgress lp = GameManager.Instance.Progress.GetLevelProgress(levelNo); if (lp == null) { return(false); } float centerX = StartX + Stride * col; float centerY = StartY + Stride * row; centerX = Util.Interpolate(0.0f, 0.0f, 1.0f, centerX, mTransition.NormalizedElapsed); float left = centerX - LevelSize * 0.5f; float top = centerY - LevelSize * 0.5f; if (GameManager.Instance.Progress.IsLevelUnlocked(levelNo)) { Gu.SetColor(Color.white); bool r = Gu.Button(Gu.Center(left), Gu.Middle(top), Gu.Dim(LevelSize), Gu.Dim(LevelSize), Gu.Dim(LevelFontSize), Util.GetLevelLetter(levelNo)); Gu.SetColor(Color.white); if (lp.Cleared) { Gu.Label(Gu.Center(centerX + ScoreOffsetX), Gu.Middle(centerY + ScoreOffsetY), Gu.Dim(ScoreFontSize), lp.Score.ToString("D5")); Gu.Label(Gu.Center(centerX + ScoreOffsetX), Gu.Middle(centerY - ScoreOffsetY), Gu.Dim(ScoreFontSize), Util.MakeStars(lp.Stars)); } return(r); } else { GUI.DrawTexture(new Rect(Gu.Center(left), Gu.Middle(top), Gu.Dim(LevelSize), Gu.Dim(LevelSize)), DisabledTex); return(false); } }