コード例 #1
0
        protected void AddInputButton(int marginLeft, int marginTop, int number)
        {
            string text = number.ToString();

            if (number == -1)
            {
                text = "Clear";
            }
            else if (number == -2)
            {
                text = "<-";
            }
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(60f), GuiBase.Height(30f)), text))
            {
                if (number == -1)
                {
                    GuiBase.NumberInputNumber = 0;
                }
                else if (number == -2)
                {
                    GuiBase.NumberInputNumber /= 10;
                    GuiBase.NumberInputNumber.Floor();
                }
                else
                {
                    GuiBase.NumberInputNumber = GuiBase.NumberInputNumber * 10 + number;
                    if (GuiBase.NumberInputNumber > GuiBase.NumberInputMaxNumber && GuiBase.NumberInputMaxNumber > 0)
                    {
                        GuiBase.NumberInputNumber = GuiBase.NumberInputMaxNumber;
                    }
                }
            }
        }
コード例 #2
0
 protected void NumberInput(int marginLeft = 500, int marginTop = 200)
 {
     GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(350f), GuiBase.Height(50f)), GuiBase.NumberInputText);
     marginTop += 50;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), GuiBase.NumberInputNumber.GuiText, Gui.ChosenSkin.textField);
     marginTop += 40;
     this.AddInputButton(marginLeft, marginTop, 1);
     this.AddInputButton(marginLeft + 70, marginTop, 2);
     this.AddInputButton(marginLeft + 140, marginTop, 3);
     this.AddInputButton(marginLeft, marginTop + 35, 4);
     this.AddInputButton(marginLeft + 70, marginTop + 35, 5);
     this.AddInputButton(marginLeft + 140, marginTop + 35, 6);
     this.AddInputButton(marginLeft, marginTop + 70, 7);
     this.AddInputButton(marginLeft + 70, marginTop + 70, 8);
     this.AddInputButton(marginLeft + 140, marginTop + 70, 9);
     this.AddInputButton(marginLeft, marginTop + 105, 0);
     this.AddInputButton(marginLeft + 70, marginTop + 105, -1);
     this.AddInputButton(marginLeft + 140, marginTop + 105, -2);
     if (GUI.Button(new Rect(GuiBase.Width((float)(marginLeft + 105)), GuiBase.Height((float)(marginTop + 145)), GuiBase.Width(95f), GuiBase.Height(30f)), "OK"))
     {
         GuiBase.NumberInputAction(GuiBase.NumberInputNumber);
         this.ResetNumberInput();
     }
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)(marginTop + 145)), GuiBase.Width(95f), GuiBase.Height(30f)), "Cancel"))
     {
         this.ResetNumberInput();
     }
 }
