Exemplo n.º 1
0
        public static string GetTime()
        {
            var time = DateTime.Now;

            if (ShiftoriumFrontend.UpgradeInstalled("full_precision_time"))
            {
                return(DateTime.Now.ToString("h:mm:ss tt"));
            }
            else if (ShiftoriumFrontend.UpgradeInstalled("clock_am_and_pm"))
            {
                return(time.TimeOfDay.TotalHours > 12 ? $"{time.Hour - 12} PM" : $"{time.Hour} AM");
            }
            else if (ShiftoriumFrontend.UpgradeInstalled("clock_hours"))
            {
                return(((int)time.TimeOfDay.TotalHours).ToString());
            }
            else if (ShiftoriumFrontend.UpgradeInstalled("clock_minutes"))
            {
                return(((int)time.TimeOfDay.TotalMinutes).ToString());
            }
            else if (ShiftoriumFrontend.UpgradeInstalled("clock"))
            {
                return(((int)time.TimeOfDay.TotalSeconds).ToString());
            }

            return("");
        }
Exemplo n.º 2
0
        public void SetupDesktop()
        {
            menuStrip1.Renderer = new ShiftOSMenuRenderer();

            this.DoubleBuffered    = true;
            desktoppanel.BackColor = Color.Green;

            //upgrades

            if (SaveSystem.CurrentSave != null)
            {
                desktoppanel.Visible = ShiftoriumFrontend.UpgradeInstalled("desktop");
                lbtime.Visible       = ShiftoriumFrontend.UpgradeInstalled("desktop_clock_widget");

                //skinning
                lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor;

                sysmenuholder.Visible = ShiftoriumFrontend.UpgradeInstalled("app_launcher");

                //The Color Picker can give us transparent colors - which Windows Forms f*****g despises when dealing with form backgrounds.
                //To compensate, we must recreate the desktop color and make the alpha channel '255'.
                pnldesktop.BackColor = Color.FromArgb(LoadedSkin.DesktopColor.R, LoadedSkin.DesktopColor.G, LoadedSkin.DesktopColor.B);
                //Not doing this will cause an ArgumentException.

                pnldesktop.BackgroundImage       = GetImage("desktopbackground");
                pnldesktop.BackgroundImageLayout = GetImageLayout("desktopbackground");
                desktoppanel.BackgroundImage     = GetImage("desktoppanel");
                menuStrip1.BackgroundImage       = GetImage("applauncher");
                lbtime.ForeColor = LoadedSkin.DesktopPanelClockColor;
                lbtime.Font      = LoadedSkin.DesktopPanelClockFont;
                lbtime.Text      = Applications.Terminal.GetTime();
                lbtime.Left      = desktoppanel.Width - lbtime.Width - LoadedSkin.DesktopPanelClockFromRight.X;
                lbtime.Top       = LoadedSkin.DesktopPanelClockFromRight.Y;

                if (desktoppanel.BackgroundImage == null)
                {
                    lbtime.BackColor = LoadedSkin.DesktopPanelClockBackgroundColor;
                }
                else
                {
                    lbtime.BackColor = Color.Transparent;
                }
                apps.Text = LoadedSkin.AppLauncherText;
                sysmenuholder.Location = LoadedSkin.AppLauncherFromLeft;
                sysmenuholder.Size     = LoadedSkin.AppLauncherHolderSize;
                apps.Size                          = sysmenuholder.Size;
                menuStrip1.Renderer                = new ShiftOSMenuRenderer(new AppLauncherColorTable());
                desktoppanel.BackColor             = LoadedSkin.DesktopPanelColor;
                desktoppanel.BackgroundImageLayout = GetImageLayout("desktoppanel");
                desktoppanel.Height                = LoadedSkin.DesktopPanelHeight;
                if (LoadedSkin.DesktopPanelPosition == 1)
                {
                    desktoppanel.Dock = DockStyle.Bottom;
                }
                else
                {
                    desktoppanel.Dock = DockStyle.Top;
                }
            }
        }
Exemplo n.º 3
0
        public bool OnUnload()
        {
            if (SaveSystem.ShuttingDown == false)
            {
                if (!ShiftoriumFrontend.UpgradeInstalled("desktop"))
                {
                    if (AppearanceManager.OpenForms.Count <= 1)
                    {
                        //Console.WriteLine("");
                        Console.WriteLine("{WIN_CANTCLOSETERMINAL}");
                        try
                        {
                            Console.WriteLine("");

                            if (TerminalBackend.PrefixEnabled)
                            {
                                Console.Write($"{SaveSystem.CurrentUser.Username}@shiftos:~$ ");
                            }
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine(ex);
                        }
                        return(false);
                    }
                }
            }
            return(true);
        }
Exemplo n.º 4
0
 private void prepareButtons()
 {
     buttonEquals.Visible   = ShiftoriumFrontend.UpgradeInstalled("calc_equals_button");
     buttonPlus.Visible     = ShiftoriumFrontend.UpgradeInstalled("calc_plus_button");
     buttonMinus.Visible    = ShiftoriumFrontend.UpgradeInstalled("calc_minus_button");
     buttonMultiply.Visible = ShiftoriumFrontend.UpgradeInstalled("calc_multiply_button");
     buttonDivide.Visible   = ShiftoriumFrontend.UpgradeInstalled("calc_divide_button");
     buttonC.Visible        = ShiftoriumFrontend.UpgradeInstalled("calc_clear_button");
     buttonCE.Visible       = ShiftoriumFrontend.UpgradeInstalled("calc_ce_button");
     buttonDecimal.Visible  = ShiftoriumFrontend.UpgradeInstalled("calc_decimal_button");
 }
Exemplo n.º 5
0
        public void OnLoad()
        {
            MakeWidget(rtbterm);

            if (SaveSystem.CurrentSave != null)
            {
                TerminalBackend.PrintPrompt();
                if (!ShiftoriumFrontend.UpgradeInstalled("window_manager"))
                {
                    rtbterm.Select(rtbterm.TextLength, 0);
                }
            }
        }
Exemplo n.º 6
0
        public void OnLoad()
        {
            MakeWidget(rtbterm);

            if (SaveSystem.CurrentSave != null)
            {
                if (!ShiftoriumFrontend.UpgradeInstalled("window_manager"))
                {
                    rtbterm.Text = AppearanceManager.LastTerminalText;
                    rtbterm.Select(rtbterm.TextLength, 0);
                }
                Console.Write($"{SaveSystem.CurrentSave.Username}@{SaveSystem.CurrentSave.SystemName}:~$ ");
            }
        }
Exemplo n.º 7
0
        public void PopulateShifter()
        {
            if (LoadedSkin == null)
            {
                LoadedSkin = JsonConvert.DeserializeObject <Skin>(JsonConvert.SerializeObject(SkinEngine.LoadedSkin));
            }

            settings.Clear();

            foreach (var field in LoadedSkin.GetType().GetFields(BindingFlags.Public | BindingFlags.Instance))
            {
                if (ShiftoriumFrontend.UpgradeAttributesUnlocked(field))
                {
                    bool           addToShifter = true;
                    ShifterSetting setting      = new Applications.ShifterSetting();
                    foreach (var attr in field.GetCustomAttributes(false))
                    {
                        if (attr is ShifterHiddenAttribute)
                        {
                            addToShifter = false;
                            continue;
                        }

                        if (attr is ShifterMetaAttribute)
                        {
                            setting.Category = (attr as ShifterMetaAttribute).Meta;
                        }
                        if (attr is ShifterCategoryAttribute)
                        {
                            setting.SubCategory = (attr as ShifterCategoryAttribute).Category;
                        }
                        if (attr is ShifterNameAttribute)
                        {
                            setting.Name = (attr as ShifterNameAttribute).Name;
                        }
                        if (attr is ShifterDescriptionAttribute)
                        {
                            setting.Description = (attr as ShifterDescriptionAttribute).Description;
                        }
                    }
                    if (addToShifter == true)
                    {
                        setting.Field = field;
                        settings.Add(setting);
                    }
                }
            }

            PopulateCategories();
        }
