示例#1
0
        private void DrawMainScreen(Rectangle bounds, SpriteBatch sb)
        {
            string    points     = this.activeState.points.ToString();
            Rectangle rectangle1 = new Rectangle(bounds.X + 1, bounds.Y + 10, bounds.Width - 2, 100);

            this.DrawMonospaceString(rectangle1, sb, points);
            rectangle1.Y -= 4;
            sb.Draw(this.scanlinesTextBackground, rectangle1, this.ThemeColor * 0.2f);
            for (int index = 0; index < this.Stars.Count; ++index)
            {
                this.DrawStar(rectangle1, sb, this.Stars[index]);
            }
            Rectangle bounds1 = new Rectangle(bounds.X + 2, rectangle1.Y + rectangle1.Height + 12, bounds.Width / 2 - 4, bounds.Height - 12 - (rectangle1.Y + rectangle1.Height - bounds.Y));

            this.DrawUpgrades(bounds1, sb);
            float num1   = (float)this.logoRenderBase.Height / (float)this.logoRenderBase.Width;
            int   num2   = 45;
            int   width  = bounds.Width / 2 + num2;
            int   height = (int)((double)width * (double)num1);

            this.DrawHoverTooltip(new Rectangle(bounds.X + bounds1.Width + 4, bounds1.Y, bounds.Width - bounds1.Width - 8, bounds1.Height - height + 30), sb);
            Rectangle rectangle2 = new Rectangle(bounds.X + bounds.Width - width + 42, bounds.Y + bounds.Height - height + 10, width - 50, 50);
            string    text       = Utils.SuperSmartTwimForWidth(this.ActiveStory, rectangle2.Width, GuiData.smallfont);

            TextItem.doFontLabel(new Vector2((float)rectangle2.X, (float)rectangle2.Y), text, GuiData.smallfont, new Color?(this.ThemeColor), (float)rectangle2.Width, (float)rectangle2.Height, false);
            this.DrawLogo(new Rectangle(bounds.X + bounds.Width - width + 35, bounds.Y + bounds.Height - height + 20, width, height), sb);
            if (!Button.doButton(3032113, bounds.X + bounds.Width - 22, bounds.Y + bounds.Height - 22, 20, 20, "X", new Color?(this.os.lockedColor)))
            {
                return;
            }
            this.state = PointClickerDaemon.PointClickerScreenState.Welcome;
        }
示例#2
0
        private void DrawWelcome(Rectangle bounds, SpriteBatch sb)
        {
            float     num1 = (float)this.logoRenderBase.Height / (float)this.logoRenderBase.Width;
            int       num2 = 45;
            Rectangle dest = new Rectangle(bounds.X - num2 + 20, bounds.Y, bounds.Width + num2, (int)((double)(bounds.Width + 2 * num2) * (double)num1));

            this.DrawLogo(dest, sb);
            Rectangle rectangle = new Rectangle(bounds.X, dest.Y + dest.Height, bounds.Width, 60);

            sb.Draw(this.scanlinesTextBackground, rectangle, Utils.AddativeWhite * 0.2f);
            for (int index = 0; index < this.Stars.Count; ++index)
            {
                this.DrawStar(rectangle, sb, this.Stars[index]);
            }
            rectangle.X     += 100;
            rectangle.Width  = bounds.Width - 200;
            rectangle.Y     += 13;
            rectangle.Height = 35;
            if (Button.doButton(98373721, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height, "GO!", new Color?(Utils.AddativeWhite)))
            {
                this.activeState = (PointClickerDaemon.PointClickerGameState)null;
                string str = this.os.defaultUser.name.Replace(" ", "_");
                for (int index = 0; index < this.savesFolder.files.Count; ++index)
                {
                    if (this.savesFolder.files[index].name.StartsWith(str))
                    {
                        this.userFilePath = this.savesFolder.files[index].name;
                        this.activeState  = PointClickerDaemon.PointClickerGameState.LoadFromString(this.savesFolder.files[index].data);
                        break;
                    }
                }
                if (this.activeState == null)
                {
                    this.activeState = new PointClickerDaemon.PointClickerGameState(this.upgradeNames.Count);
                    FileEntry fileEntry = new FileEntry(this.activeState.ToSaveString(), str + ".pcsav");
                    this.savesFolder.files.Add(fileEntry);
                    this.userFilePath = fileEntry.name;
                }
                this.state       = PointClickerDaemon.PointClickerScreenState.Main;
                this.currentRate = 0.0f;
                this.ActiveStory = "";
                this.UpdateRate();
                this.UpdateStory();
                this.UpdatePoints();
            }
            if (!Button.doButton(98373732, bounds.X + 2, bounds.Y + bounds.Height - 19, 180, 18, LocaleTerms.Loc("Exit") + "  :<", new Color?(this.os.lockedColor)))
            {
                return;
            }
            this.os.display.command = "connect";
        }
示例#3
0
 public override void navigatedTo()
 {
     base.navigatedTo();
     this.state         = PointClickerDaemon.PointClickerScreenState.Welcome;
     this.pointOverflow = 0.0f;
 }