コード例 #3
0
        private int addBPRow(string name, ref int marginTop, int value)
        {
            int result = value;

            GUI.Label(new Rect(GuiBase.Width(40f), GuiBase.Height((float)marginTop), GuiBase.Width(150f), GuiBase.Height(30f)), name);
            GUI.Label(new Rect(GuiBase.Width(180f), GuiBase.Height((float)marginTop), GuiBase.Width(150f), GuiBase.Height(30f)), "level: " + value);
            if (App.State.HomePlanet.BaalPower >= 1 && GUI.Button(new Rect(GuiBase.Width(300f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+1"))
            {
                App.State.HomePlanet.BaalPower--;
                result = value + 1;
            }
            if (App.State.HomePlanet.BaalPower >= 5 && GUI.Button(new Rect(GuiBase.Width(350f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+5"))
            {
                App.State.HomePlanet.BaalPower -= 5;
                result = value + 5;
            }
            if (App.State.HomePlanet.BaalPower >= 10 && GUI.Button(new Rect(GuiBase.Width(400f), GuiBase.Height((float)marginTop), GuiBase.Width(45f), GuiBase.Height(30f)), "+10"))
            {
                App.State.HomePlanet.BaalPower -= 10;
                result = value + 10;
            }
            if (App.State.HomePlanet.BaalPower >= 50 && GUI.Button(new Rect(GuiBase.Width(455f), GuiBase.Height((float)marginTop), GuiBase.Width(45f), GuiBase.Height(30f)), "+50"))
            {
                App.State.HomePlanet.BaalPower -= 50;
                result = value + 50;
            }
            marginTop += 30;
            return(result);
        }
コード例 #4
0
        public void show()
        {
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(16);
            GUI.BeginGroup(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(15f), GuiBase.Width(400f), GuiBase.Height(30f)), new GUIContent("For more in depth guides, please visit the forum"));
            if (GUI.Button(new Rect(GuiBase.Width(420f), GuiBase.Height(15f), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Forum", "In the Sticky: Game Guides there are various guides for the game.")))
            {
                App.OpenWebsite("http://www.kongregate.com/forums/2874-idling-to-rule-the-gods/topics/609942-game-guides");
            }
            if (GUI.Button(new Rect(GuiBase.Width(520f), GuiBase.Height(15f), GuiBase.Width(80f), GuiBase.Height(30f)), new GUIContent("Wiki", "A wiki with info and tips about this game.")))
            {
                App.OpenWebsite("http://itrtg.wikia.com/wiki/Idling_to_Rule_the_Gods_Wiki");
            }
            TextAsset textAsset = Resources.Load("faq") as TextAsset;
            string    text      = textAsset.text;
            GUIStyle  gUIStyle  = new GUIStyle();

            gUIStyle.richText = true;
            int num = (int)style.CalcHeight(new GUIContent(text), GuiBase.Width(590f));

            this.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(0f), GuiBase.Height(55f), GuiBase.Width(640f), GuiBase.Height(400f)), this.scrollPosition, new Rect(0f, GuiBase.Height(15f), GuiBase.Width(620f), (float)num + GuiBase.Height(60f)));
            style.fontStyle     = FontStyle.Normal;
            style.alignment     = TextAnchor.UpperLeft;
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(30f), GuiBase.Width(590f), (float)num + GuiBase.Height(60f)), text);
            GUI.EndScrollView();
            GUI.EndGroup();
        }
コード例 #5
0
 public void SetDifficulty(int level)
 {
     this.MissCount   = 0;
     this.hitAreaLeft = UnityEngine.Random.Range(20, (int)(this.totalWith - 30f));
     this.hitAreaWith = 20 - level / 8;
     if (this.hitAreaWith < 3)
     {
         this.hitAreaWith = 3;
     }
     this.hitAreaWith += App.State.PremiumBoni.TbsExtraPixels;
     if (this.TypeEnum == TBSUi.HitType.bottom || this.TypeEnum == TBSUi.HitType.top)
     {
         this.hitAreaWith = (int)GuiBase.Height((float)this.hitAreaWith);
     }
     else
     {
         this.hitAreaWith = (int)GuiBase.Width((float)this.hitAreaWith);
     }
     this.progressSpeed = 0.5f + 0.1f * (float)level / 5f;
     if (this.progressSpeed > 1.5f)
     {
         this.progressSpeed = 1.5f;
     }
     this.progressSpeed = this.progressSpeed * this.totalWith / 100f;
 }
コード例 #6
0
        private void ShowKongregateConnect(int marginLeft, int marginTop)
        {
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Kongregate an input the Kongregate Name and Id to the input-fields below.");
            marginTop += 60;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Id: ");
            string s = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongIdInput.ToString());

            long.TryParse(s, out ConnectArea.KongIdInput);
            marginTop += 40;
            GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Kongregate Name: ");
            ConnectArea.KongNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.KongNameInput);
            marginTop += 60;
            if (App.CurrentPlattform == Plattform.Steam)
            {
                GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "If you get the Kongregate Save, you can't get achievements in Steam!");
                marginTop += 35;
            }
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Kongregate Save", "This will overwrite your current save, then import the online save from Kongregate, if the id and name are correct. Loading online in Kongregate will then connect your saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.GetKongSaveAfterConnecting = true;
            }
            marginTop += 40;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Kongregate Save", "This will overwrite your Kongregate online save if the id and name are correct. Loading online in Kongregate will then move your current save to Kongregate and connect the saves.")))
            {
                UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
                UpdateStats.OverwriteKongSave = true;
            }
        }
コード例 #7
0
 private static void ShowTextBox(string textToShow, bool isFromInfoArea = false)
 {
     if (!string.IsNullOrEmpty(textToShow))
     {
         GUIStyle style = GUI.skin.GetStyle("Label");
         style.fontSize  = GuiBase.FontSize(15);
         style.alignment = TextAnchor.UpperLeft;
         float    x      = Input.mousePosition.x;
         float    num    = (float)Screen.height - Input.mousePosition.y;
         Vector2  vector = new Vector2(x, num);
         float    num2   = GuiBase.Width(275f);
         float    width  = GuiBase.Width(260f);
         string   text   = string.Empty;
         string   text2  = string.Empty;
         string[] array  = textToShow.Split(new string[]
         {
             "lowerText"
         }, StringSplitOptions.None);
         if (array.Length != 2)
         {
             text = textToShow;
         }
         else
         {
             text  = array[0];
             text2 = array[1];
         }
         float num3 = style.CalcHeight(new GUIContent(text), width) + GuiBase.Height(10f);
         float num4 = 0f;
         if (!string.IsNullOrEmpty(text2))
         {
             num4 = style.CalcHeight(new GUIContent(text2), width) + GuiBase.Height(10f);
         }
         float num5 = vector.x - num2 - 5f;
         float num6 = vector.y - num3 - num4 + GuiBase.Height(20f);
         float num7 = num2;
         if (x < num7 || AfkUi.Instance.ShowAfk)
         {
             num5 = vector.x + GuiBase.Width(20f);
         }
         if (num < num3 + num4)
         {
             num6 = vector.y - GuiBase.Height(10f);
         }
         if (isFromInfoArea)
         {
             num5  = GuiBase.Width(10f);
             num6 -= GuiBase.Height(30f);
         }
         GUI.Box(new Rect(num5, num6, num2, num3), string.Empty);
         GUI.Label(new Rect(num5 + GuiBase.Width(10f), num6 + GuiBase.Height(5f), width, num3 - GuiBase.Height(10f)), text);
         if (!string.IsNullOrEmpty(text2))
         {
             style.fontSize = GuiBase.FontSize(13);
             num4           = style.CalcHeight(new GUIContent(text2), width) + GuiBase.Height(10f);
             GUI.Box(new Rect(num5, num6 + num3, num2, num4), string.Empty);
             GUI.Label(new Rect(num5 + GuiBase.Width(10f), num6 + num3 + GuiBase.Height(5f), width, num4), text2);
         }
     }
 }
コード例 #8
0
 private int AddLine(int marginTop, string left, string right, string info, int height = 30)
 {
     GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)marginTop), GuiBase.Width(300f), GuiBase.Height((float)height)), new GUIContent(left, info));
     GUI.Label(new Rect(GuiBase.Width(320f), GuiBase.Height((float)marginTop), GuiBase.Width(300f), GuiBase.Height((float)height)), new GUIContent(right, info));
     marginTop += 23;
     return(marginTop);
 }
