示例#1
0
        private void showCredits(GUIStyle labelStyle)
        {
            int      num      = 210;
            GUIStyle gUIStyle = new GUIStyle();

            gUIStyle.fontStyle        = FontStyle.Bold;
            gUIStyle.fontSize         = InfoArea.FontSize(16);
            gUIStyle.normal.textColor = Gui.MainColor;
            gUIStyle.wordWrap         = true;
            int num2 = 550;

            InfoArea.scrollPositionLeftSide = GuiBase.TouchScrollView(new Rect(InfoArea.Width(15f), InfoArea.Height((float)num), InfoArea.Width(260f), InfoArea.Height(280f)), InfoArea.scrollPositionLeftSide, new Rect(InfoArea.Width(15f), InfoArea.Height((float)num), InfoArea.Width(235f), InfoArea.Height((float)num2)));
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Idea, Coding, Art and Story"), gUIStyle);
            num += 30;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Denny Stöhr"));
            num += 45;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Story Proofreading"), gUIStyle);
            num += 30;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Quizer (C1-7,13)"));
            num += 25;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Little Girl Blue (C8+9)"));
            num += 25;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Tangrid (C1-9)"));
            num += 25;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Ensignia (C10-13)"));
            num += 25;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Pom6 (C12)"));
            num += 25;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Timothy Chong (C14)"));
            num += 45;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("Music"), gUIStyle);
            num += 30;
            labelStyle.alignment = TextAnchor.UpperLeft;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(30f)), new GUIContent("bearhack"));
            if (GUI.Button(new Rect(InfoArea.Width(130f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(30f)), new GUIContent("SoundCloud")))
            {
                App.OpenWebsite("https://soundcloud.com/bearhack145-953728889");
            }
            num += 50;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(100f)), new GUIContent("Players who helped to improve the game (reported and helped to fix bugs, good ideas)"), gUIStyle);
            num += 100;
            GUI.Label(new Rect(InfoArea.Width(35f), InfoArea.Height((float)num), InfoArea.Width(220f), InfoArea.Height(150f)), new GUIContent("ArtyD42, Pom6, Little Girl Blue, Zongre, Bajablo, mnjiman, Dzugavili, Shadow543211, EuroWolf, Robstradomus, notfromearth, somethingggg, Zongre, elara85"));
            GUI.EndScrollView();
            if (GUI.Button(new Rect(InfoArea.Width(25f), InfoArea.Height(530f), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("Close")))
            {
                this.ShowCredits = false;
            }
        }
