Beispiel #1
0
        private void UpdateString()
        {
            NameString?.Dispose();
            var measure = DrawableString.Measure(Name);

            NameString = new DrawableString(Name, rect.Location + new Vector2(rect.Size.X / 2 - measure.X / 2, -measure.Y * 1.5f), Color.White);
        }
Beispiel #2
0
        public PatternManager(int x, int y, int width, int heigth, SideBar sb)
        {
            Position    = new Vector2(x, y);
            Size        = new Vector2(width, heigth);
            PatternSize = new Vector2(width / 2f - PatternMarginX * 2, heigth / 4.5f - PatternMarginY);

            foreach (var folder in Directory.GetDirectories(BasePath))
            {
                var world = Path.GetFileName(folder).Replace(',', '/');
                foreach (var file in Directory.GetFiles(folder))
                {
                    var name = Path.GetFileNameWithoutExtension(file);
                    patterns.Add(new Pattern(new Vector2(0, Position.Y * 1.5f), (int)PatternSize.X, (int)PatternSize.Y, file, world, name));
                }
            }
            PageText = new DrawableString("Welt: " + currentRules, new Vector2(Size.X * 0.1f, Position.Y + Size.Y - Size.Y * 0.075f), Color.White);

            Config.RulesChanged += Config_RulesChanged;

            var buttonsHeight = (int)(PageText.Location.Y - Size.X / 16f + DrawableString.FontHeight);

            left  = new Rectangle2D(new Vector2(width * 0.5f, buttonsHeight), (int)(Size.X / 4f - 20), (int)(Size.X / 8f), Color.LightGray, (s) => { UpdatePatterns(-1); }, SideBarState.LeftTab);
            right = new Rectangle2D(new Vector2(width * 0.75f + 0, buttonsHeight), (int)(Size.X / 4f - 20), (int)(Size.X / 8f), Color.LightGray, (s) => { UpdatePatterns(1); }, SideBarState.LeftTab);

            sb.GotInputClick += left.HandleInput;
            sb.GotInputClick += right.HandleInput;

            var strSize = DrawableString.Measure("<", 4);

            leftText  = new DrawableString("<", new Vector2(left.Location.X + left.Size.X / 2, left.Location.Y + left.Size.Y / 2) - strSize / 2, Color.Black, 4);
            rightText = new DrawableString(">", new Vector2(right.Location.X + right.Size.X / 2, right.Location.Y + right.Size.Y / 2) - strSize / 2, Color.Black, 4);

            Config_RulesChanged();
        }
Beispiel #3
0
 public void DrawString(DrawableString s)
 {
     if (!active)
     {
         throw new InvalidOperationException("You should call Begin() before ending a batch.");
     }
     textQueue.Enqueue(s);
 }
 public GameStructureVisualizer()
 {
     DrawingTranslation = new DrawingOffsetTranslation();
     ScoreString        = new DrawableString(new DrawingOptions()
     {
         Position = new Vector2(0, 10), DrawCentered = true
     });
 }
Beispiel #5
0
        public PlayerEntry(int index, DrawableString playerString)
        {
            PlayerString = playerString;
            playerString.Options.StringColor = Color.Yellow;

            Index  = index;
            m_team = 0;

            UpdatePlayerString();
        }
Beispiel #6
0
        void OnAddPlayerSelection()
        {
            if (RegisteredPlayersCount >= MaxLocalPlayers)
            {
                return;
            }

            DrawableString playerString = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(0, 0)
            });
            PlayerEntry entry = new PlayerEntry(RegisteredPlayersCount, playerString);

            RegistrationSelection.ListEntries.Insert(RegisteredPlayersCount, new SelectionEntry(playerString, new Selector()));
            RegisteredPlayers.Add(entry);

            UpdateAfterAddPlayer();
            UpdateEntryPositions();
        }
        public MatchmakingStatusLobby()
        {
            Status = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(0, 50), DrawCentered = true
            });
            Strings.Add(Status);

            Strings.Add(new DrawableString(
                            new DrawingOptions()
            {
                Position = new Vector2(0, 380), DrawCentered = true
            },
                            "Press ESC to cancel"));

            Animation = new WaitingAnimation();
            Animations.Add(Animation);

            ResetStatus();
        }