コード例 #9
0
 private static int AddItem(string text, string dialogText, int marginTop, int cost, GUIStyle labelStyle, Action result)
 {
     GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height((float)marginTop), GuiBase.Width(390f), GuiBase.Height(130f)), text);
     GUI.Label(new Rect(GuiBase.Width(590f), GuiBase.Height((float)marginTop), GuiBase.Width(32f), GuiBase.Height(32f)), GodPowerUi.godPower);
     if (GUI.Button(new Rect(GuiBase.Width(420f), GuiBase.Height((float)marginTop), GuiBase.Width(140f), GuiBase.Height(28f)), new GUIContent("Get it for " + cost)))
     {
         GuiBase.ShowDialog("Are you sure?", string.Concat(new object[]
         {
             "This will use up ",
             cost,
             " god power and ",
             dialogText
         }), delegate
         {
             if (GodPowerUi.SpendGodPower(cost))
             {
                 result();
                 App.SaveGameState();
             }
         }, delegate
         {
         }, "Yes", "No", false, false);
     }
     return(marginTop + 30);
 }
コード例 #10
0
 protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
 {
     labelStyle.alignment = TextAnchor.MiddleLeft;
     labelStyle.fontStyle = FontStyle.Normal;
     labelStyle.fontSize  = GuiBase.FontSize(16);
     GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height(40f), GuiBase.Width(200f), GuiBase.Height(30f)), new GUIContent("Stop after finish", "If this is on, clones will be removed from monuments when it is finished. This will ignore the number in 'Stop at'."));
     App.State.GameSettings.StopMonumentBuilding = GUI.Toggle(new Rect(GuiBase.Width(200f), GuiBase.Height(47f), GuiBase.Width(300f), GuiBase.Height(30f)), App.State.GameSettings.StopMonumentBuilding, new GUIContent(string.Empty));
     if (App.State.IsBuyUnlocked)
     {
         string text = "If this is on, missing creations will be bought automatically if you have enough divinity.";
         if (App.State.PremiumBoni.AutoBuyCostReduction < 20)
         {
             text = string.Concat(new object[]
             {
                 text,
                 "\nBut beware: there is an additional ",
                 20 - App.State.PremiumBoni.AutoBuyCostReduction,
                 "% transaction fee!"
             });
         }
         GUI.Label(new Rect(GuiBase.Width(365f), GuiBase.Height(40f), GuiBase.Width(220f), GuiBase.Height(30f)), new GUIContent("Auto buy missing creations", text));
         App.State.GameSettings.AutoBuyCreationsForMonuments = GUI.Toggle(new Rect(GuiBase.Width(593f), GuiBase.Height(47f), GuiBase.Width(300f), GuiBase.Height(30f)), App.State.GameSettings.AutoBuyCreationsForMonuments, new GUIContent(string.Empty));
     }
     labelStyle.alignment = TextAnchor.UpperCenter;
     labelStyle.fontStyle = FontStyle.Bold;
     labelStyle.fontSize  = GuiBase.FontSize(18);
     marginTop           += 5;
     GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), new GUIContent("Monument", "All monuments share the same multiplier. That means, if one monument multiplies a stat with 1 + 200 and another one multiplies it with 1 + 400, it would be a total multiplier of 601."));
     GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Count", labelStyle);
     GUI.Label(new Rect(GuiBase.Width(290f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Next At", "If your monument count is at least as much as the count in the input-field, the clones will be moved to the next monument if the next monument has neither 0 as an input nor the level has reached that number. '0' is not limited."), labelStyle);
     GUI.Label(new Rect(GuiBase.Width(380f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), "Clones", labelStyle);
     labelStyle.fontSize = GuiBase.FontSize(16);
 }
コード例 #11
0
        private static void ShowTextBoxOnTop(string infotext)
        {
            GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(10f), GuiBase.Width(660f), GuiBase.Height(95f)), string.Empty);
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize  = GuiBase.FontSize(12);
            style.alignment = TextAnchor.UpperLeft;
            int num  = 12;
            int num2 = 300;
            int num3 = 650;

            string[] array = infotext.Split(new string[]
            {
                "lowerText"
            }, StringSplitOptions.None);
            string text = string.Empty;

            if (array.Length > 0)
            {
                text = array[0];
            }
            if (array.Length == 2)
            {
                text = text + "\n" + array[1].Replace("\n", " - ");
                if (text.Contains(" - Defense") || text.Contains("Clones) - "))
                {
                    text = text.Replace(" - Defense", "\nDefense:");
                    text = text.Replace("Clones) - ", "Clones)\n");
                }
            }
            GUI.Label(new Rect(GuiBase.Width((float)num2), GuiBase.Height((float)num), GuiBase.Width((float)num3), GuiBase.Height(110f)), text);
        }
コード例 #12
0
        public static void ShowDialog(string header, string text, Action leftButton, Action rightButton, string leftButtonText = "Yes", string rightButtonText = "No", bool fullScreen = false, bool notInMainThread = false)
        {
            GuiBase.FullScreenDialogIsShowing = fullScreen;
            GuiBase.LeftDialogIsShowing       = !fullScreen;
            GuiBase.leftAction       = leftButton;
            GuiBase.rightAction      = rightButton;
            GuiBase.leftDialogHeader = header;
            GuiBase.leftDialogText   = text;
            GuiBase.lButtonText      = leftButtonText;
            GuiBase.rButtonText      = rightButtonText;
            if (notInMainThread)
            {
                return;
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize = GuiBase.FontSize(16);
            float width = GuiBase.Width(255f);
            float num   = style.CalcHeight(new GUIContent(text), width);
            float num2  = num + GuiBase.Height(100f);

            if (fullScreen)
            {
                GUI.Box(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), (float)Screen.width, (float)Screen.height), string.Empty);
                GUI.BeginGroup(new Rect(GuiBase.Width(342f), (float)(Screen.height / 2) - num2 / 2f, GuiBase.Width(275f), num2));
                GUI.Box(new Rect(0f, 0f, GuiBase.Width(275f), num2), string.Empty);
            }
            else
            {
                GUI.BeginGroup(new Rect(GuiBase.Width(10f), (float)(Screen.height / 2) - num2 / 2f + GuiBase.Height(40f), GuiBase.Width(285f), num2));
                GUI.Box(new Rect(0f, 0f, GuiBase.Width(275f), num2), string.Empty);
            }
            style.fontSize  = GuiBase.FontSize(18);
            style.alignment = TextAnchor.MiddleCenter;
            style.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(5f), GuiBase.Width(255f), GuiBase.Height(50f)), header);
            style.fontSize  = GuiBase.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            style.alignment = TextAnchor.UpperLeft;
            GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(50f), width, num), text);
            if (GUI.Button(new Rect(GuiBase.Width(10f), num + GuiBase.Height(60f), GuiBase.Width(125f), GuiBase.Height(30f)), GuiBase.lButtonText))
            {
                GuiBase.FullScreenDialogIsShowing = false;
                GuiBase.LeftDialogIsShowing       = false;
                leftButton();
            }
            if (GUI.Button(new Rect(GuiBase.Width(140f), num + GuiBase.Height(60f), GuiBase.Width(125f), GuiBase.Height(30f)), rightButtonText))
            {
                GuiBase.FullScreenDialogIsShowing = false;
                GuiBase.LeftDialogIsShowing       = false;
                if (rightButton != null)
                {
                    rightButton();
                }
            }
            GUI.EndGroup();
        }