Exemplo n.º 8
0
        private void saveToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var types = new List <string>();

            types.Add(".txt");
            if (ShiftoriumFrontend.UpgradeInstalled("textpad_lua_support"))
            {
                types.Add(".lua");
            }
            if (ShiftoriumFrontend.UpgradeInstalled("textpad_python_support"))
            {
                types.Add(".py");
            }

            AppearanceManager.SetupDialog(new FileDialog(types.ToArray(), FileOpenerStyle.Save, new Action <string>((file) => this.SaveFile(file))));
        }
Exemplo n.º 9
0
        public void ResetAllKeywords()
        {
            string primary   = SaveSystem.CurrentSave.Username + " ";
            string secondary = "shiftos ";


            var asm = Assembly.GetExecutingAssembly();

            var types = asm.GetTypes();

            foreach (var type in types)
            {
                foreach (var a in type.GetCustomAttributes(false))
                {
                    if (ShiftoriumFrontend.UpgradeAttributesUnlocked(type))
                    {
                        if (a is Namespace)
                        {
                            var ns = a as Namespace;
                            if (!primary.Contains(ns.name))
                            {
                                primary += ns.name + " ";
                            }
                            foreach (var method in type.GetMethods(BindingFlags.Public | BindingFlags.Static))
                            {
                                if (ShiftoriumFrontend.UpgradeAttributesUnlocked(method))
                                {
                                    foreach (var ma in method.GetCustomAttributes(false))
                                    {
                                        if (ma is Command)
                                        {
                                            var cmd = ma as Command;
                                            if (!secondary.Contains(cmd.name))
                                            {
                                                secondary += cmd.name + " ";
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 10
0
        private void newgame()
        {
            pnlfinalstats.Hide();
            pnllose.Hide();
            pnlintro.Hide();

            level       = 1;
            totalreward = 0;
            if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade"))
            {
                beataireward = 10;
            }
            else
            {
                beataireward = 5;
            }
            beatairewardtotal       = 0;
            secondsleft             = 60;
            lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ");
            //reset stats text
            lblstatsX.Text = Localization.Parse("{H_VEL}: ");
            lblstatsY.Text = Localization.Parse("{V_VEL}: ");

            levelxspeed = 3;
            levelyspeed = 3;

            incrementx = 0.4;
            incrementy = 0.2;

            xveldec = levelxspeed;
            yveldec = levelyspeed;

            tmrcountdown.Start();
            lblbeatai.Text = Localization.Parse($"{{PONG_BEAT_AI_REWARD}}: {beataireward}");
            pnlgamestats.Hide();
            lblbeatai.Show();
            ball.Location = new Point(paddleHuman.Location.X + paddleHuman.Width + 50, (paddleHuman.Location.Y + paddleHuman.Height) / 2);
            if (xVel < 0)
            {
                xVel = Math.Abs(xVel);
            }
            lbllevelandtime.Text = Localization.Parse("{{LEVEL}}: " + level + " - " + secondsleft + " {SECONDS_LEFT}");
        }
Exemplo n.º 11
0
        public void Setup()
        {
            pnlcontents.BackColor = LoadedSkin.ControlColor;

            this.lbtitletext.Text = Localization.Parse("{TEMPLATE}");
            this.Dock             = DockStyle.Fill;

            if (SaveSystem.CurrentSave != null)
            {
                this.pnltitle.Visible    = ShiftoriumFrontend.UpgradeInstalled("wm_titlebar");
                this.pnlclose.Visible    = ShiftoriumFrontend.UpgradeInstalled("close_button");
                this.pnlminimize.Visible = (IsDialog == false) && ShiftoriumFrontend.UpgradeInstalled("minimize_button");
                this.pnlmaximize.Visible = (IsDialog == false) && ShiftoriumFrontend.UpgradeInstalled("maximize_button");
                SetupSkin();
            }
            else
            {
                this.pnltitle.Visible    = false;
                this.pnlclose.Visible    = false;
                this.pnlminimize.Visible = false;
                this.pnlmaximize.Visible = false;
            }
        }
Exemplo n.º 12
0
 public void OnLoad()
 {
     tbguess.Visible = false;
     comboBox1.Items.Add("ShiftOS");
     if (ShiftoriumFrontend.UpgradeInstalled("sl_contributors_wordlist"))
     {
         comboBox1.Items.Add("Contributors");
     }
     if (Shiftorium.UpgradeInstalled("sl_operating_systems_wordlist"))
     {
         comboBox1.Items.Add("Operating Systems");
     }
     btnrestart.Visible      = true;
     lblword.Left            = (this.Width - lblword.Width) / 2;
     comboBox1.SelectedIndex = 0;
     tmrcenter.Tick         += (o, a) =>
     {
         this.tbguess.CenterParent();
         this.tbguess.Parent.CenterParent();
     };
     tmrcenter.Interval = 50;
     tmrcenter.Start();
 }
Exemplo n.º 13
0
        //Increase the ball speed stats for the next level
        private void generatenextlevel()
        {
            lbllevelreached.Text = Localization.Parse("{YOU_REACHED_LEVEL} " + level + "!");

            lblpreviousstats.Text = Localization.Parse("{INITIAL_H_VEL}: " + levelxspeed + Environment.NewLine + "{INITIAL_V_VEL}: " + levelyspeed + Environment.NewLine + "{INC_H_VEL}: " + incrementx + Environment.NewLine + "{INC_V_VEL}: " + incrementy);

            switch (rand.Next(1, 3))
            {
            case 1:
                levelxspeed = levelxspeed + 1;
                break;

            case 2:
                levelxspeed = levelxspeed + 2;
                break;
            }

            switch (rand.Next(1, 3))
            {
            case 1:
                levelyspeed = levelyspeed + 1;
                break;

            case 2:
                levelyspeed = levelyspeed + 2;
                break;
            }

            switch (rand.Next(1, 6))
            {
            case 1:
                incrementx = incrementx + 0.1;
                break;

            case 2:
                incrementx = incrementx + 0.2;
                break;

            case 3:
                incrementy = incrementy + 0.1;
                break;

            case 4:
                incrementy = incrementy + 0.2;
                break;

            case 5:
                incrementy = incrementy + 0.3;
                break;
            }

            lblnextstats.Text = Localization.Parse("{INITIAL_H_VEL}: " + levelxspeed + Environment.NewLine + "{INITIAL_V_VEL}: " + levelyspeed + Environment.NewLine + "{INC_H_VEL}: " + incrementx + Environment.NewLine + "{INC_V_VEL}: " + incrementy);

            if (level < 15)
            {
                if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade"))
                {
                    beataireward = level * 10;
                }
                else
                {
                    beataireward = level * 5;
                }
            }
            else
            {
                if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade"))
                {
                    double br = levelrewards[level - 1] / 10;
                    beataireward = (int)Math.Round(br) * 10;
                }
                else
                {
                    double br = levelrewards[level - 1] / 10;
                    beataireward = (int)Math.Round(br) * 5;
                }
            }

            totalreward = levelrewards[level - 1] + beatairewardtotal;

            btncashout.Text = Localization.Parse("{CASH_OUT_WITH_CODEPOINTS}");
            btnplayon.Text  = Localization.Parse("{PONG_PLAY_ON_FOR_MORE}");
        }
Exemplo n.º 14
0
 private void setuplevelrewards()
 {
     if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade"))
     {
         levelrewards[0]  = 0;
         levelrewards[1]  = 40;
         levelrewards[2]  = 120;
         levelrewards[3]  = 280;
         levelrewards[4]  = 580;
         levelrewards[5]  = 800;
         levelrewards[6]  = 1200;
         levelrewards[7]  = 1800;
         levelrewards[8]  = 2400;
         levelrewards[9]  = 3200;
         levelrewards[10] = 4000;
         levelrewards[11] = 5000;
         levelrewards[12] = 6000;
         levelrewards[13] = 8000;
         levelrewards[14] = 10000;
         levelrewards[15] = 12000;
         levelrewards[16] = 16000;
         levelrewards[17] = 20000;
         levelrewards[18] = 26000;
         levelrewards[19] = 32000;
         levelrewards[20] = 40000;
         levelrewards[21] = 50000;
         levelrewards[22] = 64000;
         levelrewards[23] = 80000;
         levelrewards[24] = 100000;
         levelrewards[25] = 120000;
         levelrewards[26] = 150000;
         levelrewards[27] = 180000;
         levelrewards[28] = 220000;
         levelrewards[29] = 280000;
         levelrewards[30] = 360000;
         levelrewards[31] = 440000;
         levelrewards[32] = 540000;
         levelrewards[33] = 640000;
         levelrewards[34] = 800000;
         levelrewards[35] = 1000000;
         levelrewards[36] = 1280000;
         levelrewards[37] = 1600000;
         levelrewards[38] = 2000000;
         levelrewards[39] = 3000000;
         levelrewards[40] = 4000000;
     }
     else
     {
         levelrewards[0]  = 0;
         levelrewards[1]  = 20;
         levelrewards[2]  = 60;
         levelrewards[3]  = 140;
         levelrewards[4]  = 290;
         levelrewards[5]  = 400;
         levelrewards[6]  = 600;
         levelrewards[7]  = 900;
         levelrewards[8]  = 1200;
         levelrewards[9]  = 1600;
         levelrewards[10] = 2000;
         levelrewards[11] = 2500;
         levelrewards[12] = 3000;
         levelrewards[13] = 4000;
         levelrewards[14] = 5000;
         levelrewards[15] = 6000;
         levelrewards[16] = 8000;
         levelrewards[17] = 10000;
         levelrewards[18] = 13000;
         levelrewards[19] = 16000;
         levelrewards[20] = 20000;
         levelrewards[21] = 25000;
         levelrewards[22] = 32000;
         levelrewards[23] = 40000;
         levelrewards[24] = 50000;
         levelrewards[25] = 60000;
         levelrewards[26] = 75000;
         levelrewards[27] = 90000;
         levelrewards[28] = 110000;
         levelrewards[29] = 140000;
         levelrewards[30] = 180000;
         levelrewards[31] = 220000;
         levelrewards[32] = 270000;
         levelrewards[33] = 320000;
         levelrewards[34] = 400000;
         levelrewards[35] = 500000;
         levelrewards[36] = 640000;
         levelrewards[37] = 800000;
         levelrewards[38] = 1000000;
         levelrewards[39] = 1500000;
         levelrewards[40] = 2000000;
     }
 }
Exemplo n.º 15
0
 public void OnUpgrade()
 {
     btnAddOptionalText.Visible = ShiftoriumFrontend.UpgradeInstalled("format_editor_optional_text");
     btnAddRegexText.Visible    = ShiftoriumFrontend.UpgradeInstalled("format_editor_regex");
     btnAddColor.Visible        = ShiftoriumFrontend.UpgradeInstalled("format_editor_syntax_highlighting");
 }
Exemplo n.º 16
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.panel1            = new System.Windows.Forms.Panel();
            this.panel2            = new System.Windows.Forms.Panel();
            this.label2            = new System.Windows.Forms.Label();
            this.label3            = new System.Windows.Forms.Label();
            this.lbupgradedesc     = new System.Windows.Forms.Label();
            this.pnlupgradeactions = new System.Windows.Forms.Panel();
            this.btnbuy            = new System.Windows.Forms.Button();
            this.lbupgradetitle    = new System.Windows.Forms.Label();
            this.pnllist           = new System.Windows.Forms.Panel();
            this.label1            = new System.Windows.Forms.Label();
            this.pgupgradeprogress = new ShiftOS.WinForms.Controls.ShiftedProgressBar();
            this.lbupgrades        = new System.Windows.Forms.ListBox();
            this.panel1.SuspendLayout();
            this.panel2.SuspendLayout();
            this.pnlupgradeactions.SuspendLayout();
            this.pnllist.SuspendLayout();
            this.SuspendLayout();
            //
            // panel1
            //
            this.panel1.Controls.Add(this.panel2);
            this.panel1.Controls.Add(this.pnllist);
            this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.panel1.Location = new System.Drawing.Point(0, 0);
            this.panel1.Name     = "panel1";
            this.panel1.Size     = new System.Drawing.Size(782, 427);
            this.panel1.TabIndex = 0;
            //
            // panel2
            //
            this.panel2.Controls.Add(this.lbupgradedesc);
            this.panel2.Controls.Add(this.pnlupgradeactions);
            this.panel2.Controls.Add(this.lbupgradetitle);
            this.panel2.Dock     = System.Windows.Forms.DockStyle.Fill;
            this.panel2.Location = new System.Drawing.Point(406, 0);
            this.panel2.Name     = "panel2";
            this.panel2.Size     = new System.Drawing.Size(376, 427);
            this.panel2.TabIndex = 1;
            //
            // label2
            //
            if (ShiftoriumFrontend.UpgradeInstalled("shiftorium_gui_codepoints_display"))
            {
                this.label2.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
                this.label2.AutoSize = true;
                this.label2.Location = new System.Drawing.Point(128, 357);
                this.label2.Name     = "label2";
                this.label2.Size     = new System.Drawing.Size(135, 13);
                this.label2.TabIndex = 3;
                this.label2.Text     = "You have: %cp Codepoints";
                this.label2.Click   += new System.EventHandler(this.label2_Click);
            }
            else
            {
                this.label2.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
                this.label2.AutoSize = true;
                this.label2.Location = new System.Drawing.Point(128, 357);
                this.label2.Name     = "label2";
                this.label2.Size     = new System.Drawing.Size(1, 1);
                this.label2.TabIndex = 3;
                this.label2.Text     = "";
                this.label2.Click   += new System.EventHandler(this.label2_Click);
            }
            //
            // lbupgradedesc
            //
            this.lbupgradedesc.Dock      = System.Windows.Forms.DockStyle.Fill;
            this.lbupgradedesc.Location  = new System.Drawing.Point(0, 42);
            this.lbupgradedesc.Name      = "lbupgradedesc";
            this.lbupgradedesc.Size      = new System.Drawing.Size(376, 348);
            this.lbupgradedesc.TabIndex  = 2;
            this.lbupgradedesc.Text      = "{SHIFTORIUM_EXP}";
            this.lbupgradedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.lbupgradedesc.UseCompatibleTextRendering = true;
            //
            // pnlupgradeactions
            //
            this.pnlupgradeactions.Controls.Add(this.btnbuy);
            this.pnlupgradeactions.Dock     = System.Windows.Forms.DockStyle.Bottom;
            this.pnlupgradeactions.Location = new System.Drawing.Point(0, 390);
            this.pnlupgradeactions.Name     = "pnlupgradeactions";
            this.pnlupgradeactions.Size     = new System.Drawing.Size(376, 37);
            this.pnlupgradeactions.TabIndex = 1;
            //
            // btnbuy
            //
            this.btnbuy.Anchor                  = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
            this.btnbuy.AutoSize                = true;
            this.btnbuy.AutoSizeMode            = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.btnbuy.FlatStyle               = System.Windows.Forms.FlatStyle.Flat;
            this.btnbuy.Location                = new System.Drawing.Point(327, 9);
            this.btnbuy.Name                    = "btnbuy";
            this.btnbuy.Size                    = new System.Drawing.Size(37, 25);
            this.btnbuy.TabIndex                = 0;
            this.btnbuy.Text                    = "Buy";
            this.btnbuy.UseVisualStyleBackColor = true;
            this.btnbuy.Visible                 = false;
            this.btnbuy.Click                  += new System.EventHandler(this.btnbuy_Click);
            //
            // lbupgradetitle
            //
            this.lbupgradetitle.Dock      = System.Windows.Forms.DockStyle.Top;
            this.lbupgradetitle.Location  = new System.Drawing.Point(0, 0);
            this.lbupgradetitle.Name      = "lbupgradetitle";
            this.lbupgradetitle.Size      = new System.Drawing.Size(376, 42);
            this.lbupgradetitle.TabIndex  = 0;
            this.lbupgradetitle.Text      = "{WELCOME_TO_SHIFTORIUM}";
            this.lbupgradetitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
            this.lbupgradetitle.UseCompatibleTextRendering = true;
            //
            // pnllist
            //
            this.pnllist.Controls.Add(this.label2);
            this.pnllist.Controls.Add(this.label1);
            this.pnllist.Controls.Add(this.pgupgradeprogress);
            this.pnllist.Controls.Add(this.lbupgrades);
            this.pnllist.Dock     = System.Windows.Forms.DockStyle.Left;
            this.pnllist.Location = new System.Drawing.Point(0, 0);
            this.pnllist.Name     = "pnllist";
            this.pnllist.Size     = new System.Drawing.Size(406, 427);
            this.pnllist.TabIndex = 0;
            //
            // label1
            //
            this.label1.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 399);
            this.label1.Name     = "label1";
            this.label1.Size     = new System.Drawing.Size(137, 13);
            this.label1.TabIndex = 2;
            this.label1.Text     = "{UPGRADE_PROGRESS}:";
            //
            // label3
            //
            this.label3.Anchor   = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(3, 399);
            this.label3.Name     = "label3";
            this.label3.Size     = new System.Drawing.Size(137, 13);
            this.label3.TabIndex = 2;
            int upgradepercent = (pgupgradeprogress.Value / 100) * 100;

            this.label3.Text = upgradepercent.ToString();
            //
            // pgupgradeprogress
            //
            this.pgupgradeprogress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                                  | System.Windows.Forms.AnchorStyles.Right)));
            this.pgupgradeprogress.BlockSize = 5;
            this.pgupgradeprogress.Location  = new System.Drawing.Point(146, 390);
            this.pgupgradeprogress.Maximum   = 100;
            this.pgupgradeprogress.Name      = "pgupgradeprogress";
            this.pgupgradeprogress.Size      = new System.Drawing.Size(254, 23);
            this.pgupgradeprogress.Style     = System.Windows.Forms.ProgressBarStyle.Continuous;
            this.pgupgradeprogress.TabIndex  = 1;
            this.pgupgradeprogress.Value     = 25;
            //
            // lbupgrades
            //
            this.lbupgrades.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                            | System.Windows.Forms.AnchorStyles.Left)
                                                                           | System.Windows.Forms.AnchorStyles.Right)));
            this.lbupgrades.DrawMode          = System.Windows.Forms.DrawMode.OwnerDrawFixed;
            this.lbupgrades.FormattingEnabled = true;
            this.lbupgrades.Location          = new System.Drawing.Point(3, 66);
            this.lbupgrades.Name      = "lbupgrades";
            this.lbupgrades.Size      = new System.Drawing.Size(397, 277);
            this.lbupgrades.TabIndex  = 0;
            this.lbupgrades.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.lbupgrades_DrawItem);
            //
            // ShiftoriumFrontend
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor           = System.Drawing.Color.Black;
            this.Controls.Add(this.panel1);
            this.ForeColor = System.Drawing.Color.LightGreen;
            this.Name      = "ShiftoriumFrontend";
            this.Text      = "{SHIFTORIUM_NAME}";
            this.Size      = new System.Drawing.Size(782, 427);
            this.Load     += new System.EventHandler(this.Shiftorium_Load);
            this.panel1.ResumeLayout(false);
            this.panel2.ResumeLayout(false);
            this.pnlupgradeactions.ResumeLayout(false);
            this.pnlupgradeactions.PerformLayout();
            this.pnllist.ResumeLayout(false);
            this.pnllist.PerformLayout();
            this.ResumeLayout(false);
        }