示例#2
0
        public void OnGUI()
        {
            if (!InfoArea.ShowArea || GuiBase.LeftDialogIsShowing || GuiBase.FullScreenDialogIsShowing || AfkUi.Instance.ShowAfk)
            {
                return;
            }
            GUI.skin            = Gui.ChosenSkin;
            GUI.backgroundColor = SettingsUi.Instance.UiColor;
            GUI.Box(new Rect(InfoArea.Width(10f), InfoArea.Height(110f), InfoArea.Width(275f), InfoArea.Height(480f)), string.Empty);
            int      num   = 60;
            GUIStyle style = GUI.skin.GetStyle("Button");

            style.fontSize  = InfoArea.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            GUIStyle style2 = GUI.skin.GetStyle("Label");

            style2.fontSize  = InfoArea.FontSize(14);
            style2.fontStyle = FontStyle.Normal;
            style2.alignment = TextAnchor.UpperLeft;
            if (this.TouIsShowing)
            {
                this.showTOU(style2);
                return;
            }
            if (this.ImprintIsShowing)
            {
                this.showLegals(style2);
                return;
            }
            if (this.ShowCredits)
            {
                this.showCredits(style2);
                return;
            }
            if (this.PrivacyIsShowing)
            {
                this.showPrivacy(style2);
                return;
            }
            GUI.BeginGroup(new Rect(InfoArea.Width(25f), InfoArea.Height(140f), InfoArea.Width(265f), InfoArea.Height(490f)));
            float x = InfoArea.Width(2f);

            GUI.Label(new Rect(x, InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(50f)), "Version: 2.13.740\nDate: 2017-08-09");
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Connect", "If you want to connect your online save from kongregate to steam, click here for more info.")))
            {
                InfoArea.ShowConnect = !InfoArea.ShowConnect;
            }
            num += 80;
            string text = Application.dataPath + "/Saves/ManualSave.txt";

            if (App.CurrentPlattform == Plattform.Android)
            {
                text = " the internal storage";
            }
            string text2    = "Save";
            string text3    = "Load";
            string tooltip  = "This will save your game to " + text + ".\nYou can load the save with the 'Load' button. The game will never load this automatically.";
            string tooltip2 = "This will load your game from " + text + ". It does nothing, if this is not a valid save or this file does not exist.";

            if (App.CurrentPlattform == Plattform.Kongregate)
            {
                tooltip  = "This will open a dialog where you can save your game data.";
                tooltip2 = "This will open a dialog where you can select previously saved data.";
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent(text2, tooltip)))
            {
                if (App.CurrentPlattform == Plattform.Kongregate)
                {
                    this.SaveWebGl();
                }
                else
                {
                    this.Save(text);
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent(text3, tooltip2)))
            {
                this.Load();
            }
            num += 45;
            string text4 = "This is an additional online save. The game saves online once every 15 minutes automatically. If you need it to save now, just press the button.";

            if (UpdateStats.LastServerSaveTime > 0L)
            {
                long time = UpdateStats.CurrentTimeMillis() - UpdateStats.LastServerSaveTime;
                text4 = text4 + "\nThe last online save was " + Conv.MsToGuiText(time, true) + " ago.";
            }
            else
            {
                text4 += "\nThe game was not saved online yet since you started the game.";
            }
            text4 = text4 + "\nThe next online save will be in: " + Conv.MsToGuiText(UpdateStats.NextOnlineSaveTime, false);
            string str  = "Kongregate";
            bool   flag = !string.IsNullOrEmpty(App.State.KongUserId);

            if (App.CurrentPlattform == Plattform.Steam)
            {
                str  = "Steam";
                flag = !string.IsNullOrEmpty(App.State.SteamId);
            }
            if (App.CurrentPlattform == Plattform.Android)
            {
                flag = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(115f), InfoArea.Height(35f)), new GUIContent("Save Online", text4)))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.SaveOnline();
                }
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Load Online", "Loads the online save and overwrites your current save. If you lose your local save, this is the way to get back your game state, if there is an online save. You need to do this within 15 minutes, or the autosave will overwrite your online save.")))
            {
                if (!flag)
                {
                    GuiBase.ShowToast("Sorry, you need to be logged in in " + str + " to use this feature.");
                }
                else
                {
                    this.LoadOnline();
                }
            }
            num += 45;
            int num2 = 114;

            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width((float)num2), InfoArea.Height(35f)), new GUIContent("Credits", "A list of contributers to the game.")))
            {
                this.ShowCredits = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(125f), InfoArea.Height((float)num), InfoArea.Width(120f), InfoArea.Height(35f)), new GUIContent("Feedback", "Email the developer to give feedback or report bugs.")))
            {
                this.SendEmail();
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("My Other Games", "Opens my website to show the other games I made.\nBecause it only works as either a popup or it would replace the page, it is shown as a popup. So make sure to view blocked popups if your browser blocks it.")))
            {
                App.OpenWebsite("https://shugasu.com/games");
            }
            num += 45;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Legals")))
            {
                this.ImprintIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(85f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("TOU")))
            {
                this.TouIsShowing = true;
            }
            if (GUI.Button(new Rect(InfoArea.Width(170f), InfoArea.Height((float)num), InfoArea.Width(75f), InfoArea.Height(35f)), new GUIContent("Privacy")))
            {
                this.PrivacyIsShowing = true;
            }
            num += 70;
            if (GUI.Button(new Rect(InfoArea.Width(0f), InfoArea.Height((float)num), InfoArea.Width(245f), InfoArea.Height(35f)), new GUIContent("Reset game", "This will reset all stats and multipliers to the base values.")))
            {
                this.ResetGame();
            }
            GUI.EndGroup();
            InfoArea.InfoAreaTooltip = GUI.tooltip;
        }