コード例 #13
0
 private static void AddHeader(string text, int marginTop, GUIStyle labelStyle)
 {
     labelStyle.fontStyle = FontStyle.Bold;
     labelStyle.alignment = TextAnchor.UpperCenter;
     labelStyle.fontSize  = GuiBase.FontSize(18);
     GUI.Label(new Rect(0f, GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(30f)), text);
     labelStyle.fontSize  = GuiBase.FontSize(15);
     labelStyle.alignment = TextAnchor.UpperLeft;
     labelStyle.fontStyle = FontStyle.Normal;
 }
コード例 #14
0
        private static void addTextField(ref CDouble value, int godPowerleft)
        {
            int    num  = value.ToInt();
            string s    = GUI.TextField(new Rect(GuiBase.Width(180f), GuiBase.Height((float)GodPowerUi.marginTop), GuiBase.Width(60f), GuiBase.Height(25f)), value.ToString());
            int    num2 = 0;

            int.TryParse(s, out num2);
            if (num2 >= 0 && num2 <= godPowerleft + num)
            {
                value = num2;
            }
        }
コード例 #15
0
 private int AddStoryPartButton(KeyValuePair <string, string> part, int marginTop, int marginLeft, int index)
 {
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(280f), GuiBase.Height(30f)), part.Key.Replace("Chapter ", string.Empty).Replace(" Part ", "-")))
     {
         this.shownIndex     = index;
         this.scrollPosition = Vector2.zero;
         this.shownTitle     = part.Key;
         TextAsset textAsset = Resources.Load("Story/" + part.Value) as TextAsset;
         this.shownStory = textAsset.text;
     }
     return(marginTop + 35);
 }
コード例 #16
0
        private void AddLvUpButtons(AfkyGame game, int marginLeft, int marginTop, ref AfkyGame.StatExp power, Action askDialog = null)
        {
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(30f), GuiBase.Height(25f)), new GUIContent(" + ", "Cost: " + power.ExpCostNextLevel.GuiText + " experience.")))
            {
                game.Exp -= power.LevelUp(game.Exp, 1, false);
                this.CheckHighestPower(game);
            }
            marginLeft += 35;
            bool flag = power.ExpCostNext10000Levels > 0 && game.Exp > power.ExpCostNext10000Levels;

            if (!flag)
            {
                if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), new GUIContent(" + 10", "Cost: " + power.ExpCostNext10Levels.GuiText + " experience.")))
                {
                    game.Exp -= power.LevelUp(game.Exp, 10, false);
                    this.CheckHighestPower(game);
                }
                marginLeft += 60;
            }
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), new GUIContent(" + 100", "Cost: " + power.ExpCostNext100Levels.GuiText + " experience.")))
            {
                game.Exp -= power.LevelUp(game.Exp, 100, false);
                this.CheckHighestPower(game);
            }
            marginLeft += 60;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), new GUIContent(" + 1k", "Cost: " + power.ExpCostNext1000Levels.GuiText + " experience.")))
            {
                game.Exp -= power.LevelUp(game.Exp, 1000, false);
                this.CheckHighestPower(game);
            }
            if (flag)
            {
                marginLeft += 60;
                if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(55f), GuiBase.Height(25f)), new GUIContent(" + 10k", "Cost: " + power.ExpCostNext10000Levels.GuiText + " experience.")))
                {
                    game.Exp -= power.LevelUp(game.Exp, 10000, false);
                    this.CheckHighestPower(game);
                }
            }
            marginLeft += 60;
            if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(60f), GuiBase.Height(25f)), new GUIContent(" + Max", "Almost all your experience.")))
            {
                if (askDialog != null)
                {
                    askDialog();
                }
                else
                {
                    game.Exp -= power.LevelUp(game.Exp, 0, true);
                    this.CheckHighestPower(game);
                }
            }
        }