Beispiel #8
0
        public FinishLobby()
        {
            DrawingOptions options = new DrawingOptions()
            {
                Position = new Vector2(305, 150), StringColor = Color.Black, DrawCentered = true
            };

            FinishText = new DrawableString(options);
            Strings.Add(FinishText);

            options = new DrawingOptions()
            {
                Position = new Vector2(220, 350), StringColor = Color.Black, DrawCentered = true
            };
            Strings.Add(new DrawableString(options, "Press ESC to return to main menu"));

            FinishAnimation animation = new FinishAnimation(new Vector2(0, 250));

            Animations.Add(animation);
        }
Beispiel #9
0
        public ConnectLobby()
        {
            DrawableServerIP = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(117, 200)
            }, CreateIPString(""));
            DrawableStatus = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(117, 300)
            });

            Strings.Add(DrawableServerIP);
            Strings.Add(DrawableStatus);

            ConnectOptions                   = new ConnectOptions();
            ConnectOptions.Visible           = false;
            ConnectOptions.TopLeft           = new Vector2(100, 100);
            ConnectOptions.SelectionChanged += AdjustTextToSelection;

            Lists.Add(ConnectOptions);
        }
Beispiel #10
0
        public void Update(float elapsed)
        {
            timeElapsed += elapsed;
            if (thick != Config.LineThickness)
            {
                thickness.Dispose();
                string s = "Thickness: " + Config.LineThickness;
                thickness = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s).X - position.X, position.Y * 3), Color.White);
                thick     = Config.LineThickness;
            }

            if (DateTime.Now.Second != Second)
            {
                Second = DateTime.Now.Second;
                fpsString.Dispose();
                string s = "FPS: " + frames;
                fpsString = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s).X - position.X, position.Y), Color.White);
                frames    = 0;
            }
            frames++;
        }
Beispiel #11
0
        private void UpdatePatterns(int pageDiff = 0)
        {
            var possiblePatterns = patterns; //.FindAll(s => s.World == currentRules);

            Page += pageDiff;
            Page  = Page <0 ? 0 : Page> (int)(possiblePatterns.Count / 8f) ? (int)(possiblePatterns.Count / 8f) : Page;

            currentPatterns.Clear();
            for (int i = 0; i + Page * 8 < possiblePatterns.Count && i < 8; i++)
            {
                var p = possiblePatterns[i + Page * 8];
                int x = (i % 2) * (int)(PatternSize.X + PatternMarginX * 2) + PatternMarginX;
                int y = (int)(i / 2) * (int)(PatternSize.Y + PatternMarginY) + (int)Position.Y + PatternMarginY;
                p.SetLocation(x, y);
                currentPatterns.Add(p);
            }
            PageText.Dispose();

            var pageStrSize = DrawableString.Measure(Page.ToString(), 4);

            PageText = new DrawableString((1 + Page) + "/" + (int)(possiblePatterns.Count / 8f + 1), new Vector2(Size.X * 0.2f - pageStrSize.X / 2, left.Location.Y + left.Size.Y / 2 - pageStrSize.Y * 0.5f), Color.White, 4);
        }
Beispiel #12
0
        public Userinterface(TextureInput inputHandler)
        {
            string s = "PAUSED";

            pause     = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s).X - position.X, position.Y * 5), Color.OrangeRed);
            fpsString = new DrawableString("FPS: 0", position + new Vector2(Config.Width - 10 * 14, offset.Y), Color.White);
            s         = "Thickness: " + Config.LineThickness;
            thickness = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s).X - position.X, position.Y * 3), Color.White);
            sideBar   = new SideBar(inputHandler);
            s         = "Stefan P" + (char)('o' + 42) + "lloth";
            stef      = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s, 1).X - position.X, Config.Height - position.Y * 4), Color.White, 1);
            s         = "Tobias Nickl";
            tobi      = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s, 1).X - position.X, Config.Height - position.Y * 3), Color.White, 1);
            s         = "Jeremy Probst";
            jerry     = new DrawableString(s, new Vector2(Config.Width - DrawableString.Measure(s, 1).X - position.X, Config.Height - position.Y * 2), Color.White, 1);

            float scale = 1 / 12f;

            othTex    = Texture2D.FromFile(RenderFrame.Instance.device, @".\Content\oth.png");
            oth       = new Rectangle2D(new Vector2(Config.Width - Config.Width * scale * 1.2f - 10, stef.Location.Y - (int)(Config.Height * scale) - 10), (int)(Config.Width * scale * 1.2f), (int)(Config.Height * scale), othTex);
            oth.Color = new Color4(0.4f, 1, 1, 1);
        }
