Exemplo n.º 1
0
        private void DrawGeneralPage()
        {
            //Left
            left.Reset();
            LabelCenter(left, locale["game"], true);
            ToggleButton(left, Settings.InvertY, locale["inverty"], true);
            HorizontalSlider(left, Settings.MouseSensivity, locale.Format("sensivity", (Settings.MouseSensivity.Value * 100f).ToString("F0") + "%"), 0.01f, 1f, Style.LabelOffsetSlider, true);
            HorizontalSlider(left, Settings.CameraDistance, locale.Format("distance", Settings.CameraDistance.Value.ToString("F2")), Style.LabelOffsetSlider, true);

            ToggleButton(left, Settings.Minimap, locale["minimap"], true);
            ToggleButton(left, Settings.GameFeed, locale["gameFeed"], true);
            left.MoveY();
            LabelCenter(left, locale["audio"], true);
            HorizontalSlider(left, Settings.SoundLevel, locale.Format("overallAudio", (Settings.SoundLevel.Value * 100f).ToString("F0") + "%"), 0f, 1f, Style.LabelOffsetSlider, true);
            left.MoveY();
            LabelCenter(left, locale["snapshots"], true);
            ToggleButton(left, Settings.Snapshots, locale["snapshotsEnabled"], true);
            if (Settings.Snapshots.Value)
            {
                ToggleButton(left, Settings.SnapshotsInGame, Style.LabelSpace + locale["snapshotsShow"], true);
                TextField(left, Settings.SnapshotsDamage, Style.LabelSpace + locale["snapshotsDmg"], Style.BigLabelOffset, true);
            }

            //Right
            right.Reset();
            LabelCenter(right, locale["others"], true);
            ToggleButton(right, Settings.Speedometer, locale["speedometer"], true);
            if (Settings.Speedometer.Value)
            {
                SelectionGrid(right, Settings.SpeedometerType, locale.GetArray("speedometerTypes"), 2, true);
            }
        }
Exemplo n.º 2
0
        private bool PauseButton(SmartRect rect, string key)
        {
            bool res = UnityEngine.GUI.Button(rect.ToRect(), locale[key], pauseStyle);

            rect.MoveY();
            return(res);
        }
Exemplo n.º 3
0
        public static float BombStatSlider(SmartRect position, float value, string label, float offset, float step, float min, float max, bool move = true)
        {
            if (offset > 0f)
            {
                UnityEngine.GUI.Label(position.ToRect(), label, Style.Label);
                position.MoveOffsetX(offset);
            }

            value = UnityEngine.GUI.HorizontalSlider(position.ToRect(), value, min, max, Style.Slider, Style.SliderBody);
            position.ResetX();
            if (move)
            {
                position.MoveY();
            }

            if (step == 0.5f)
            {
                int   low  = Mathf.FloorToInt(value);
                float diff = value - low;
                if (diff >= 0.25f && diff < 0.75f)
                {
                    return(low + 0.5f);
                }
                else
                {
                    return(Mathf.RoundToInt(value));
                }
            }
            else
            {
                return((int)value);
            }
        }