コード例 #17
0
        protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
        {
            labelStyle.alignment = TextAnchor.MiddleLeft;
            labelStyle.fontStyle = FontStyle.Normal;
            labelStyle.fontSize  = GuiBase.FontSize(16);
            if (this.totalPhysicalGain == null)
            {
                this.totalPhysicalGain = new CDouble();
            }
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height(42f), GuiBase.Width(340f), GuiBase.Height(30f)), new GUIContent("Total Physical / s: " + this.totalPhysicalGain.ToGuiText(true), "The total amount of physical you receive each second from all physical trainings."), labelStyle);
            string text = "Next at";

            if (App.State.GameSettings.UseStopAt)
            {
                text = "Stop at";
            }
            GUI.Label(new Rect(GuiBase.Width(390f), GuiBase.Height(42f), GuiBase.Width(60f), GuiBase.Height(30f)), new GUIContent(text, "Clones will be removed automatically if the level on the right input field is reached. \nIt is not that useful, but some people like to have even numbers."));
            if (App.CurrentPlattform == Plattform.Android)
            {
                GUIStyle textField = Gui.ChosenSkin.textField;
                if (GUI.Button(new Rect(GuiBase.Width(470f), GuiBase.Height(43f), GuiBase.Width(100f), GuiBase.Height(25f)), this.StopAtString, textField))
                {
                    base.ShowNumberInput(text, App.State.GameSettings.StopClonesAtTrainings, 9223372036854775807L, delegate(CDouble x)
                    {
                        this.StopAtString = x.ToString();
                        if (App.State.GameSettings.SyncTrainingSkill)
                        {
                            App.State.GameSettings.StopClonesAtSkills = App.State.GameSettings.StopClonesAtTrainings;
                        }
                    });
                }
            }
            else
            {
                this.StopAtString = GUI.TextField(new Rect(GuiBase.Width(470f), GuiBase.Height(43f), GuiBase.Width(100f), GuiBase.Height(25f)), this.StopAtString);
                if (App.State.GameSettings.SyncTrainingSkill)
                {
                    App.State.GameSettings.StopClonesAtSkills = App.State.GameSettings.StopClonesAtTrainings;
                }
            }
            App.State.GameSettings.IsStopAtOnTrainings = GUI.Toggle(new Rect(GuiBase.Width(593f), GuiBase.Height(46f), GuiBase.Width(60f), GuiBase.Height(30f)), App.State.GameSettings.IsStopAtOnTrainings, string.Empty);
            marginTop           += 5;
            labelStyle.alignment = TextAnchor.UpperCenter;
            labelStyle.fontStyle = FontStyle.Bold;
            labelStyle.fontSize  = GuiBase.FontSize(18);
            GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), "Training");
            GUI.Label(new Rect(GuiBase.Width(230f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), "Level", labelStyle);
            GUI.Label(new Rect(GuiBase.Width(330f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), "Clones", labelStyle);
            labelStyle.fontSize = GuiBase.FontSize(16);
            GUI.Label(new Rect(GuiBase.Width(510f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Sync", "If is this is on, clicking + or - will automatically add or remove the same number of clones from skills, if there are clones on the skill, and the skill is unlocked."), labelStyle);
            App.State.GameSettings.SyncTrainingSkill = GUI.Toggle(new Rect(GuiBase.Width(593f), GuiBase.Height((float)(marginTop + 4)), GuiBase.Width(60f), GuiBase.Height(30f)), App.State.GameSettings.SyncTrainingSkill, string.Empty);
        }
コード例 #18
0
 private static void addPurchaseButton(int left, int top, Purchase purchaseId, int count)
 {
     if (GUI.Button(new Rect(GuiBase.Width((float)left), GuiBase.Height((float)top), GuiBase.Width(180f), GuiBase.Height(32f)), new GUIContent(string.Concat(new object[]
     {
         "Buy ",
         count,
         " for ",
         //Purchases.GetPriceText(purchaseId)
     }))))
     {
         SteamHelper.TimerSinceStarted = UpdateStats.CurrentTimeMillis();
         SteamHelper.PurchaseItem(purchaseId);
     }
 }
コード例 #19
0
 public new void Show(bool isAchievement)
 {
     if (!App.State.IsMonumentUnlocked)
     {
         GUI.Box(new Rect(GuiBase.Width(290f), GuiBase.Height(110f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
         GUIStyle style = GUI.skin.GetStyle("Label");
         style.fontSize  = GuiBase.FontSize(16);
         style.alignment = TextAnchor.MiddleCenter;
         GUI.Label(new Rect(GuiBase.Width(310f), GuiBase.Height(150f), GuiBase.Width(640f), GuiBase.Height(30f)), "You need to defeat Diana to unlock monuments.", style);
         return;
     }
     this.IsAchievement = isAchievement;
     base.Show(false);
 }
コード例 #20
0
        private void show()
        {
            GUIStyle style = GUI.skin.GetStyle("Label");

            GUI.BeginGroup(new Rect(GuiBase.Width(280f), GuiBase.Height(110f), GuiBase.Width(670f), GuiBase.Height(480f)));
            GUI.Box(new Rect(GuiBase.Width(10f), GuiBase.Height(0f), GuiBase.Width(660f), GuiBase.Height(480f)), string.Empty);
            style.fontSize  = GuiBase.FontSize(18);
            style.fontStyle = FontStyle.Bold;
            style.alignment = TextAnchor.UpperCenter;
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height(20f), GuiBase.Width(660f), GuiBase.Height(40f)), "Keyboard Shortcuts");
            style.fontSize  = GuiBase.FontSize(16);
            style.fontStyle = FontStyle.Normal;
            style.alignment = TextAnchor.UpperLeft;
            int num = 50;

            this.AddInfoLabel("F1 : Show Shortcuts", ref num, 30);
            this.AddInfoLabel("F2 : Show FAQ", ref num, 30);
            this.AddInfoLabel("F3 : Open the Chat", ref num, 30);
            this.AddInfoLabel("1 : Show Create", ref num, 30);
            this.AddInfoLabel("2 : Show Monuments", ref num, 30);
            this.AddInfoLabel("3 : Show Divinity", ref num, 30);
            this.AddInfoLabel("4 : Show Planet", ref num, 30);
            this.AddInfoLabel("5 : Show Physical", ref num, 30);
            this.AddInfoLabel("6 : Show Skills", ref num, 30);
            this.AddInfoLabel("7 : Show Might", ref num, 30);
            this.AddInfoLabel("8 : Show TBS", ref num, 30);
            this.AddInfoLabel("9 : Show Monster", ref num, 30);
            this.AddInfoLabel("0 : Show Gods", ref num, 30);
            num = 50;
            this.AddInfoLabel("Shift + 1 : Show Special", ref num, 300);
            this.AddInfoLabel("Shift + 2 : Show Statistics", ref num, 300);
            this.AddInfoLabel("Shift + 3 : Show Settings", ref num, 300);
            this.AddInfoLabel("Shift + 4 : Show Story", ref num, 300);
            this.AddInfoLabel("Shift + 5 : Show Pets", ref num, 300);
            if (App.CurrentPlattform == Plattform.Steam)
            {
                this.AddInfoLabel("Esc: Change resolution or quit game", ref num, 300);
            }
            this.AddInfoLabel("Some well-known code: ???", ref num, 300);
            GUI.Label(new Rect(GuiBase.Width(300f), GuiBase.Height((float)num), GuiBase.Width(360f), GuiBase.Height(70f)), "Shift + r : Remove all shadow clones from Monument, Might, Divinity and Planet");
            num += 50;
            GUI.Label(new Rect(GuiBase.Width(300f), GuiBase.Height((float)num), GuiBase.Width(360f), GuiBase.Height(70f)), "Shift + a : Set Clones to add / remove to 'Max'");
            num += 30;
            GUI.Label(new Rect(GuiBase.Width(300f), GuiBase.Height((float)num), GuiBase.Width(360f), GuiBase.Height(70f)), "Right click a number button: reduce the current number by that count.");
            num += 50;
            GUI.Label(new Rect(GuiBase.Width(300f), GuiBase.Height((float)num), GuiBase.Width(360f), GuiBase.Height(70f)), "Right click + at physical / skills: add 28 clones");
            num += 50;
            GUI.EndGroup();
        }
コード例 #21
0
 private void AddAchievementImg(Achievement achievement, int marginLeft, int marginTop, int width)
 {
     if (achievement == null)
     {
         return;
     }
     if (achievement.Reached)
     {
         GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width((float)width), GuiBase.Height((float)width)), new GUIContent(string.Empty, achievement.ImageReached, achievement.Description));
     }
     else
     {
         GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width((float)width), GuiBase.Height((float)width)), new GUIContent(string.Empty, achievement.Image, achievement.Description));
     }
 }
コード例 #22
0
        private void showBPOptions()
        {
            GUIStyle style = GUI.skin.GetStyle("Label");

            GUI.Label(new Rect(GuiBase.Width(40f), GuiBase.Height(50f), GuiBase.Width(250f), GuiBase.Height(30f)), "You have " + App.State.HomePlanet.BaalPower + " Baal Power.");
            style.fontStyle = FontStyle.Normal;
            GUI.Label(new Rect(GuiBase.Width(40f), GuiBase.Height(90f), GuiBase.Width(580f), GuiBase.Height(30f)), "You can spend Baal Power to increase the level by 1 each BP.");
            int num = 130;

            App.State.Crits.EyesNoMirror = this.addBPRow("Eyes (normal)", ref num, App.State.Crits.EyesNoMirror);
            App.State.Crits.Mouth        = this.addBPRow("Mouth", ref num, App.State.Crits.Mouth);
            App.State.Crits.Wings        = this.addBPRow("Wings", ref num, App.State.Crits.Wings);
            App.State.Crits.Tail         = this.addBPRow("Tail", ref num, App.State.Crits.Tail);
            App.State.Crits.Feet         = this.addBPRow("Feet", ref num, App.State.Crits.Feet);
        }
コード例 #23
0
        public void CreateProgressBar(int marginLeft, int marginTop, int width, double current, double max, string name, string mouseOver, GUIStyle labelStyle)
        {
            float num    = GuiBase.Width((float)width);
            float height = GuiBase.Height((float)((int)((double)width / 6.2)));

            GUI.BeginGroup(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), num, height));
            GUI.Label(new Rect(0f, 0f, num, height), SpecialFightUi.coolDownBg);
            float width2 = (float)(current * 100.0 / max) * num / 100f;

            GUI.BeginGroup(new Rect(0f, 0f, width2, height));
            GUI.Label(new Rect(0f, 0f, num, height), SpecialFightUi.coolDownProgress);
            GUI.EndGroup();
            labelStyle.alignment = TextAnchor.MiddleCenter;
            GUI.Label(new Rect(0f, 0f, num, height), new GUIContent(name, mouseOver));
            labelStyle.alignment = TextAnchor.UpperLeft;
            GUI.EndGroup();
        }