Beispiel #13
0
        public GameOptions()
        {
            m_playerCount = 2;

            DrawableStatus = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(100, 100)
            });
            DrawablePlayerCount = new DrawableString(new DrawingOptions()
            {
                Position = new Vector2(100, 300)
            });
            QueueingOptions = new QueueSelection(new Vector2(100, 180));

            Strings.Add(DrawableStatus);
            Strings.Add(DrawablePlayerCount);
            Lists.Add(QueueingOptions);

            UpdatePlayerCount();

            QueueingOptions.SelectionChanged += UpdatePlayerCount;
        }
Beispiel #14
0
        private void button1_Click(object sender, EventArgs e)
        {
            DrawableString test = new DrawableString(textBox1.Text, int.Parse(textBox2.Text), int.Parse(textBox3.Text));

            Rendering.AddDrawable(test);
        }
 public SelectionEntry(DrawableString drawString, Selector selector)
 {
     Selector              = selector;
     DrawString            = drawString;
     SpaceSelectorToString = 5;
 }
Beispiel #16
0
        public SideBar(TextureInput iHandler)
        {
            inputHandler = iHandler;

            sideBarBackground.Add(new Rectangle2D(new Vector2(0, 0), Width, Config.Height, Color.FromArgb(200, 200, 200, 200)));
            sideBarBackground.Add(new Rectangle2D(new Vector2(0, 0), Width / 2, (int)(0.074 * Config.Height), Color.DimGray, (s) => State = SideBarState.LeftTab, SideBarState.RightTab));           // left tab
            GotInputClick += sideBarBackground.Last().HandleInput;
            sideBarBackground.Add(new Rectangle2D(new Vector2(Width / 2f, 0), Width / 2, (int)(0.074 * Config.Height), activeTabColor, (s) => State = SideBarState.RightTab, SideBarState.LeftTab)); //right tab
            GotInputClick += sideBarBackground.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0, Config.Height - (int)(0.093 * Config.Height)), Width, (int)(0.093 * Config.Height), Color.DimGray, (s) => State = SideBarState.Minimized, SideBarState.LeftTab | SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            maximize       = new Rectangle2D(new Vector2(0, 0), MinimizedWidth, Config.Height, Color.FromArgb(200, 200, 200, 200), (s) => State = SideBarState.RightTab, SideBarState.Minimized);
            GotInputClick += maximize.HandleInput;

            var leftTabString  = new DrawableString("Muster", new Vector2((float)0.1625 * Width, 5) + offset, Color.White);
            var rightTabString = new DrawableString("Einstellungen", new Vector2(Width / 2f + (float)0.0625 * Width, 5) + offset, Color.White);
            var minimizeString = new DrawableString("Einklappen", new Vector2((float)0.35 * Width, Config.Height - (int)(0.06 * Config.Height)), Color.White);

            maximizeString = new DrawableString(">", new Vector2((float)0.0125 * Width, Config.Height / 2f), Color.White);

            var pausebtn = new Rectangle2D(new Vector2((float)0.0625 * Width, (int)(0.093 * Config.Height)), (int)(0.25 * Width), (int)(0.074 * Config.Height), Color.DimGray, (s) => Config.Paused = !Config.Paused, SideBarState.RightTab);

            rightTab.Add(pausebtn);
            GotInputClick += pausebtn.HandleInput;
            var clearbtn = new Rectangle2D(new Vector2((float)0.0625 * Width * 2 + (int)(0.25 * Width), (int)(0.093 * Config.Height)), (int)(0.25 * Width), (int)(0.074 * Config.Height), Color.DimGray, (s) => inputHandler.ClearWorld(), SideBarState.RightTab);

            rightTab.Add(clearbtn);
            GotInputClick += clearbtn.HandleInput;
            var closebtn = new Rectangle2D(new Vector2((float)0.0625 * Width * 3 + (int)(0.25 * Width) * 2, (int)(0.093 * Config.Height)), (int)(0.25 * Width), (int)(0.074 * Config.Height), Color.DarkRed, (s) => RenderFrame.Instance.Exit(), SideBarState.RightTab);

            rightTab.Add(closebtn);
            GotInputClick += closebtn.HandleInput;

            //Farben
            int colorSize = (int)(0.0463 * Config.Height);

            rightTab.Add(new Rectangle2D(new Vector2((float)0.1875 * Width, 0) + 16 * offset, colorSize, colorSize, Color.Red, (s) => inputHandler.ChangeColor(new Color4(1, 1, 0, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2((float)0.375 * Width, 0) + 16 * offset, colorSize, colorSize, Color.Green, (s) => inputHandler.ChangeColor(new Color4(1, 0, 1, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2((float)0.5625 * Width, 0) + 16 * offset, colorSize, colorSize, Color.Blue, (s) => inputHandler.ChangeColor(new Color4(1, 0, 0, 1)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2((float)0.75 * Width, 0) + 16 * offset, colorSize, colorSize, Color.Black, (s) => inputHandler.ChangeColor(new Color4(1, 0, 0, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;

            // Birth setting buttons
            for (int i = 0; i < 9; i++)
            {
                birth.Add(new Rectangle2D(new Vector2((float)0.175 * Width, (int)(-0.011 * Config.Height)) + (23 + i * 3) * offset, (int)(0.25 * Width), (int)(0.046 * Config.Height), (Config.BirthRule & 1 << i) > 0 ? Color.Green : Color.DimGray, OnBirthChanged, SideBarState.RightTab, i));
            }
            // Death setting buttons
            for (int i = 0; i < 9; i++)
            {
                death.Add(new Rectangle2D(new Vector2((float)0.625 * Width, (int)(-0.011 * Config.Height)) + (23 + i * 3) * offset, (int)(0.25 * Width), (int)(0.046 * Config.Height), (Config.DeathRule & 1 << i) > 0 ? Color.Green : Color.DimGray, OnDeathChanged, SideBarState.RightTab, i));
            }

            foreach (var r in birth.Concat(death))
            {
                rightTab.Add(r);
                GotInputClick += r.HandleInput;
            }
            var size = DrawableString.Measure("Pause");

            rightTabStrings.Add(new DrawableString("Pause", pausebtn.Location + pausebtn.Size / 2 - size / 2, Color.White));
            size = DrawableString.Measure("Leeren");
            rightTabStrings.Add(new DrawableString("Leeren", clearbtn.Location + clearbtn.Size / 2 - size / 2, Color.White));
            rightTabStrings.Add(new DrawableString("Leben", new Vector2((float)0.2 * Width, 0) + 20 * offset, Color.White));
            rightTabStrings.Add(new DrawableString("Tod", new Vector2((float)0.7 * Width, 0) + 20 * offset, Color.White));
            size = DrawableString.Measure("Beenden");
            rightTabStrings.Add(new DrawableString("Beenden", closebtn.Location + closebtn.Size / 2 - size / 2, Color.White));
            rightTabStrings.Add(new DrawableString("Farbe", new Vector2(10, 10) + 16 * offset, Color.White));
            for (int i = 0; i < 9; i++)
            {
                rightTabStrings.Add(new DrawableString(i.ToString(), new Vector2((float)0.025 * Width, 0) + (23 + 3 * i) * offset, Color.White));
            }
            rightTabStrings.Add(minimizeString);

            rightTabStrings.Add(rightTabString);
            leftTabStrings.Add(rightTabString);

            rightTabStrings.Add(leftTabString);
            leftTabStrings.Add(leftTabString);
        }
Beispiel #17
0
        public SideBar(TextureInput iHandler)
        {
            inputHandler = iHandler;

            var d = RenderFrame.Instance.device;

            screenshotTex = Texture2D.FromFile(d, @".\Content\floppy_save.png");
            fileLoadTex   = Texture2D.FromFile(d, @".\Content\file_open.png");
            minusTex      = Texture2D.FromFile(d, @".\Content\minus.png");
            plusTex       = Texture2D.FromFile(d, @".\Content\plus.png");

            playTex   = Texture2D.FromFile(d, @".\Content\playpause.png");
            clearTex  = Texture2D.FromFile(d, @".\Content\clear.png");
            exitTex   = Texture2D.FromFile(d, @".\Content\exit.png");
            cornerTex = Texture2D.FromFile(d, @".\Content\corner.png");

            // hintergrund
            sideBarBackground.Add(new Rectangle2D(new Vector2(0, 0), Width, Config.Height, Color.FromArgb(200, 200, 200, 200)));
            // 2 button oben zum umschalten zwischen den tabs
            rightTab.Add(new Rectangle2D(new Vector2(0, 0), Width / 2, (int)(0.074 * Config.Height), Color.DimGray, (s) => State = SideBarState.LeftTab, SideBarState.RightTab));         // left tab
            GotInputClick += rightTab.Last().HandleInput;
            leftTab.Add(new Rectangle2D(new Vector2(Width / 2f, 0), Width / 2, (int)(0.074 * Config.Height), Color.DimGray, (s) => State = SideBarState.RightTab, SideBarState.LeftTab)); //right tab
            GotInputClick += leftTab.Last().HandleInput;

            sideBarBackground.Add(new Rectangle2D(new Vector2(0, Config.Height - (int)(0.074 * Config.Height)), Width, (int)(0.093 * Config.Height), Color.DimGray, (s) => State = SideBarState.Minimized, SideBarState.LeftTab | SideBarState.RightTab));
            GotInputClick += sideBarBackground.Last().HandleInput;
            maximize       = new Rectangle2D(new Vector2(0, 0), MinimizedWidth, Config.Height, Color.FromArgb(200, 200, 200, 200), (s) => State = SideBarState.RightTab, SideBarState.Minimized);
            GotInputClick += maximize.HandleInput;

            var leftTabString  = new DrawableString("Muster", new Vector2((float)0.1625 * Width, 5) + offset, Color.White);
            var rightTabString = new DrawableString("Allgemein", new Vector2(Width / 2f + (float)0.11 * Width, 5) + offset, Color.White);
            var minimizeString = new DrawableString("Einklappen", new Vector2((float)0.35 * Width, Config.Height - (int)(0.05 * Config.Height)), Color.White);

            maximizeString = new DrawableString(">", new Vector2((float)0.0125 * Width, Config.Height / 2f), Color.White);

            int btnSize = (int)(0.15 * Width);

            var closebtn = new Rectangle2D(new Vector2(0.1875f * Width, 0.093f * Config.Height), btnSize, btnSize, Color.OrangeRed, (s) => RenderFrame.Instance.Exit(), SideBarState.RightTab, null, exitTex);

            rightTab.Add(closebtn);
            GotInputClick += closebtn.HandleInput;
            var pausebtn = new Rectangle2D(new Vector2(0.5625f * Width, 0.093f * Config.Height), btnSize, btnSize, Color.White, (s) => { Config.Paused = !Config.Paused; }, SideBarState.RightTab, null, playTex);

            rightTab.Add(pausebtn);
            GotInputClick += pausebtn.HandleInput;
            var clearbtn = new Rectangle2D(new Vector2(0.375f * Width, 0.093f * Config.Height), btnSize, btnSize, Color.White, (s) => inputHandler.ClearWorld(), SideBarState.RightTab, null, clearTex);

            rightTab.Add(clearbtn);
            GotInputClick += clearbtn.HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.75f * Width, 0.093f * Config.Height), btnSize, btnSize, Color.White, (s) => SamplerStates.Instance.SwitchWrapMode(), SideBarState.RightTab, null, cornerTex));
            GotInputClick += rightTab.Last().HandleInput;


            //Farben
            rightTab.Add(new Rectangle2D(new Vector2(0.1875f * Width, 0.27f * Config.Height), btnSize, btnSize, Color.Red, (s) => inputHandler.ChangeColor(new Color4(1, 1, 0, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.375f * Width, 0.27f * Config.Height), btnSize, btnSize, Color.Green, (s) => inputHandler.ChangeColor(new Color4(1, 0, 1, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.5625f * Width, 0.27f * Config.Height), btnSize, btnSize, Color.Blue, (s) => inputHandler.ChangeColor(new Color4(1, 0, 0, 1)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.75f * Width, 0.27f * Config.Height), btnSize, btnSize, Color.Black, (s) => inputHandler.ChangeColor(new Color4(1, 0, 0, 0)), SideBarState.RightTab));
            GotInputClick += rightTab.Last().HandleInput;

            rightTab.Add(new Rectangle2D(new Vector2(0.1875f * Width, 0.18f * Config.Height), btnSize, btnSize, Color.White, (s) => MakeScreenshot(), SideBarState.RightTab, null, screenshotTex));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.375f * Width, 0.18f * Config.Height), btnSize, btnSize, Color.White, (s) => LoadFile(), SideBarState.RightTab, null, fileLoadTex));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.5625f * Width, 0.18f * Config.Height), btnSize, btnSize, Color.White, (s) => Config.LineThickness--, SideBarState.RightTab, null, minusTex));
            GotInputClick += rightTab.Last().HandleInput;
            rightTab.Add(new Rectangle2D(new Vector2(0.75f * Width, 0.18f * Config.Height), btnSize, btnSize, Color.White, (s) => Config.LineThickness++, SideBarState.RightTab, null, plusTex));
            GotInputClick += rightTab.Last().HandleInput;

            // Birth setting buttons
            for (int i = 1; i < 9; i++)
            {
                birth.Add(new Rectangle2D(new Vector2((float)0.175 * Width, (int)(-0.011 * Config.Height)) + (24 + i * 3) * offset, (int)(0.25 * Width), (int)(0.046 * Config.Height), (Config.BirthRule & 1 << i) > 0 ? Color.Green : Color.DimGray, OnBirthChanged, SideBarState.RightTab, i));
            }
            // Death setting buttons
            for (int i = 1; i < 9; i++)
            {
                death.Add(new Rectangle2D(new Vector2((float)0.625 * Width, (int)(-0.011 * Config.Height)) + (24 + i * 3) * offset, (int)(0.25 * Width), (int)(0.046 * Config.Height), (Config.DeathRule & 1 << i) > 0 ? Color.Green : Color.DimGray, OnDeathChanged, SideBarState.RightTab, i));
            }

            foreach (var r in birth.Concat(death))
            {
                rightTab.Add(r);
                GotInputClick += r.HandleInput;
            }
            rightTabStrings.Add(new DrawableString("Leben", new Vector2((float)0.235 * Width, 0) + 24 * offset, Color.White));
            rightTabStrings.Add(new DrawableString("Tod", new Vector2((float)0.705 * Width, 0) + 24 * offset, Color.White));
            rightTabStrings.Add(new DrawableString("Farbe", new Vector2(10, 0.275f * Config.Height + btnSize / 2f - offset.Y), Color.White));
            for (int i = 1; i < 9; i++)
            {
                rightTabStrings.Add(new DrawableString(i.ToString(), new Vector2((float)0.10 * Width, 0) + (24 + 3 * i) * offset, Color.White));
            }
            rightTabStrings.Add(minimizeString);
            leftTabStrings.Add(minimizeString);

            rightTabStrings.Add(rightTabString);
            leftTabStrings.Add(rightTabString);

            rightTabStrings.Add(leftTabString);
            leftTabStrings.Add(leftTabString);

            sliderbackground = new Rectangle2D(new Vector2(0.1875f * Width, (int)(0.36f * Config.Height)), (int)(0.714f * Width), (int)(0.046 * Config.Height), Color.DarkGray, s => speed = location.X, SideBarState.RightTab);
            slider           = new Rectangle2D(new Vector2(0.1875f * Width, (int)(0.36f * Config.Height)), (int)(0.02 * Width), (int)(0.046 * Config.Height), Color.White);
            GotInputClick   += sliderbackground.HandleInput;

            rightTabStrings.Add(new DrawableString("Langsam", new Vector2(sliderbackground.Location.X + 10, sliderbackground.Location.Y + sliderbackground.Size.Y / 2 - DrawableString.Measure("a", 1).Y / 2), Color.White, 1));
            rightTabStrings.Add(new DrawableString("Schnell", new Vector2(sliderbackground.Location.X + sliderbackground.Size.X - 10 - DrawableString.Measure("Schnell", 1).X, sliderbackground.Location.Y + sliderbackground.Size.Y / 2 - DrawableString.Measure("a", 1).Y / 2), Color.White, 1));

            rightTab.Add(sliderbackground);
            rightTab.Add(slider);

            pm = new PatternManager(0, (int)(0.074 * Config.Height), Width, Config.Height - 2 * (int)(0.074 * Config.Height), this); //oberen und unteren button abziehen ....

            speed = 0.1875f * Width * 3f;

            Config.RulesChanged += Config_RulesChanged;
        }