Exemplo n.º 17
0
        // ERROR: Handles clauses are not supported in C#
        private void gameTimer_Tick(object sender, EventArgs e)
        {
            if (this.Left < Screen.PrimaryScreen.Bounds.Width)
            {
                ball.BackColor           = SkinEngine.LoadedSkin.ControlTextColor;
                paddleComputer.BackColor = SkinEngine.LoadedSkin.ControlTextColor;
                paddleHuman.BackColor    = SkinEngine.LoadedSkin.ControlTextColor;



                //Set the computer player to move according to the ball's position.
                if (aiShouldIsbeEnabled)
                {
                    if (ball.Location.X > 500 - xVel * 10 && xVel > 0)
                    {
                        if (ball.Location.Y > paddleComputer.Location.Y + 50)
                        {
                            paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed);
                        }
                        if (ball.Location.Y < paddleComputer.Location.Y + 50)
                        {
                            paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed);
                        }
                        casualposition = rand.Next(-150, 201);
                    }
                    else
                    {
                        //used to be me.location.y
                        if (paddleComputer.Location.Y > this.Size.Height / 2 - paddleComputer.Height + casualposition)
                        {
                            paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y - computerspeed);
                        }
                        //used to be me.location.y
                        if (paddleComputer.Location.Y < this.Size.Height / 2 - paddleComputer.Height + casualposition)
                        {
                            paddleComputer.Location = new Point(paddleComputer.Location.X, paddleComputer.Location.Y + computerspeed);
                        }
                    }
                }

                //Set Xvel and Yvel speeds from decimal
                if (xVel > 0)
                {
                    xVel = (int)Math.Round(xveldec);
                }
                if (xVel < 0)
                {
                    xVel = (int)-Math.Round(xveldec);
                }
                if (yVel > 0)
                {
                    yVel = (int)Math.Round(yveldec);
                }
                if (yVel < 0)
                {
                    yVel = (int)-Math.Round(yveldec);
                }

                // Move the game ball.
                ball.Location = new Point(ball.Location.X + xVel, ball.Location.Y + yVel);

                // Check for top wall.
                if (ball.Location.Y < 0)
                {
                    ball.Location = new Point(ball.Location.X, 0);
                    yVel          = -yVel;
                }

                // Check for bottom wall.
                if (ball.Location.Y > pgcontents.Height - ball.Height)
                {
                    ball.Location = new Point(ball.Location.X, pgcontents.Height - ball.Size.Height);
                    yVel          = -yVel;
                }

                // Check for player paddle.
                if (ball.Bounds.IntersectsWith(paddleHuman.Bounds))
                {
                    ball.Location = new Point(paddleHuman.Location.X + ball.Size.Width, ball.Location.Y);
                    //randomly increase x or y speed of ball
                    switch (rand.Next(1, 3))
                    {
                    case 1:
                        xveldec = xveldec + incrementx;
                        break;

                    case 2:
                        if (yveldec > 0)
                        {
                            yveldec = yveldec + incrementy;
                        }
                        if (yveldec < 0)
                        {
                            yveldec = yveldec - incrementy;
                        }
                        break;
                    }
                    xVel = -xVel;
                }

                // Check for computer paddle.
                if (ball.Bounds.IntersectsWith(paddleComputer.Bounds))
                {
                    ball.Location = new Point(paddleComputer.Location.X - paddleComputer.Size.Width + 1, ball.Location.Y);
                    xveldec       = xveldec + incrementx;
                    xVel          = -xVel;
                }

                // Check for left wall.
                if (ball.Location.X < -100)
                {
                    ball.Location           = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2);
                    paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y);
                    if (xVel > 0)
                    {
                        xVel = -xVel;
                    }
                    pnllose.Show();
                    gameTimer.Stop();
                    counter.Stop();
                    lblmissedout.Text = Localization.Parse("{YOU_MISSED_OUT_ON}:") + Environment.NewLine + lblstatscodepoints.Text.Replace(Localization.Parse("{CODEPOINTS}: "), "") + Localization.Parse(" {CODEPOINTS}");
                    if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade_2"))
                    {
                        totalreward = levelrewards[level - 1] + beatairewardtotal;
                        double onePercent = (totalreward / 100);
                        lblbutyougained.Text = Localization.Parse("{BUT_YOU_GAINED}:") + Environment.NewLine + onePercent.ToString("") + (Localization.Parse(" {CODEPOINTS}"));
                        SaveSystem.TransferCodepointsFrom("pong", (totalreward / 100));
                    }
                }

                // Check for right wall.
                if (ball.Location.X > this.Width - ball.Size.Width - paddleComputer.Width + 100)
                {
                    ball.Location           = new Point(this.Size.Width / 2 + 200, this.Size.Height / 2);
                    paddleComputer.Location = new Point(paddleComputer.Location.X, ball.Location.Y);
                    if (xVel > 0)
                    {
                        xVel = -xVel;
                    }
                    beatairewardtotal = beatairewardtotal + beataireward;
                    lblbeatai.Show();
                    lblbeatai.Text = Localization.Parse($"{{PONG_BEAT_AI_REWARD_SECONDARY}}: {beataireward}");
                    tmrcountdown.Start();
                    gameTimer.Stop();
                    counter.Stop();
                }

                //lblstats.Text = "Xspeed: " & Math.Abs(xVel) & " Yspeed: " & Math.Abs(yVel) & " Human Location: " & paddleHuman.Location.ToString & " Computer Location: " & paddleComputer.Location.ToString & Environment.NewLine & " Ball Location: " & ball.Location.ToString & " Xdec: " & xveldec & " Ydec: " & yveldec & " Xinc: " & incrementx & " Yinc: " & incrementy
                lblstatsX.Text          = Localization.Parse("{H_VEL}: ") + xveldec;
                lblstatsY.Text          = Localization.Parse("{V_VEL}: ") + yveldec;
                lblstatscodepoints.Text = Localization.Parse("{CODEPOINTS}: ") + (levelrewards[level - 1] + beatairewardtotal).ToString();
                lbllevelandtime.Text    = Localization.Parse("{LEVEL}: " + level + " - " + secondsleft + " {SECONDS_LEFT}");

                if (xVel > 20 || xVel < -20)
                {
                    paddleHuman.Width    = Math.Abs(xVel);
                    paddleComputer.Width = Math.Abs(xVel);
                }
                else
                {
                    paddleHuman.Width    = 20;
                    paddleComputer.Width = 20;
                }

                computerspeed = Math.Abs(yVel);

                //  pgcontents.Refresh()
                // pgcontents.CreateGraphics.FillRectangle(Brushes.Black, ball.Location.X, ball.Location.Y, ball.Width, ball.Height)
            }
        }