コード例 #24
0
        public static void CreateProgressBar(int marginLeft, int marginTop, float width, float height, double percent, string name, string mouseover, Texture2D bgImage, Texture2D fgImage)
        {
            float num  = GuiBase.Width((float)marginLeft);
            float num2 = GuiBase.Height((float)marginTop);

            width  = GuiBase.Width(width);
            height = GuiBase.Height(height - 5f);
            GUI.DrawTexture(new Rect(num, num2, width, height), bgImage);
            GUI.DrawTexture(new Rect(num + GuiBase.Width(1f), num2, (float)(percent * (double)(width - GuiBase.Width(1f))), height - GuiBase.Height(0f)), fgImage);
            GUIStyle style    = GUI.skin.GetStyle("Label");
            GUIStyle gUIStyle = new GUIStyle();

            gUIStyle.alignment        = TextAnchor.MiddleCenter;
            gUIStyle.fontSize         = style.fontSize;
            gUIStyle.normal.textColor = GuiBase.FontColorProgressbar;
            GUI.BeginGroup(new Rect(num, num2 - 2f, width, height));
            GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height(0f), width, height), new GUIContent(name, mouseover), gUIStyle);
            GUI.EndGroup();
        }
コード例 #25
0
        protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
        {
            this.SyncScrollbars  = false;
            labelStyle.alignment = TextAnchor.MiddleLeft;
            labelStyle.fontStyle = FontStyle.Normal;
            labelStyle.fontSize  = GuiBase.FontSize(16);
            string text = "Every 4 Might will increase your Physical, Mystic, Battle and Creating by 1%. \nYou will gain 1 Might for each level gained in this tab.\nTotal Might will not reset on rebirth but you will have to unlock the tab again.\nThe levels below will reset after rebirth.";

            if (App.State.Statistic.OnekChallengesFinished > 0)
            {
                int num = App.State.Statistic.OnekChallengesFinished.ToInt();
                if (num > 40)
                {
                    num = 40;
                }
                text = string.Concat(new object[]
                {
                    text,
                    "\nSpeed multiplier: ",
                    num * 5,
                    " %"
                });
            }
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)(marginTop - 48)), GuiBase.Width(400f), GuiBase.Height(30f)), new GUIContent(string.Concat(new object[]
            {
                "Total Might: ",
                App.State.PremiumBoni.TotalMight,
                " (",
                App.State.PremiumBoni.TotalMight / 4L,
                "%)"
            }), text));
            marginTop           += 5;
            labelStyle.fontStyle = FontStyle.Bold;
            labelStyle.alignment = TextAnchor.UpperCenter;
            labelStyle.fontSize  = GuiBase.FontSize(18);
            GUI.Label(new Rect(GuiBase.Width(15f), GuiBase.Height((float)marginTop), GuiBase.Width(220f), GuiBase.Height(30f)), "Might");
            GUI.Label(new Rect(GuiBase.Width(220f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), "Level", labelStyle);
            GUI.Label(new Rect(GuiBase.Width(290f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), new GUIContent("Next At", "If the level of the might is at least as much as the count in the input-field, the clones will move to the next one. '0' is not limited."), labelStyle);
            GUI.Label(new Rect(GuiBase.Width(380f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), "Clones", labelStyle);
            labelStyle.fontSize = GuiBase.FontSize(16);
        }
コード例 #26
0
        private void ShowBattleFinished()
        {
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize  = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperCenter;
            style.fontStyle = FontStyle.Bold;
            GUI.Label(new Rect(GuiBase.Width(10f), GuiBase.Height(20f), GuiBase.Width(640f), GuiBase.Height(45f)), "Battle finished");
            style.fontStyle = FontStyle.Normal;
            style.alignment = TextAnchor.UpperLeft;
            style.fontSize  = GuiBase.FontSize(14);
            GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(50f), GuiBase.Width(640f), GuiBase.Height(45f)), this.Battle.BattleRewardText);
            if (GUI.Button(new Rect(GuiBase.Width(200f), GuiBase.Height(100f), GuiBase.Width(100f), GuiBase.Height(30f)), "Finish"))
            {
                this.Battle.IsBattleFinished = false;
            }
            string text = "Show Battle log";

            if (this.showLog)
            {
                text = "Hide Battle log";
            }
            if (GUI.Button(new Rect(GuiBase.Width(20f), GuiBase.Height(100f), GuiBase.Width(150f), GuiBase.Height(30f)), text))
            {
                this.showLog = !this.showLog;
            }
            if (this.showLog)
            {
                int           num           = 150;
                StringBuilder stringBuilder = new StringBuilder();
                foreach (string current in this.Battle.FightingLog)
                {
                    stringBuilder.Append(current).Append("\n");
                }
                string text2 = stringBuilder.ToString();
                int    num2  = (int)style.CalcHeight(new GUIContent(text2), GuiBase.Width(600f));
                SpecialFightUi.scrollPosition = GuiBase.TouchScrollView(new Rect(GuiBase.Width(20f), GuiBase.Height(150f), GuiBase.Width(630f), GuiBase.Height(320f)), SpecialFightUi.scrollPosition, new Rect(0f, GuiBase.Height(150f), GuiBase.Width(600f), GuiBase.Height((float)num2)));
                GUI.Label(new Rect(GuiBase.Width(0f), GuiBase.Height((float)(num - 2)), GuiBase.Width(600f), (float)num2), text2, style);
                GUI.EndScrollView();
            }
        }