Exemplo n.º 4
0
 public static void Box(SmartRect position, string text, bool move = true)
 {
     UGUI.Box(position.ToRect(), text, Style.Box);
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 5
0
 public static void DrawTexture(SmartRect position, Texture tex, bool move = false)
 {
     UGUI.DrawTexture(position.ToRect(), tex);
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 6
0
 public static void LabelCenter(SmartRect position, string content, bool move = false)
 {
     UGUI.Label(position.ToRect(), content, Style.LabelCenter);
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 7
0
 public static Vector2 BeginScrollView(SmartRect position, Vector2 scrollView, Rect viewRect, bool alwaysHorizontal, bool alwaysVertical, bool move = false)
 {
     scrollView = UGUI.BeginScrollView(position.ToRect(), scrollView, viewRect, alwaysHorizontal, alwaysVertical, Style.ScrollView, Style.ScrollView);
     if (move)
     {
         position.MoveY();
     }
     return(scrollView);
 }
Exemplo n.º 8
0
        public static bool Button(SmartRect position, string text, bool move = true)
        {
            bool value = UGUI.Button(position.ToRect(), text, Style.Button);

            if (move)
            {
                position.MoveY();
            }
            return(value);
        }
Exemplo n.º 9
0
        private void AdvancedSettings()
        {
            right.Reset();
            LabelCenter(right, locale["advancedHead"], true);
            TextField(right, User.DieName, locale["diename"], Style.LabelOffset, true);
            TextField(right, User.RaceFinish, locale["raceFinish"], Style.LabelOffset, true);
            TextField(right, User.DieNameFormat, locale["dieStyle"], Style.LabelOffset, true);
            TextField(right, User.WaveFormat, locale["wave"], Style.LabelOffset, true);
            right.MoveY();
            LabelCenter(right, locale["chatSettings"], true);
            TextField(right, User.ChatFormat, locale["chatFormat"], Style.LabelOffset, true);
            TextField(right, User.ChatPmFormat, locale["chatPMFormat"], Style.LabelOffset, true);
            LabelCenter(right, locale["chatFormatSend"], true);
            TextField(right, User.ChatFormatSend, string.Empty, 0f, true);
            LabelCenter(right, locale["chatPMFormatSend"], true);
            TextField(right, User.ChatPmFormatSend, string.Empty, 0f, true);
            right.MoveY();
            LabelCenter(right, locale["others"], true);
            LabelCenter(right, locale["restart"], true);
            TextField(right, User.RestartMessage, string.Empty, 0f, true);
            LabelCenter(right, locale["mcswitch"], true);
            TextField(right, User.McSwitch, string.Empty, 0f, true);

            right.MoveToEndY(WindowPosition, Style.Height * 2f + Style.VerticalMargin);
            if (Button(right, locale["preview"], true))
            {
                pageSelection = PreviewPage;
                return;
            }
            right.BeginHorizontal(2);
            if (Button(right, locale["btnToMain"], false))
            {
                pageSelection = MainPage;
                return;
            }
            right.MoveX();
            if (Button(right, locale["btnBack"], false))
            {
                Disable();
                return;
            }
        }
Exemplo n.º 10
0
        private bool Button(string key)
        {
            if (rect == null)
            {
                return(false);
            }
            bool result = UnityEngine.GUI.Button(rect.ToRect(), locale.Get(key), style);

            rect.MoveY();
            return(result);
        }
Exemplo n.º 11
0
 public static void Toggle(SmartRect position, Setting <bool> val, string label, float offset, bool move = false)
 {
     UGUI.Label(position.ToRect(), label, Style.Label);
     position.MoveOffsetX(position.width - Style.Height);
     val.Value = UGUI.Toggle(position.ToRect(), val.Value, string.Empty, Style.Toggle);
     position.ResetX();
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 12
0
 public static void DropdownMenuScrollable(GUIBase baseGUI, SmartRect rect, Setting <int> selection, string[] selections, int showItems, bool move = true)
 {
     if (Button(rect, selections[selection.Value], false))
     {
         ScrollableDropdownSelection.CreateNew(baseGUI, rect.ToRect(), selections, selection, showItems);
     }
     if (move)
     {
         rect.MoveY();
     }
 }
Exemplo n.º 13
0
 public static void DropdownMenu(SmartRect rect, Setting <int> selection, string[] selections, bool move = true)
 {
     if (Button(rect, selections[selection.Value], false))
     {
         DropdownSelection.CreateNew(rect.ToRect(), selections, selection);
     }
     if (move)
     {
         rect.MoveY();
     }
 }
Exemplo n.º 14
0
 public static bool Toggle(SmartRect position, bool val, string label, bool move = false)
 {
     UGUI.Label(position.ToRect(), label, Style.Label);
     position.MoveOffsetX(position.width - Height);
     val = UGUI.Toggle(position.ToRect(), val, string.Empty, Style.Toggle);
     position.ResetX();
     if (move)
     {
         position.MoveY();
     }
     return(val);
 }
Exemplo n.º 15
0
 public static void ToggleButton(SmartRect position, Setting <bool> val, string label, bool move = false)
 {
     UGUI.Label(position.ToRect(), label, Style.Label);
     if (UGUI.Button(position.ToRect(), val.Value ? LabelEnabled : LabelDisabled, Style.TextButton))
     {
         val.Value = !val.Value;
     }
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 16
0
 private void CityPage()
 {
     left.Reset();
     SelectionGrid(left, SkinSettings.CitySkins, locale.GetArray("skinStateSelection"), 3, true);
     left.MoveY();
     DrawControlElements();
 }
Exemplo n.º 17
0
        public static void SelectionGrid(SmartRect position, Setting <int> value, string[] labels, int xCount, bool move = false)
        {
            float old   = position.height;
            int   koeff = (int)(labels.Length / xCount);

            position.height = (old * koeff) + (Style.VerticalMargin * koeff - Style.VerticalMargin);
            value.Value     = UGUI.SelectionGrid(position.ToRect(), value.Value, labels, xCount, Style.SelectionGrid);
            if (move)
            {
                position.MoveY();
            }
            position.height = old;
        }
Exemplo n.º 18
0
        private void DrawAbilityPage()
        {
            rect.Reset();
            rect.MoveY();
            AbilityPage = SelectionGrid(rect, AbilityPage, AbilityLabels, AbilityLabels.Length, true);
            SmartRect[] rects = Helper.GetSmartRects(pagePosition, 2);
            switch (AbilityPage)
            {
            case 0:
                LabelCenter(rects[0], locale["bombStats"], true);
                bombStats.Radius = BombStatSlider(rects[0], bombStats.Radius, locale.Format("bombRad", bombStats.Radius.ToString()),
                                                  Style.LabelOffsetSlider, calculator.RadiusSetting.Step, calculator.RadiusSetting.MinimumLimit, calculator.RadiusSetting.MaximumLimit, true);


                bombStats.Range = BombStatSlider(rects[0], bombStats.Range, locale.Format("bombRange", bombStats.Range.ToString()),
                                                 Style.LabelOffsetSlider, calculator.RangeSetting.Step, calculator.RangeSetting.MinimumLimit, calculator.RangeSetting.MaximumLimit, true);


                bombStats.Speed = BombStatSlider(rects[0], bombStats.Speed, locale.Format("bombSpeed", bombStats.Speed.ToString()),
                                                 Style.LabelOffsetSlider, calculator.SpeedSetting.Step, calculator.SpeedSetting.MinimumLimit, calculator.SpeedSetting.MaximumLimit, true);


                bombStats.Cooldown = BombStatSlider(rects[0], bombStats.Cooldown, locale.Format("bombCd", bombStats.Cooldown.ToString()),
                                                    Style.LabelOffsetSlider, calculator.CooldownSetting.Step, calculator.CooldownSetting.MinimumLimit, calculator.CooldownSetting.MaximumLimit, true);

                //localBombStats[0] = (int)HorizontalSlider(rects[0], localBombStats[0], locale.Format("bombRad", Mathf.RoundToInt(localBombStats[0]).ToString()), 0f, 10f, Style.LabelOffsetSlider, true);
                //localBombStats[1] = (int)HorizontalSlider(rects[0], localBombStats[1], locale.Format("bombRange", Mathf.RoundToInt(localBombStats[1]).ToString()), 0f, 10f, Style.LabelOffsetSlider, true);
                //localBombStats[2] = (int)HorizontalSlider(rects[0], localBombStats[2], locale.Format("bombSpeed", Mathf.RoundToInt(localBombStats[2]).ToString()), 0f, 10f, Style.LabelOffsetSlider, true);
                //localBombStats[3] = (int)HorizontalSlider(rects[0], localBombStats[3], locale.Format("bombCd", Mathf.RoundToInt(localBombStats[3]).ToString()), 0f, 10f, Style.LabelOffsetSlider, true);
                TextField(rects[0], Bomb.BombNameSetting, locale["bombName"], Style.LabelOffset, true);

                LabelCenter(rects[1], locale["bombColor"], true);
                HorizontalSlider(rects[1], Bomb.MyBombColorR, locale["bombColorR"], 0f, 1f, Style.LabelOffsetSlider, true);
                HorizontalSlider(rects[1], Bomb.MyBombColorG, locale["bombColorG"], 0f, 1f, Style.LabelOffsetSlider, true);
                HorizontalSlider(rects[1], Bomb.MyBombColorB, locale["bombColorB"], 0f, 1f, Style.LabelOffsetSlider, true);
                HorizontalSlider(rects[1], Bomb.MyBombColorA, locale["bombColorA"], 0.5f, 1f, Style.LabelOffsetSlider, true);
                break;
            }
        }
Exemplo n.º 19
0
 public static bool ToggleButton(SmartRect position, bool val, string label, bool move = false)
 {
     UGUI.Label(position.ToRect(), label, Style.Label);
     if (UGUI.Button(position.ToRect(), val ? LabelEnabled : LabelDisabled, Style.TextButton))
     {
         val = !val;
     }
     if (move)
     {
         position.MoveY();
     }
     return(val);
 }
Exemplo n.º 20
0
        private void MiscModes()
        {
            left.Reset();
            GameModes.MaxWave.Draw(left, locale);
            left.MoveY();
            GameModes.EndlessRespawn.Draw(left, locale);
            left.MoveY();
            LabelCenter(left, locale["motd"], true);
            TextField(left, GameModes.MOTD, string.Empty, 0f, true);

            right.Reset();
            GameModes.KickEren.Draw(right, locale);
            right.MoveY();
            GameModes.MinimapDisable.Draw(right, locale);
            right.MoveY();
            GameModes.NoGuest.Draw(right, locale);
            right.MoveY();
            GameModes.AntiRevive.Draw(right, locale);
            right.MoveY();
            GameModes.AllowHorses.Draw(right, locale);
            right.MoveY();
            GameModes.AFKKill.Draw(right, locale);
        }
Exemplo n.º 21
0
 public static void DropdownMenuScrollable(GUIBase baseGUI, SmartRect rect, Setting <int> selection, string[] selections, string label, float horizontalOffest, int showItems, bool move = true)
 {
     Label(rect, label, false);
     rect.MoveOffsetX(horizontalOffest);
     if (Button(rect, selections[selection.Value], false))
     {
         ScrollableDropdownSelection.CreateNew(baseGUI, rect.ToRect(), selections, selection, showItems);
     }
     rect.ResetX();
     if (move)
     {
         rect.MoveY();
     }
 }
Exemplo n.º 22
0
 public static void DropdownMenu(SmartRect rect, Setting <int> selection, string[] selections, string label, float horizontalOffest, bool move = true)
 {
     Label(rect, label, false);
     rect.MoveOffsetX(horizontalOffest);
     if (Button(rect, selections[selection.Value], false))
     {
         DropdownSelection.CreateNew(rect.ToRect(), selections, selection);
     }
     rect.ResetX();
     if (move)
     {
         rect.MoveY();
     }
 }
Exemplo n.º 23
0
 public static void HorizontalSlider(SmartRect position, Setting <float> value, string label, float min, float max, float offset, bool move = false)
 {
     if (offset > 0f)
     {
         UGUI.Label(position.ToRect(), label, Style.Label);
         position.MoveOffsetX(offset);
     }
     value.Value = UGUI.HorizontalSlider(position.ToRect(), value.Value, min, max, Style.Slider, Style.SliderBody);
     position.ResetX();
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 24
0
 public static void TextField(SmartRect position, Setting <string> value, string label, float offset, bool move = false)
 {
     if (offset > 0f)
     {
         UGUI.Label(position.ToRect(), label, Style.Label);
         position.MoveOffsetX(offset);
     }
     value.Value = UGUI.TextField(position.ToRect(), value.Value, Style.TextField);
     position.ResetX();
     if (move)
     {
         position.MoveY();
     }
 }
Exemplo n.º 25
0
 public static float HorizontalSlider(SmartRect position, float value, string label, float offset, bool move = false)
 {
     if (offset > 0f)
     {
         UGUI.Label(position.ToRect(), label, Style.Label);
         position.MoveOffsetX(offset);
     }
     value = UGUI.HorizontalSlider(position.ToRect(), value, 0f, 1f, Style.Slider, Style.SliderBody);
     position.ResetX();
     if (move)
     {
         position.MoveY();
     }
     return(value);
 }
Exemplo n.º 26
0
        protected override void DrawMainPart()
        {
            rect.Reset();
            rect.MoveY();
            scrollRect.Reset();
            scrollArea.y = rect.y;

            if (messages.Count > 0)
            {
                scroll = BeginScrollView(scrollArea, scroll, scrollAreaView);
                UnityEngine.GUILayout.TextArea(showString, Style.Label, new GUILayoutOption[] { UnityEngine.GUILayout.Width(scrollArea.width) });
                //var options = new GUILayoutOption[0];
                //foreach (var msg in messages)
                //{
                //    GUILayout.Label(msg.ToString(), options);
                //}
                EndScrollView();
            }
        }
Exemplo n.º 27
0
        public static void TextField(SmartRect position, Setting <int> val, string label, float offset, bool move = false)
        {
            if (offset > 0f)
            {
                UGUI.Label(position.ToRect(), label, Style.Label);
                position.MoveOffsetX(offset);
            }
            if (!integers.ContainsKey(val))
            {
                integers.Add(val, val.Value.ToString());
            }
            string text = integers[val];

            text = UGUI.TextField(position.ToRect(), text, Style.TextField);
            int.TryParse(text, out val.Value);
            integers[val] = text;
            position.ResetX();
            if (move)
            {
                position.MoveY();
            }
        }
Exemplo n.º 28
0
        private void ServerList()
        {
            if (Event.current != null && Event.current.type == EventType.KeyDown && UnityEngine.GUI.GetNameOfFocusedControl() == "ServerListFilter")
            {
                UpdateRoomList();
            }

            rect.Reset();
            region = SelectionGrid(rect, region, regions, regions.Length, true);

            Label(rect, locale["customServer"], false);
            float offset = ((scrollArea.width - (Style.HorizontalMargin * 3)) / 4f) + Style.HorizontalMargin;

            rect.MoveOffsetX(offset);
            rect.width -= (new AutoScaleFloat(100f) - Style.HorizontalMargin);
            float txt = offset + rect.width;

            customServer = SelectionGrid(rect, customServer, customServers, customServers.Length, false);

            rect.ResetX();
            rect.MoveOffsetX(txt + Style.HorizontalMargin);
            customServerField = TextField(rect, customServerField, string.Empty, 0f, true);

            rect.ResetX();
            CheckReconnect();
            UnityEngine.GUI.SetNextControlName("ServerListFilter");
            nameFilter = TextField(rect, nameFilter, locale["filter"], offset, true);

            rect.ResetX();
            rect.MoveY(Style.VerticalMargin);
            scrollRect.Reset();
            scrollArea.y = rect.y;
            scroll       = BeginScrollView(scrollArea, scroll, scrollAreaView);
            if (connected)
            {
                foreach (var room in roomList)
                {
                    if (Button(scrollRect, room.UIName.ToHTMLFormat(), true) && room.PlayerCount != room.MaxPlayers)
                    {
                        if (room.HasPassword)
                        {
                            roomToJoin    = room;
                            pageSelection = PasswordRequestPage;
                        }
                        else
                        {
                            PhotonNetwork.JoinRoom(room.Name);
                            disconnectByJoin = true;
                            DisableImmediate();
                        }
                        return;
                    }
                }
            }
            EndScrollView();

            rect.MoveToEndY(BoxPosition, Style.Height);
            rect.width = new AutoScaleFloat(170f);
            if (Button(rect, locale["btnCreation"], false))
            {
                pageSelection = CreationPage;
                connected     = false;
                return;
            }
            rect.MoveX(new AutoScaleFloat(5f), true);
            if (Button(rect, locale["btnSettings"], false))
            {
                pageSelection = SettingsPage;
                connected     = false;
                return;
            }
            rect.width = new AutoScaleFloat(120f);
            rect.MoveToEndX(BoxPosition, new AutoScaleFloat(120f));
            if (Button(rect, locale["btnBack"]))
            {
                Disable();
                return;
            }
        }
Exemplo n.º 29
0
        private void RoomCreation()
        {
            left.Reset();
            right.Reset();
            LabelCenter(left, locale["roomSettings"], true);
            serverName = TextField(left, serverName, locale["roomName"], Style.LabelOffset, true);
            password   = TextField(left, password, locale["pwd"], Style.LabelOffset, true);
            serverTime = TextField(left, serverTime, locale["time"], Style.LabelOffset * 2f, true);
            maxPlayers = TextField(left, maxPlayers, locale["players"], Style.LabelOffset * 2f, true);

            LabelCenter(left, locale["difficulity"], true);
            difficulity = SelectionGrid(left, difficulity, difficulities, difficulities.Length, true);

            LabelCenter(left, locale["dayLight"], true);
            daylight = SelectionGrid(left, daylight, daylights, daylights.Length, true);
            left.MoveY();

            LabelCenter(left, locale["presets"], true);
            Label(left, locale["presetNote"], true);
            newPresetName = TextField(left, newPresetName, locale["presetName"], Style.LabelOffset, true);
            left.width    = (left.DefaultWidth - Style.HorizontalMargin) / 2f;
            if (Button(left, locale["presetAdd"], false))
            {
                ServerPreset set = new ServerPreset(newPresetName);
                ExportPreset(set);
                presets.Add(set);
                presetView.height = (presets.Count * Style.Height) + ((presets.Count - 1) * Style.VerticalMargin);
                set.Save();
            }
            left.MoveX();
            if (Button(left, locale["presetRemove"], true))
            {
                if (presets.Count > 0)
                {
                    ServerPreset selected = null;
                    for (int i = 0; i < presets.Count; i++)
                    {
                        if (presets[i].Name == newPresetName)
                        {
                            selected = presets[i];
                        }
                    }
                    if (selected != null)
                    {
                        presets.Remove(selected);
                        selected.Delete();
                        newPresetName = "Set " + (presets.Count + 1);
                        if (presets.Count > 0)
                        {
                            newPresetName = presets[presets.Count - 1].Name;
                        }

                        presetView.height = (presets.Count * Style.Height) + ((presets.Count - 1) * Style.VerticalMargin);
                    }
                }
            }
            left.ResetX();
            if (presets.Count > 0)
            {
                presetArea.y = left.y;
                presetRect.Reset();
                presetScroll = BeginScrollView(presetArea, presetScroll, presetView);
                {
                    for (int i = 0; i < presets.Count; i++)
                    {
                        if (Button(presetRect, presets[i].Name, true))
                        {
                            ServerPreset selected = presets[i];
                            ImportPreset(selected);
                        }
                    }
                }
                EndScrollView();
            }

            left.MoveToEndY(BoxPosition, Style.Height);
            left.width = left.DefaultWidth / 2f - Style.HorizontalMargin;
            if (Button(left, locale["btnCreation"], false))
            {
                disconnectByJoin = true;
                string[] args = new string[]
                {
                    serverName,
                    maps[mapSelection],
                    new string[] { "normal", "hard", "abnormal" }[difficulity],
                    serverTime,
                    new string[] { "day", "dawn", "night" }[daylight],
                    password.Length > 0 ? new SimpleAES().Encrypt(password) : string.Empty,
                    UnityEngine.Random.Range(1000000, 10000000).ToString()
                };
                if (!int.TryParse(maxPlayers, out int max))
                {
                    max = 5;
                }
                PhotonNetwork.CreateRoom(string.Join("`", args), new RoomOptions()
                {
                    isVisible = true, isOpen = true, maxPlayers = max
                }, null);
                DisableImmediate();
                AnarchyManager.Background.Disable();
                return;
            }
            left.MoveX(Style.HorizontalMargin, true);
            if (Button(left, locale["btnOffline"], false))
            {
                disconnectByJoin = true;
                PhotonNetwork.Disconnect();
                PhotonNetwork.offlineMode = true;
                string[] args = new string[]
                {
                    serverName,
                    maps[mapSelection],
                    new string[] { "normal", "hard", "abnormal" }[difficulity],
                    serverTime,
                    new string[] { "day", "dawn", "night" }[daylight],
                    password.Length > 0 ? new SimpleAES().Encrypt(password) : string.Empty,
                    UnityEngine.Random.Range(1000000, 10000000).ToString()
                };
                if (!int.TryParse(maxPlayers, out int max))
                {
                    max = 5;
                }
                PhotonNetwork.CreateRoom(string.Join("`", args), new RoomOptions()
                {
                    isVisible = true, isOpen = true, maxPlayers = max
                }, null);
                DisableImmediate();
                AnarchyManager.Background.Disable();
                return;
            }

            LabelCenter(right, locale["mapSelection"], true);
            mapSelection = SelectionGrid(right, mapSelection, maps, 1);
            right.MoveToEndY(BoxPosition, Style.Height);
            right.MoveToEndX(BoxPosition, new AutoScaleFloat(240f) + Style.HorizontalMargin);
            right.width = new AutoScaleFloat(120f);
            if (Button(right, locale["btnSettings"], false))
            {
                connected     = false;
                pageSelection = SettingsPage;
                return;
            }
            right.MoveX();
            if (Button(right, locale["btnList"], false))
            {
                connected = PhotonNetwork.connected;
                if (connected)
                {
                    timeToUpdate = 0.1f;
                }
                pageSelection = ServerListPage;
                return;
            }
        }