Exemplo n.º 18
0
 private void InitializeComponent()
 {
     this.components                 = new System.ComponentModel.Container();
     this.gameTimer                  = new System.Windows.Forms.Timer(this.components);
     this.counter                    = new System.Windows.Forms.Timer(this.components);
     this.tmrcountdown               = new System.Windows.Forms.Timer(this.components);
     this.tmrstoryline               = new System.Windows.Forms.Timer(this.components);
     this.pgcontents                 = new ShiftOS.WinForms.Controls.Canvas();
     this.pnlgamestats               = new System.Windows.Forms.Panel();
     this.button1                    = new System.Windows.Forms.Button();
     this.label12                    = new System.Windows.Forms.Label();
     this.lblnextstats               = new System.Windows.Forms.Label();
     this.Label7                     = new System.Windows.Forms.Label();
     this.lblpreviousstats           = new System.Windows.Forms.Label();
     this.Label4                     = new System.Windows.Forms.Label();
     this.btnplayon                  = new System.Windows.Forms.Button();
     this.Label3                     = new System.Windows.Forms.Label();
     this.btncashout                 = new System.Windows.Forms.Button();
     this.Label2                     = new System.Windows.Forms.Label();
     this.lbllevelreached            = new System.Windows.Forms.Label();
     this.pnlhighscore               = new System.Windows.Forms.Panel();
     this.lbhighscore                = new System.Windows.Forms.ListBox();
     this.label10                    = new System.Windows.Forms.Label();
     this.pnlfinalstats              = new System.Windows.Forms.Panel();
     this.btnplayagain               = new System.Windows.Forms.Button();
     this.lblfinalcodepoints         = new System.Windows.Forms.Label();
     this.Label11                    = new System.Windows.Forms.Label();
     this.lblfinalcomputerreward     = new System.Windows.Forms.Label();
     this.Label9                     = new System.Windows.Forms.Label();
     this.lblfinallevelreward        = new System.Windows.Forms.Label();
     this.lblfinallevelreached       = new System.Windows.Forms.Label();
     this.lblfinalcodepointswithtext = new System.Windows.Forms.Label();
     this.pnllose                    = new System.Windows.Forms.Panel();
     this.lblmissedout               = new System.Windows.Forms.Label();
     this.lblbutyougained            = new System.Windows.Forms.Label();
     this.btnlosetryagain            = new System.Windows.Forms.Button();
     this.Label5                     = new System.Windows.Forms.Label();
     this.Label1                     = new System.Windows.Forms.Label();
     this.pnlintro                   = new System.Windows.Forms.Panel();
     this.Label6                     = new System.Windows.Forms.Label();
     this.btnstartgame               = new System.Windows.Forms.Button();
     this.Label8                     = new System.Windows.Forms.Label();
     this.lblbeatai                  = new System.Windows.Forms.Label();
     this.lblcountdown               = new System.Windows.Forms.Label();
     this.ball               = new ShiftOS.WinForms.Controls.Canvas();
     this.paddleHuman        = new System.Windows.Forms.PictureBox();
     this.paddleComputer     = new System.Windows.Forms.Panel();
     this.lbllevelandtime    = new System.Windows.Forms.Label();
     this.lblstatscodepoints = new System.Windows.Forms.Label();
     this.lblstatsY          = new System.Windows.Forms.Label();
     this.lblstatsX          = new System.Windows.Forms.Label();
     this.flowLayoutPanel1   = new System.Windows.Forms.FlowLayoutPanel();
     this.button2            = new System.Windows.Forms.Button();
     this.pgcontents.SuspendLayout();
     this.pnlgamestats.SuspendLayout();
     this.pnlhighscore.SuspendLayout();
     this.pnlfinalstats.SuspendLayout();
     this.pnllose.SuspendLayout();
     this.pnlintro.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).BeginInit();
     this.flowLayoutPanel1.SuspendLayout();
     this.SuspendLayout();
     //
     // gameTimer
     //
     this.gameTimer.Interval = 30;
     this.gameTimer.Tick    += new System.EventHandler(this.gameTimer_Tick);
     //
     // counter
     //
     this.counter.Interval = 1000;
     this.counter.Tick    += new System.EventHandler(this.counter_Tick);
     //
     // tmrcountdown
     //
     this.tmrcountdown.Interval = 1000;
     this.tmrcountdown.Tick    += new System.EventHandler(this.countdown_Tick);
     //
     // tmrstoryline
     //
     this.tmrstoryline.Interval = 1000;
     this.tmrstoryline.Tick    += new System.EventHandler(this.tmrstoryline_Tick);
     //
     // pgcontents
     //
     this.pgcontents.BackColor = System.Drawing.Color.White;
     this.pgcontents.Controls.Add(this.pnlhighscore);
     this.pgcontents.Controls.Add(this.pnlgamestats);
     this.pgcontents.Controls.Add(this.pnlfinalstats);
     this.pgcontents.Controls.Add(this.pnllose);
     this.pgcontents.Controls.Add(this.pnlintro);
     this.pgcontents.Controls.Add(this.lblbeatai);
     this.pgcontents.Controls.Add(this.lblcountdown);
     this.pgcontents.Controls.Add(this.ball);
     this.pgcontents.Controls.Add(this.paddleHuman);
     this.pgcontents.Controls.Add(this.paddleComputer);
     this.pgcontents.Controls.Add(this.lbllevelandtime);
     this.pgcontents.Controls.Add(this.lblstatscodepoints);
     this.pgcontents.Controls.Add(this.lblstatsY);
     this.pgcontents.Controls.Add(this.lblstatsX);
     this.pgcontents.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.pgcontents.Location   = new System.Drawing.Point(0, 0);
     this.pgcontents.Name       = "pgcontents";
     this.pgcontents.Size       = new System.Drawing.Size(700, 400);
     this.pgcontents.TabIndex   = 20;
     this.pgcontents.Paint     += new System.Windows.Forms.PaintEventHandler(this.pgcontents_Paint);
     this.pgcontents.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove);
     //
     // pnlgamestats
     //
     this.pnlgamestats.Controls.Add(this.button1);
     this.pnlgamestats.Controls.Add(this.label12);
     this.pnlgamestats.Controls.Add(this.lblnextstats);
     this.pnlgamestats.Controls.Add(this.Label7);
     this.pnlgamestats.Controls.Add(this.lblpreviousstats);
     this.pnlgamestats.Controls.Add(this.Label4);
     this.pnlgamestats.Controls.Add(this.btnplayon);
     this.pnlgamestats.Controls.Add(this.Label3);
     this.pnlgamestats.Controls.Add(this.btncashout);
     this.pnlgamestats.Controls.Add(this.Label2);
     this.pnlgamestats.Controls.Add(this.lbllevelreached);
     this.pnlgamestats.Location = new System.Drawing.Point(56, 76);
     this.pnlgamestats.Name     = "pnlgamestats";
     this.pnlgamestats.Size     = new System.Drawing.Size(466, 284);
     this.pnlgamestats.TabIndex = 6;
     this.pnlgamestats.Visible  = false;
     //
     // button1
     //
     this.button1.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.button1.Location = new System.Drawing.Point(32, 223);
     this.button1.Name     = "button1";
     this.button1.Size     = new System.Drawing.Size(191, 35);
     this.button1.TabIndex = 10;
     this.button1.Text     = "{PONG_VIEW_HIGHSCORES}";
     this.button1.UseVisualStyleBackColor = true;
     this.button1.Click += new System.EventHandler(this.btnhighscore_Click);
     //
     // label12
     //
     this.label12.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.label12.Location  = new System.Drawing.Point(8, 187);
     this.label12.Name      = "label12";
     this.label12.Size      = new System.Drawing.Size(245, 33);
     this.label12.TabIndex  = 9;
     this.label12.Text      = "{PONG_HIGHSCORE_EXP}";
     this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblnextstats
     //
     this.lblnextstats.AutoSize = true;
     this.lblnextstats.Location = new System.Drawing.Point(278, 136);
     this.lblnextstats.Name     = "lblnextstats";
     this.lblnextstats.Size     = new System.Drawing.Size(0, 13);
     this.lblnextstats.TabIndex = 8;
     //
     // Label7
     //
     this.Label7.AutoSize = true;
     this.Label7.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label7.Location = new System.Drawing.Point(278, 119);
     this.Label7.Name     = "Label7";
     this.Label7.Size     = new System.Drawing.Size(124, 16);
     this.Label7.TabIndex = 7;
     this.Label7.Text     = "Next Level Stats:";
     //
     // lblpreviousstats
     //
     this.lblpreviousstats.AutoSize = true;
     this.lblpreviousstats.Location = new System.Drawing.Point(278, 54);
     this.lblpreviousstats.Name     = "lblpreviousstats";
     this.lblpreviousstats.Size     = new System.Drawing.Size(0, 13);
     this.lblpreviousstats.TabIndex = 6;
     //
     // Label4
     //
     this.Label4.AutoSize = true;
     this.Label4.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label4.Location = new System.Drawing.Point(278, 37);
     this.Label4.Name     = "Label4";
     this.Label4.Size     = new System.Drawing.Size(154, 16);
     this.Label4.TabIndex = 5;
     this.Label4.Text     = "Previous Level Stats:";
     //
     // btnplayon
     //
     this.btnplayon.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btnplayon.Location = new System.Drawing.Point(32, 147);
     this.btnplayon.Name     = "btnplayon";
     this.btnplayon.Size     = new System.Drawing.Size(191, 35);
     this.btnplayon.TabIndex = 4;
     this.btnplayon.Text     = "Play on for 3 codepoints!";
     this.btnplayon.UseVisualStyleBackColor = true;
     this.btnplayon.Click += new System.EventHandler(this.btnplayon_Click);
     //
     // Label3
     //
     this.Label3.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label3.Location  = new System.Drawing.Point(8, 111);
     this.Label3.Name      = "Label3";
     this.Label3.Size      = new System.Drawing.Size(245, 33);
     this.Label3.TabIndex  = 3;
     this.Label3.Text      = "{PONG_PLAYON_DESC}";
     this.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // btncashout
     //
     this.btncashout.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btncashout.Location = new System.Drawing.Point(32, 73);
     this.btncashout.Name     = "btncashout";
     this.btncashout.Size     = new System.Drawing.Size(191, 35);
     this.btncashout.TabIndex = 2;
     this.btncashout.Text     = "Cash out with 1 codepoint!";
     this.btncashout.UseVisualStyleBackColor = true;
     this.btncashout.Click += new System.EventHandler(this.btncashout_Click);
     //
     // Label2
     //
     this.Label2.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label2.Location  = new System.Drawing.Point(8, 37);
     this.Label2.Name      = "Label2";
     this.Label2.Size      = new System.Drawing.Size(245, 33);
     this.Label2.TabIndex  = 1;
     this.Label2.Text      = "{PONG_CASHOUT_DESC}";
     this.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lbllevelreached
     //
     this.lbllevelreached.AutoSize = true;
     this.lbllevelreached.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lbllevelreached.Location = new System.Drawing.Point(149, 6);
     this.lbllevelreached.Name     = "lbllevelreached";
     this.lbllevelreached.Size     = new System.Drawing.Size(185, 20);
     this.lbllevelreached.TabIndex = 0;
     this.lbllevelreached.Text     = "You Reached Level 2!";
     //
     // pnlhighscore
     //
     this.pnlhighscore.Controls.Add(this.lbhighscore);
     this.pnlhighscore.Controls.Add(this.flowLayoutPanel1);
     this.pnlhighscore.Controls.Add(this.label10);
     this.pnlhighscore.Location = new System.Drawing.Point(67, 29);
     this.pnlhighscore.Name     = "pnlhighscore";
     this.pnlhighscore.Size     = new System.Drawing.Size(539, 311);
     this.pnlhighscore.TabIndex = 14;
     this.pnlhighscore.Visible  = false;
     //
     // lbhighscore
     //
     this.lbhighscore.Dock = System.Windows.Forms.DockStyle.Fill;
     this.lbhighscore.FormattingEnabled = true;
     this.lbhighscore.Location          = new System.Drawing.Point(0, 36);
     this.lbhighscore.MultiColumn       = true;
     this.lbhighscore.Name          = "lbhighscore";
     this.lbhighscore.SelectionMode = System.Windows.Forms.SelectionMode.None;
     this.lbhighscore.Size          = new System.Drawing.Size(539, 246);
     this.lbhighscore.TabIndex      = 1;
     //
     // label10
     //
     this.label10.Dock      = System.Windows.Forms.DockStyle.Top;
     this.label10.Location  = new System.Drawing.Point(0, 0);
     this.label10.Name      = "label10";
     this.label10.Size      = new System.Drawing.Size(539, 36);
     this.label10.TabIndex  = 0;
     this.label10.Text      = "{HIGH_SCORES}";
     this.label10.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     //
     // pnlfinalstats
     //
     this.pnlfinalstats.Controls.Add(this.btnplayagain);
     this.pnlfinalstats.Controls.Add(this.lblfinalcodepoints);
     this.pnlfinalstats.Controls.Add(this.Label11);
     this.pnlfinalstats.Controls.Add(this.lblfinalcomputerreward);
     this.pnlfinalstats.Controls.Add(this.Label9);
     this.pnlfinalstats.Controls.Add(this.lblfinallevelreward);
     this.pnlfinalstats.Controls.Add(this.lblfinallevelreached);
     this.pnlfinalstats.Controls.Add(this.lblfinalcodepointswithtext);
     this.pnlfinalstats.Location = new System.Drawing.Point(172, 74);
     this.pnlfinalstats.Name     = "pnlfinalstats";
     this.pnlfinalstats.Size     = new System.Drawing.Size(362, 226);
     this.pnlfinalstats.TabIndex = 9;
     this.pnlfinalstats.Visible  = false;
     //
     // btnplayagain
     //
     this.btnplayagain.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btnplayagain.Location = new System.Drawing.Point(5, 194);
     this.btnplayagain.Name     = "btnplayagain";
     this.btnplayagain.Size     = new System.Drawing.Size(352, 29);
     this.btnplayagain.TabIndex = 16;
     this.btnplayagain.Text     = "{PLAY}";
     this.btnplayagain.UseVisualStyleBackColor = true;
     this.btnplayagain.Click += new System.EventHandler(this.btnplayagain_Click);
     //
     // lblfinalcodepoints
     //
     this.lblfinalcodepoints.Font      = new System.Drawing.Font("Microsoft Sans Serif", 48F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblfinalcodepoints.Location  = new System.Drawing.Point(3, 124);
     this.lblfinalcodepoints.Name      = "lblfinalcodepoints";
     this.lblfinalcodepoints.Size      = new System.Drawing.Size(356, 73);
     this.lblfinalcodepoints.TabIndex  = 15;
     this.lblfinalcodepoints.Text      = "134 CP";
     this.lblfinalcodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // Label11
     //
     this.Label11.AutoSize  = true;
     this.Label11.Font      = new System.Drawing.Font("Microsoft Sans Serif", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label11.Location  = new System.Drawing.Point(162, 82);
     this.Label11.Name      = "Label11";
     this.Label11.Size      = new System.Drawing.Size(33, 33);
     this.Label11.TabIndex  = 14;
     this.Label11.Text      = "+";
     this.Label11.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblfinalcomputerreward
     //
     this.lblfinalcomputerreward.Font      = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblfinalcomputerreward.Location  = new System.Drawing.Point(193, 72);
     this.lblfinalcomputerreward.Name      = "lblfinalcomputerreward";
     this.lblfinalcomputerreward.Size      = new System.Drawing.Size(151, 52);
     this.lblfinalcomputerreward.TabIndex  = 12;
     this.lblfinalcomputerreward.Text      = "34";
     this.lblfinalcomputerreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // Label9
     //
     this.Label9.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label9.Location  = new System.Drawing.Point(179, 31);
     this.Label9.Name      = "Label9";
     this.Label9.Size      = new System.Drawing.Size(180, 49);
     this.Label9.TabIndex  = 11;
     this.Label9.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblfinallevelreward
     //
     this.lblfinallevelreward.Font      = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblfinallevelreward.Location  = new System.Drawing.Point(12, 72);
     this.lblfinallevelreward.Name      = "lblfinallevelreward";
     this.lblfinallevelreward.Size      = new System.Drawing.Size(151, 52);
     this.lblfinallevelreward.TabIndex  = 10;
     this.lblfinallevelreward.Text      = "100";
     this.lblfinallevelreward.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblfinallevelreached
     //
     this.lblfinallevelreached.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblfinallevelreached.Location  = new System.Drawing.Point(3, 31);
     this.lblfinallevelreached.Name      = "lblfinallevelreached";
     this.lblfinallevelreached.Size      = new System.Drawing.Size(170, 49);
     this.lblfinallevelreached.TabIndex  = 9;
     this.lblfinallevelreached.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblfinalcodepointswithtext
     //
     this.lblfinalcodepointswithtext.Font      = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblfinalcodepointswithtext.Location  = new System.Drawing.Point(3, 2);
     this.lblfinalcodepointswithtext.Name      = "lblfinalcodepointswithtext";
     this.lblfinalcodepointswithtext.Size      = new System.Drawing.Size(356, 26);
     this.lblfinalcodepointswithtext.TabIndex  = 1;
     this.lblfinalcodepointswithtext.Text      = "You cashed out with 134 codepoints!";
     this.lblfinalcodepointswithtext.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // pnllose
     //
     this.pnllose.Controls.Add(this.lblmissedout);
     this.pnllose.Controls.Add(this.lblbutyougained);
     this.pnllose.Controls.Add(this.btnlosetryagain);
     this.pnllose.Controls.Add(this.Label5);
     this.pnllose.Controls.Add(this.Label1);
     this.pnllose.Location = new System.Drawing.Point(209, 71);
     this.pnllose.Name     = "pnllose";
     this.pnllose.Size     = new System.Drawing.Size(266, 214);
     this.pnllose.TabIndex = 10;
     this.pnllose.Visible  = false;
     //
     // lblmissedout
     //
     this.lblmissedout.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblmissedout.Location  = new System.Drawing.Point(3, 175);
     this.lblmissedout.Name      = "lblmissedout";
     this.lblmissedout.Size      = new System.Drawing.Size(146, 35);
     this.lblmissedout.TabIndex  = 3;
     this.lblmissedout.Text      = "You Missed Out On: 500 Codepoints";
     this.lblmissedout.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblbutyougained
     //
     if (ShiftoriumFrontend.UpgradeInstalled("pong_upgrade_2"))
     {
         this.lblbutyougained.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
         this.lblbutyougained.Location  = new System.Drawing.Point(3, 125);
         this.lblbutyougained.Name      = "lblbutyougained";
         this.lblbutyougained.Size      = new System.Drawing.Size(146, 35);
         this.lblbutyougained.TabIndex  = 3;
         this.lblbutyougained.Text      = "But you gained 5 Codepoints";
         this.lblbutyougained.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     }
     else
     {
         this.lblbutyougained.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
         this.lblbutyougained.Location  = new System.Drawing.Point(3, 125);
         this.lblbutyougained.Name      = "lblbutyougained";
         this.lblbutyougained.Size      = new System.Drawing.Size(0, 0);
         this.lblbutyougained.TabIndex  = 3;
         this.lblbutyougained.Text      = "But you gained 5 Codepoints";
         this.lblbutyougained.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     }
     //
     // btnlosetryagain
     //
     this.btnlosetryagain.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btnlosetryagain.Location = new System.Drawing.Point(155, 176);
     this.btnlosetryagain.Name     = "btnlosetryagain";
     this.btnlosetryagain.Size     = new System.Drawing.Size(106, 35);
     this.btnlosetryagain.TabIndex = 2;
     this.btnlosetryagain.Text     = "Try Again";
     this.btnlosetryagain.UseVisualStyleBackColor = true;
     this.btnlosetryagain.Click += new System.EventHandler(this.btnlosetryagain_Click);
     //
     // Label5
     //
     this.Label5.Location = new System.Drawing.Point(7, 26);
     this.Label5.Name     = "Label5";
     this.Label5.Size     = new System.Drawing.Size(260, 163);
     this.Label5.TabIndex = 1;
     //
     // Label1
     //
     this.Label1.Dock      = System.Windows.Forms.DockStyle.Top;
     this.Label1.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label1.Location  = new System.Drawing.Point(0, 0);
     this.Label1.Name      = "Label1";
     this.Label1.Size      = new System.Drawing.Size(266, 16);
     this.Label1.TabIndex  = 0;
     this.Label1.Text      = "You lose!";
     this.Label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     //
     // pnlintro
     //
     this.pnlintro.Controls.Add(this.Label6);
     this.pnlintro.Controls.Add(this.btnstartgame);
     this.pnlintro.Controls.Add(this.Label8);
     this.pnlintro.Location = new System.Drawing.Point(52, 29);
     this.pnlintro.Name     = "pnlintro";
     this.pnlintro.Size     = new System.Drawing.Size(595, 303);
     this.pnlintro.TabIndex = 13;
     //
     // Label6
     //
     this.Label6.Font      = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label6.Location  = new System.Drawing.Point(3, 39);
     this.Label6.Name      = "Label6";
     this.Label6.Size      = new System.Drawing.Size(589, 227);
     this.Label6.TabIndex  = 15;
     this.Label6.Text      = "{PONG_DESC}";
     this.Label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     this.Label6.Click    += new System.EventHandler(this.Label6_Click);
     //
     // btnstartgame
     //
     this.btnstartgame.Font     = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.btnstartgame.Location = new System.Drawing.Point(186, 273);
     this.btnstartgame.Name     = "btnstartgame";
     this.btnstartgame.Size     = new System.Drawing.Size(242, 28);
     this.btnstartgame.TabIndex = 15;
     this.btnstartgame.Text     = "{PLAY}";
     this.btnstartgame.UseVisualStyleBackColor = true;
     this.btnstartgame.Click += new System.EventHandler(this.btnstartgame_Click);
     //
     // Label8
     //
     this.Label8.AutoSize  = true;
     this.Label8.Font      = new System.Drawing.Font("Microsoft Sans Serif", 20.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Label8.ForeColor = System.Drawing.Color.Black;
     this.Label8.Location  = new System.Drawing.Point(250, 5);
     this.Label8.Name      = "Label8";
     this.Label8.Size      = new System.Drawing.Size(280, 31);
     this.Label8.TabIndex  = 14;
     this.Label8.Text      = "{PONG_WELCOME}";
     this.Label8.Click    += new System.EventHandler(this.Label8_Click);
     //
     // lblbeatai
     //
     this.lblbeatai.Font      = new System.Drawing.Font("Microsoft Sans Serif", 15.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblbeatai.Location  = new System.Drawing.Point(47, 41);
     this.lblbeatai.Name      = "lblbeatai";
     this.lblbeatai.Size      = new System.Drawing.Size(600, 30);
     this.lblbeatai.TabIndex  = 8;
     this.lblbeatai.Text      = "You got 2 codepoints for beating the Computer!";
     this.lblbeatai.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     this.lblbeatai.Visible   = false;
     //
     // lblcountdown
     //
     this.lblcountdown.Font      = new System.Drawing.Font("Microsoft Sans Serif", 24F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblcountdown.Location  = new System.Drawing.Point(182, 152);
     this.lblcountdown.Name      = "lblcountdown";
     this.lblcountdown.Size      = new System.Drawing.Size(315, 49);
     this.lblcountdown.TabIndex  = 7;
     this.lblcountdown.Text      = "3";
     this.lblcountdown.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     this.lblcountdown.Visible   = false;
     //
     // ball
     //
     this.ball.BackColor   = System.Drawing.Color.Black;
     this.ball.Location    = new System.Drawing.Point(300, 152);
     this.ball.Name        = "ball";
     this.ball.Size        = new System.Drawing.Size(20, 20);
     this.ball.TabIndex    = 2;
     this.ball.MouseEnter += new System.EventHandler(this.ball_MouseEnter);
     this.ball.MouseLeave += new System.EventHandler(this.ball_MouseLeave);
     //
     // paddleHuman
     //
     this.paddleHuman.BackColor = System.Drawing.Color.Black;
     this.paddleHuman.Location  = new System.Drawing.Point(10, 134);
     this.paddleHuman.Name      = "paddleHuman";
     this.paddleHuman.Size      = new System.Drawing.Size(20, 100);
     this.paddleHuman.TabIndex  = 3;
     this.paddleHuman.TabStop   = false;
     //
     // paddleComputer
     //
     this.paddleComputer.Anchor      = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     this.paddleComputer.BackColor   = System.Drawing.Color.Black;
     this.paddleComputer.Location    = new System.Drawing.Point(666, 134);
     this.paddleComputer.MaximumSize = new System.Drawing.Size(20, 100);
     this.paddleComputer.Name        = "paddleComputer";
     this.paddleComputer.Size        = new System.Drawing.Size(20, 100);
     this.paddleComputer.TabIndex    = 1;
     //
     // lbllevelandtime
     //
     this.lbllevelandtime.Dock      = System.Windows.Forms.DockStyle.Top;
     this.lbllevelandtime.Font      = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lbllevelandtime.Location  = new System.Drawing.Point(0, 0);
     this.lbllevelandtime.Name      = "lbllevelandtime";
     this.lbllevelandtime.Size      = new System.Drawing.Size(700, 22);
     this.lbllevelandtime.TabIndex  = 4;
     this.lbllevelandtime.Text      = "Level: 1 - 58 Seconds Left";
     this.lbllevelandtime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblstatscodepoints
     //
     this.lblstatscodepoints.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
                                                                            | System.Windows.Forms.AnchorStyles.Right)));
     this.lblstatscodepoints.Font      = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblstatscodepoints.Location  = new System.Drawing.Point(239, 356);
     this.lblstatscodepoints.Name      = "lblstatscodepoints";
     this.lblstatscodepoints.Size      = new System.Drawing.Size(219, 35);
     this.lblstatscodepoints.TabIndex  = 12;
     this.lblstatscodepoints.Text      = "Codepoints: ";
     this.lblstatscodepoints.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblstatsY
     //
     this.lblstatsY.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     this.lblstatsY.Font      = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblstatsY.Location  = new System.Drawing.Point(542, 356);
     this.lblstatsY.Name      = "lblstatsY";
     this.lblstatsY.Size      = new System.Drawing.Size(144, 35);
     this.lblstatsY.TabIndex  = 11;
     this.lblstatsY.Text      = "Yspeed:";
     this.lblstatsY.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // lblstatsX
     //
     this.lblstatsX.Anchor    = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
     this.lblstatsX.Font      = new System.Drawing.Font("Georgia", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblstatsX.Location  = new System.Drawing.Point(3, 356);
     this.lblstatsX.Name      = "lblstatsX";
     this.lblstatsX.Size      = new System.Drawing.Size(144, 35);
     this.lblstatsX.TabIndex  = 5;
     this.lblstatsX.Text      = "Xspeed: ";
     this.lblstatsX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // flowLayoutPanel1
     //
     this.flowLayoutPanel1.AutoSize     = true;
     this.flowLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.flowLayoutPanel1.Controls.Add(this.button2);
     this.flowLayoutPanel1.Dock          = System.Windows.Forms.DockStyle.Bottom;
     this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
     this.flowLayoutPanel1.Location      = new System.Drawing.Point(0, 282);
     this.flowLayoutPanel1.Name          = "flowLayoutPanel1";
     this.flowLayoutPanel1.Size          = new System.Drawing.Size(539, 29);
     this.flowLayoutPanel1.TabIndex      = 2;
     //
     // button2
     //
     this.button2.AutoSize                = true;
     this.button2.AutoSizeMode            = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     this.button2.Location                = new System.Drawing.Point(476, 3);
     this.button2.Name                    = "button2";
     this.button2.Size                    = new System.Drawing.Size(60, 23);
     this.button2.TabIndex                = 0;
     this.button2.Text                    = "{CLOSE}";
     this.button2.UseVisualStyleBackColor = true;
     this.button2.Click                  += new System.EventHandler(this.button2_Click);
     //
     // Pong
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.BackColor           = System.Drawing.Color.White;
     this.Controls.Add(this.pgcontents);
     this.DoubleBuffered = true;
     this.Name           = "Pong";
     this.Text           = "{PONG_NAME}";
     this.Size           = new System.Drawing.Size(820, 500);
     this.Load          += new System.EventHandler(this.Pong_Load);
     this.MouseMove     += new System.Windows.Forms.MouseEventHandler(this.pongMain_MouseMove);
     this.pgcontents.ResumeLayout(false);
     this.pnlgamestats.ResumeLayout(false);
     this.pnlgamestats.PerformLayout();
     this.pnlhighscore.ResumeLayout(false);
     this.pnlhighscore.PerformLayout();
     this.pnlfinalstats.ResumeLayout(false);
     this.pnlfinalstats.PerformLayout();
     this.pnllose.ResumeLayout(false);
     this.pnlintro.ResumeLayout(false);
     this.pnlintro.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.paddleHuman)).EndInit();
     this.flowLayoutPanel1.ResumeLayout(false);
     this.flowLayoutPanel1.PerformLayout();
     this.ResumeLayout(false);
 }
Exemplo n.º 19
0
 public void OnUpgrade()
 {
     buttonEasy.Visible   = true;
     buttonMedium.Visible = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_medium");
     buttonHard.Visible   = ShiftoriumFrontend.UpgradeInstalled("shiftsweeper_hard");
 }