コード例 #27
0
 private void addPowerSurge(int marginTop, GUIStyle labelStyle)
 {
     GuiBase.CreateProgressBar(marginTop, App.State.HomePlanet.Percent, "Powersurge", string.Concat(new object[]
     {
         "Adjust clones here to get more power!\nOne Shadow Clone generates (1 + planet level) power / hour. 100k power will increase your Stat Multiplier by 1.lowerText",
         App.State.HomePlanet.ProgressInfo,
         "\nPowerbonus for Fights: ",
         App.State.HomePlanet.PowerSurgeBoni / 2,
         " %"
     }), GuiBase.progressBg, GuiBase.progressFgGreen);
     GUI.Label(new Rect(GuiBase.Width(230f), GuiBase.Height((float)marginTop), GuiBase.Width(110f), GuiBase.Height(30f)), new GUIContent("Clones", "All clones here will be also used for UB-Fights if you start a fight."), labelStyle);
     GUI.Label(new Rect(GuiBase.Width(340f), GuiBase.Height((float)marginTop), GuiBase.Width(100f), GuiBase.Height(30f)), string.Empty + App.State.HomePlanet.ShadowCloneCount.CommaFormatted, labelStyle);
     if (GUI.Button(new Rect(GuiBase.Width(450f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "+"))
     {
         App.State.HomePlanet.AddCloneCount(App.State.GameSettings.ClonesToAddCount);
     }
     if (GUI.Button(new Rect(GuiBase.Width(500f), GuiBase.Height((float)marginTop), GuiBase.Width(40f), GuiBase.Height(30f)), "-"))
     {
         App.State.HomePlanet.RemoveCloneCount(App.State.GameSettings.ClonesToAddCount);
     }
 }
コード例 #28
0
        protected void showAchievementReached()
        {
            if ((GuiBase.achievementToShow == null && string.IsNullOrEmpty(GuiBase.unlockedContent)) || !App.State.GameSettings.ShowAchievementPopups)
            {
                return;
            }
            GUIStyle style = GUI.skin.GetStyle("Label");

            style.fontSize  = GuiBase.FontSize(16);
            style.alignment = TextAnchor.UpperLeft;
            if (App.State.GameSettings.AchievementsOnTop)
            {
                GUI.BeginGroup(new Rect(GuiBase.Width(540f), GuiBase.Height(10f), GuiBase.Width(410f), GuiBase.Height(240f)));
            }
            else
            {
                GUI.BeginGroup(new Rect(0f, GuiBase.Height(270f), GuiBase.Width(410f), GuiBase.Height(240f)));
            }
            Rect position = new Rect(GuiBase.Width(10f), 0f, GuiBase.Width(400f), GuiBase.Height(120f));

            if (!string.IsNullOrEmpty(GuiBase.unlockedContent))
            {
                GUI.Box(position, "New content unlocked!");
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(35f), GuiBase.Width(360f), GuiBase.Height(80f)), GuiBase.unlockedContent);
            }
            else
            {
                GUI.Box(position, "Achievement reached!");
                GUI.Label(new Rect(GuiBase.Width(20f), GuiBase.Height(30f), GuiBase.Width(60f), GuiBase.Height(60f)), GuiBase.achievementToShow.ImageReached);
                GUI.Label(new Rect(GuiBase.Width(80f), GuiBase.Height(35f), GuiBase.Width(300f), GuiBase.Height(80f)), GuiBase.achievementToShow.Description);
            }
            long num = DateTime.Now.Ticks / 10000L;

            if (num - GuiBase.achievementShowTimer > 5000L || (position.Contains(Event.current.mousePosition) && Event.current.button == 0 && Event.current.type == EventType.MouseDown))
            {
                GuiBase.achievementToShow = null;
                GuiBase.unlockedContent   = string.Empty;
            }
            GUI.EndGroup();
        }
コード例 #29
0
 private void ShowAndroidConnect(int marginLeft, int marginTop)
 {
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Please open the game on Android an input the Android Name and Id to the input-fields below.");
     marginTop += 60;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Id: ");
     ConnectArea.AndroidIdInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidIdInput);
     marginTop += 40;
     GUI.Label(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(600f), GuiBase.Height(230f)), "Android Name: ");
     ConnectArea.AndroidNameInput = GUI.TextField(new Rect(GuiBase.Width((float)(marginLeft + 180)), GuiBase.Height((float)marginTop), GuiBase.Width(200f), GuiBase.Height(30f)), ConnectArea.AndroidNameInput);
     marginTop += 50;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Get Android Save", "This will overwrite your current save, then import the online save from Android, if the id and name are correct. Loading online in Android will then connect your saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.GetAndroidSaveAfterConnecting = true;
     }
     marginTop += 40;
     if (GUI.Button(new Rect(GuiBase.Width((float)marginLeft), GuiBase.Height((float)marginTop), GuiBase.Width(250f), GuiBase.Height(30f)), new GUIContent("Overwrite Android Save", "This will overwrite your Android online save if the id and name are correct. Loading online in Android will then move your current save to Android and connect the saves.")))
     {
         UpdateStats.LoadFromServer(UpdateStats.ServerSaveType.Automatic);
         UpdateStats.OverwriteAndroidSave = true;
     }
 }
コード例 #30
0
        protected override void ShowLabels(int marginTop, GUIStyle labelStyle)
        {
            this.SyncScrollbars       = false;
            labelStyle.alignment      = TextAnchor.MiddleLeft;
            labelStyle.fontStyle      = FontStyle.Bold;
            labelStyle.fontSize       = GuiBase.FontSize(18);
            PlanetUi.ToolbarIntPlanet = GUI.Toolbar(new Rect(GuiBase.Width(320f), GuiBase.Height(45f), GuiBase.Width(330f), GuiBase.Height(25f)), PlanetUi.ToolbarIntPlanet, this.toolbarStringsPlanet);
            marginTop += 5;
            string text = "Info";

            if (this.showInfo)
            {
                text = "Back";
            }
            if (GUI.Button(new Rect(GuiBase.Width(560f), GuiBase.Height((float)marginTop), GuiBase.Width(80f), GuiBase.Height(30f)), text))
            {
                this.showInfo = !this.showInfo;
            }
            GUI.Label(new Rect(GuiBase.Width(30f), GuiBase.Height((float)marginTop), GuiBase.Width(500f), GuiBase.Height(30f)), "Crystal Factory");
            labelStyle.fontSize  = GuiBase.FontSize(16);
            labelStyle.fontStyle = FontStyle.Normal;
        }