~jpgleeson/kabul-1841

d24508d29774ae6102c2e88a2f440d6beab8c61f — jpgleeson 3 years ago 10dd360
1.0.4

Added music back in. Updated checkboxes to use FontStashSharp. Added option for tutorial to be on or off. Word wrapping in popups.
M Button.cs => Button.cs +4 -4
@@ 37,10 37,10 @@ namespace Sionnach

        Sprite imageSprite;

        DynamicSpriteFont textFont;
        Color textColour = Color.White;
        Point textPosition;
        string textString;
        protected DynamicSpriteFont textFont;
        protected Color textColour = Color.Black;
        protected Point textPosition;
        protected string textString;

        public enum ButtonState { Up, Over, Down } //up = normal, over = mouse over, down = mouse click
        public ButtonState buttonState = ButtonState.Up;

M Checkbox.cs => Checkbox.cs +21 -6
@@ 9,6 9,7 @@ using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;
using FontStashSharp;

namespace Sionnach
{


@@ 16,13 17,18 @@ namespace Sionnach
    {
        Texture2D checkboxTexture, selectedTexture, unselectedTexture;
        bool isChecked = false;
        public Checkbox(SpriteBatch SpriteBatch, string Text, Point Position, Point Size, bool isCheck)
        public Checkbox(SpriteBatch SpriteBatch, string Text, Point Position, Point Size, DynamicSpriteFont desFont, bool isCheck = false)
        {
            rectangle = new Rectangle(Position.X - (Size.X / 2), Position.Y - (Size.Y / 2), Size.X + 24 + size.Y, Size.Y);
            position = Position;
            size = Size;
            text = new Text(SpriteBatch, Text, new Vector2(0, 0));

            textFont = desFont;
            textPosition = position;
            textString = Text;
            CenterText();
            SetText();

            drawColour = upColour;
            selectedColour = downColour;
            //soundManager = stateManager.game.soundManager;


@@ 31,7 37,7 @@ namespace Sionnach
            isChecked = isCheck;

            selectedTexture = TextureManager.checkboxTextureSelected;
            unselectedTexture = TextureManager.checkboxTextureUnselected;
            unselectedTexture = TextureManager.checkboxTexture;
        }

        public override void Draw()


@@ 64,9 70,9 @@ namespace Sionnach
            //Fill Centre
            spriteBatch.Draw(checkboxTexture, new Rectangle(leftElementOffset + 20, topElementOffset + 20, size.X - 40, size.Y - 40), new Rectangle(20, 20, 20, 20), Color.White);

            spriteBatch.Draw(checkboxTexture, new Rectangle(rightElementOffset + 24, topElementOffset, size.Y, size.Y), new Rectangle(60, 0, 60, 60), Color.White);
            //spriteBatch.Draw(checkboxTexture, new Rectangle(rightElementOffset + 24, topElementOffset, size.Y, size.Y), new Rectangle(60, 0, 60, 60), Color.White);

            text.Draw();
            spriteBatch.DrawString(textFont, textString, Utilities.PointToVector2(textPosition), textColour);

            //Make mouse over false as it is checked every frame.
            over = false;


@@ 74,10 80,19 @@ namespace Sionnach

        public override void Click()
        {
            Clicked.Invoke(this, EventArgs.Empty);
            if (Clicked != null)
            {
                Clicked.Invoke(this, EventArgs.Empty);
            }
            isChecked = !isChecked;
        }

        void SetText()
        {
            int holder = (int)textFont.MeasureString(textString).X;
            textPosition.X += (holder) + 2;
        }

        public bool isThisChecked()
        {
            return isChecked;

M EventManager.cs => EventManager.cs +0 -1
@@ 76,7 76,6 @@ namespace Sionnach
                    if (i == eve.id)
                    {
                        eve.active = true;
                        Console.WriteLine(eve.unfinishedString);
                    }
                }
            }

M FNAGame.cs => FNAGame.cs +1 -0
@@ 45,6 45,7 @@ namespace Kabul
            LineBatch.SpriteBatchEx.GraphicsDevice = this.GraphicsDevice;

            stateManager = new StateManager(this);
            soundManager = new SoundManager(this);

            LoadContent();


M GameState.cs => GameState.cs +30 -17
@@ 45,6 45,7 @@ namespace Kabul
        Vector2 currentMouseWorldPosition = new Vector2(500, 500);

        bool debug = false;
        bool tutorial = false;

        Random random;



@@ 78,6 79,11 @@ namespace Kabul

        List<resourceSnapshot> gameSnapshots = new List<resourceSnapshot>();

        Vector2 turnStringPos = new Vector2(1050, 36);
        Vector2 aggroStringPos = new Vector2(1050, 72);
        Vector2 gateHPStringPos = new Vector2(1050, 108);
        Vector2 ammoCountStringPos = new Vector2(1050, 140);

        Text positionText;

        int currentAggro = 5;


@@ 93,11 99,10 @@ namespace Kabul
        bool burnesDispositionTutorial = false;
        bool endTurnTutorial = false;

        public GameState(StateManager stateMan)
        public GameState(StateManager stateMan, bool isTutorial = false)
        {

            stateManager = stateMan;
            soundManager = stateMan.game.soundManager;

            LoadContent();



@@ 173,10 178,15 @@ namespace Kabul
            placeTokensInLocation(tokenLocation.unassigned);

            currentlyGrabbing = false;
            tutorial = isTutorial;

            gameUI.addTimedPopup(LanguageManager.firstHelpBox, 7500);
            gameUI.addTimedPopup(LanguageManager.secondHelpBox, 7500);
            gameUI.addTimedPopup(LanguageManager.thirdHelpBox, 7500);
            if (tutorial)
            {
                gameUI.addTimedPopup(LanguageManager.firstHelpBox, 7500);
                gameUI.addTimedPopup(LanguageManager.secondHelpBox, 7500);
                gameUI.addTimedPopup(LanguageManager.thirdHelpBox, 7500);
            }
            

        }



@@ 193,6 203,8 @@ namespace Kabul

            font30 = stateManager.game.fontSystem.GetFont(30);
            font24 = stateManager.game.fontSystem.GetFont(24);

            soundManager = this.stateManager.game.soundManager;
        }

        public override void Draw(GameTime gameTime)


@@ 202,7 214,7 @@ namespace Kabul

            background.Draw();

            if (unitGrabbed && !unitPlaceTutorial)
            if (unitGrabbed && !unitPlaceTutorial && tutorial)
            {
                spriteBatch.DrawFilledRectangle(shujahRect, playSpaceColour, playSpaceColour);
                spriteBatch.DrawFilledRectangle(mcnaughtenRect, playSpaceColour, playSpaceColour);


@@ 246,10 258,10 @@ namespace Kabul
            gameUI.Draw();
            cursor.Draw();

            spriteBatch.DrawString(font30, LanguageManager.turnString + ": " + turnNumber.ToString(), new Vector2(1050, 36), Color.White);
            spriteBatch.DrawString(font30, LanguageManager.aggression + ": " + currentAggro.ToString(), new Vector2(1050, 72), Color.White);
            spriteBatch.DrawString(font30, LanguageManager.gateHP + ": " + gateHP.ToString(), new Vector2(1050, 108), Color.White);
            spriteBatch.DrawString(font30, LanguageManager.ammunition + ": " + ammoDumpCount.ToString(), new Vector2(1050, 144), Color.White);
            spriteBatch.DrawString(font30, LanguageManager.turnString + ": " + turnNumber.ToString(), turnStringPos, Color.Black);
            spriteBatch.DrawString(font30, LanguageManager.aggression + ": " + currentAggro.ToString(), aggroStringPos, Color.Black);
            spriteBatch.DrawString(font30, LanguageManager.gateHP + ": " + gateHP.ToString(), gateHPStringPos, Color.Black);
            spriteBatch.DrawString(font30, LanguageManager.ammunition + ": " + ammoDumpCount.ToString(), ammoCountStringPos, Color.Black);
            
            if (debug)
            {


@@ 295,7 307,7 @@ namespace Kabul
                                {
                                    token.dragTo(Utilities.PointToVector2(input.cursorPosition));
                                    unitGrabbed = true;
                                    if (!unitPlaceTutorial)
                                    if (!unitPlaceTutorial && tutorial)
                                    {
                                        gameUI.addTimedPopup(LanguageManager.unitPlace, 5000);
                                    }


@@ 324,7 336,7 @@ namespace Kabul
                            }
                            token.Update();

                            if (!unitPlaceTutorial)
                            if (!unitPlaceTutorial && tutorial)
                            {
                                unitPlaceTutorial = true;
                            }


@@ 341,12 353,12 @@ namespace Kabul
                        if (token.grabRectangle.Contains(input.cursorPosition))
                        {
                            token.cycleDisposition();
                            if (dispositionTutorial == false)
                            if (dispositionTutorial == false && tutorial)
                            {
                                gameUI.addTimedPopup(LanguageManager.DispositionTutorial, 7500);
                                dispositionTutorial = true;
                            }
                            if (token.type == tokenType.AlexanderBurnes && burnesDispositionTutorial == false)
                            if (token.type == tokenType.AlexanderBurnes && burnesDispositionTutorial == false && tutorial)
                            {
                                gameUI.addTimedPopup(LanguageManager.BurnesDispositionTutorial, 7500);
                                burnesDispositionTutorial = true;


@@ 371,7 383,7 @@ namespace Kabul
            {
                if (debug)
                {
                    gameUI.addTimedPopup("Just testing a highlighting background for\nthe eh popups.", 5000, true);
                    
                }
            }



@@ 405,9 417,10 @@ namespace Kabul
                    gameUI.addBigPopup(LanguageManager.playersTurn);
                    placeTokensInLocation(tokenLocation.unassigned);
                    currentTurnState = turnState.playerTurn;
                    if (endTurnTutorial == false)
                    if (endTurnTutorial == false && tutorial)
                    {
                        gameUI.addTimedPopup(LanguageManager.endTurnTutorial, 7500);
                        endTurnTutorial = true;
                    }
                }
            }


@@ 454,6 467,7 @@ namespace Kabul
            }

            gameUI.Update(gameTime);
            soundManager.Update();
        }

        public override void UnloadContent()


@@ 744,7 758,6 @@ namespace Kabul

            foreach (UnitToken token in tokensInPlay)
            {
                Console.WriteLine(token.currentLocation);
                if (token.currentLocation == tokenLocation.courtyard)
                {
                    if (token.currentDisposition != tokenDisposition.blockading && token.ammoCount > 0)

M LanguageManager.cs => LanguageManager.cs +16 -10
@@ 30,6 30,8 @@ namespace Sionnach
        public static string FULLSCREENSTRING = "Fullscreen";
        public static string APPLYSTRING = "Apply";

        public static string TUTORIAL = "Tutorial";

        public static string ENDTURN = "End Turn";

        public static string playersTurn = "Player's Turn";


@@ 61,9 63,9 @@ namespace Sionnach
        public static string turnCountString = "Turns Elapsed";
        public static string aliveCountString = "Defenders Remaining";

        public static string DispositionTutorial = "There are two actions to toggle between\nfor most units: Fire, and Blockade.\nBlockade makes units take cover in squares\nother than the Courtyard,\nwhere they will attempt to barricade the gate.\nFire shoots at enemies outside.";
        public static string BurnesDispositionTutorial = "Burnes has an additional disposition\nmarker, Speech. From the balcony, he can attempt to calm down the crowd outside,\nbut while there he is more vulnerable to gunfire.";
        public static string endTurnTutorial = "On turn end, your units will act out their effects,\nthen the enemy turn will occur. Enemies\nwill appear, move forward, or attack.";
        public static string DispositionTutorial = "There are two actions to toggle between for most units: Fire, and Blockade. Blockade makes units take cover in squares other than the Courtyard, where they will attempt to barricade the gate. Fire shoots at enemies outside.";
        public static string BurnesDispositionTutorial = "Burnes has an additional disposition marker, Speech. From the balcony, he can attempt to calm down the crowd outside, but while there he is more vulnerable to gunfire.";
        public static string endTurnTutorial = "On turn end, your units will act out their effects, then the enemy turn will occur. Enemies will appear, move forward, or attack.";
        public static string unitPlace = "Units can be placed in each of the highlighted boxes.";

        public static void setLanguage(language desLanguage)


@@ 82,6 84,8 @@ namespace Sionnach
                APPLYSTRING = "Athrú";
                NOTESSTRING = "Nótaí";

                TUTORIAL = "Teagaisc";

                ENDTURN = "Deireadh Seala";

                playersTurn = "Seala na Imreoir";


@@ 113,9 117,9 @@ namespace Sionnach
                turnCountString = "Casadh na caite";
                aliveCountString = "Cósantóirí fós beo";

                DispositionTutorial = "Beidh dhá gníomhartha go timthriall ó\nle na aoinaid: a lámhach, agus a chosaint.\nDéanann cosaint aonaid a cheilt in áiteanna\nseachas an gclós. Má tá siad sa chlós cuirfidh\nsiad baracáid ar an ngeata. Tá an\nlámhach ag naimhde taobh amuigh";
                BurnesDispositionTutorial = "Tá gníomh eile ag Burnes, óráid.\nIs féidir leis iarracht a dhéanamh\nna naimhde ar an mbalcóin a mhaolú, ach tá\nsé níos leochailí ó ionsaí.";
                endTurnTutorial = "Tar éis do seala, gníomhóidh d’aonaid,\nansin gníomhóidh na naimhde. Beidh namhaid\nle feiceáil, ag bogadh ar aghaidh,\nnó ag ionsaí.";
                DispositionTutorial = "Beidh dhá gníomhartha go timthriall ó le na aoinaid: a lámhach, agus a chosaint. Déanann cosaint aonaid a cheilt in áiteanna seachas an gclós. Má tá siad sa chlós cuirfidh siad baracáid ar an ngeata. Tá an lámhach ag naimhde taobh amuigh";
                BurnesDispositionTutorial = "Tá gníomh eile ag Burnes, óráid. Is féidir leis iarracht a dhéanamh na naimhde ar an mbalcóin a mhaolú, ach tá sé níos leochailí ó ionsaí.";
                endTurnTutorial = "Tar éis do seala, gníomhóidh d’aonaid, ansin gníomhóidh na naimhde. Beidh namhaid le feiceáil, ag bogadh ar aghaidh, nó ag ionsaí.";
                unitPlace = "Is féidir chur ar aonaid in aon cheann na spásanna a lasta.";
            }
            else if (desLanguage == language.bearla)


@@ 130,6 134,8 @@ namespace Sionnach
                FULLSCREENSTRING = "Fullscreen";
                APPLYSTRING = "Apply";

                TUTORIAL = "Tutorial";

                ENDTURN = "End Turn";

                playersTurn = "Player's Turn";


@@ 142,7 148,7 @@ namespace Sionnach

                firstHelpBox = "Drag and drop units on boxes. Press end turn when done.";
                secondHelpBox = "Right click to cycle through actions for units in spaces.";
                thirdHelpBox = "The red bar below a unit's portrait is it's health.\nThe yellow bar is it's ammunition supply.";
                thirdHelpBox = "The red bar below a unit's portrait is it's health. The yellow bar is it's ammunition supply.";

                McNaughten = "Kabul Encampment";
                ReturnJourney = "Return";


@@ 161,9 167,9 @@ namespace Sionnach
                turnCountString = "Turns Elapsed";
                aliveCountString = "Defenders Remaining";

                DispositionTutorial = "There are two actions to toggle between\nfor most units: Fire, and Blockade.\nBlockade makes units take cover in squares\nother than the Courtyard,\nwhere they will attempt to barricade the gate.\nFire shoots at enemies outside.";
                BurnesDispositionTutorial = "Burnes has an additional disposition\nmarker, Speech. He can attempt to calm down the crowd outside,\nbut on the balcony he is more vulnerable to gunfire.";
                endTurnTutorial = "On turn end, your units will act out their effects,\nthen the enemy turn will occur. Enemies\nwill appear, move forward, or attack.";
                DispositionTutorial = "There are two actions to toggle between for most units: Fire, and Blockade. Blockade makes units take cover in squares other than the Courtyard, where they will attempt to barricade the gate. Fire shoots at enemies outside.";
                BurnesDispositionTutorial = "Burnes has an additional disposition marker, Speech. He can attempt to calm down the crowd outside, but on the balcony he is more vulnerable to gunfire.";
                endTurnTutorial = "On turn end, your units will act out their effects, then the enemy turn will occur. Enemies will appear, move forward, or attack.";
                unitPlace = "Units can be placed in each of the highlighted boxes.";
            }
        }

M MainMenu.cs => MainMenu.cs +15 -1
@@ 27,6 27,7 @@ namespace Kabul
        DynamicSpriteFont font30, font24, titleFont, subtitleFont;

        Button newGameButton, optionsButton, designerNotesButton, exitButton;
        Checkbox tutorialCheckbox;

        List<Button> buttons = new List<Button>();



@@ 34,8 35,10 @@ namespace Kabul
        Point optionsPosition = new Point(Utilities.gameWindowWidth / 2, 400);
        Point designersNotesPosition = new Point(Utilities.gameWindowWidth / 2, 450);
        Point exitPosition = new Point(Utilities.gameWindowWidth / 2, 500);
        Point tutorialCheckboxPosition = new Point(20, Utilities.gameWindowHeight - 20);

        Point buttonSize = new Point(250, 36);
        Point checkBoxSize = new Point(36, 36);

        Vector2 titlePosition = new Vector2(Utilities.gameWindowWidth / 2, 150);
        Vector2 subtitlePosition = new Vector2(Utilities.gameWindowWidth / 2, 225);


@@ 53,6 56,8 @@ namespace Kabul
            designerNotesButton = new Button(stateManager, LanguageManager.NOTESSTRING, designersNotesPosition, buttonSize, font30);
            exitButton = new Button(stateManager, LanguageManager.EXITGAMESTRING, exitPosition, buttonSize, font30);

            tutorialCheckbox = new Checkbox(spriteBatch, LanguageManager.TUTORIAL, tutorialCheckboxPosition, checkBoxSize, font30);

            newGameButton.Clicked += new EventHandler(newGame);
            optionsButton.Clicked += new EventHandler(optionsClick);
            designerNotesButton.Clicked += new EventHandler(notesClicked);


@@ 63,6 68,8 @@ namespace Kabul
            buttons.Add(designerNotesButton);
            buttons.Add(exitButton);

            buttons.Add(tutorialCheckbox);

            titlePosition.X -= (int)(titleFont.MeasureString("Kabul 1841").X / 2);
            subtitlePosition.X -= (int)(subtitleFont.MeasureString("The Siege of Alexander Burne's House").X / 2);



@@ 153,7 160,14 @@ namespace Kabul

        public void newGame(object sender, EventArgs e)
        {
            stateManager.ExitAndLoad(new GameState(stateManager));
            if (tutorialCheckbox.isThisChecked())
            {
                stateManager.ExitAndLoad(new GameState(stateManager, true));
            }
            else
            {
                stateManager.ExitAndLoad(new GameState(stateManager));
            }
        }
        public void optionsClick(object sender, EventArgs e)
        {

M PopUp.cs => PopUp.cs +48 -7
@@ 26,6 26,8 @@ namespace Sionnach
        public Point position;
        public Point size;

        int preferredWidth = 248;

        public Color upColor = new Color(44, 44, 44);
        public Color overColor = new Color(66, 66, 66);
        public Color downColor = new Color(100, 100, 100);


@@ 46,7 48,7 @@ namespace Sionnach
        Texture2D backgroundTexture, selectedTexture, normalTexture, imageTexture;

        DynamicSpriteFont textFont;
        Color textColour = Color.White;
        Color textColour = Color.Black;
        Point textPosition;
        string textString;



@@ 57,19 59,17 @@ namespace Sionnach
        {
            stateManager = StateManager;

            textString = Text;
            textFont = desFont;
            textString = breakString(Text);

            if (anchorPoint == Utilities.UILocationAnchor.centre)
            {
                int widthHolder = (int)textFont.MeasureString(textString).X;
                size.X = widthHolder + 96;
                size.X = preferredWidth;
                size.Y = (int)textFont.MeasureString(textString).Y + 96;
            }
            else
            {
                int widthHolder = (int)textFont.MeasureString(textString).X;
                size.X = widthHolder + 24;
                size.X = preferredWidth;
                size.Y = (int)textFont.MeasureString(textString).Y + 24;
            }



@@ 94,6 94,9 @@ namespace Sionnach
            }
            else if (anchorPoint == Utilities.UILocationAnchor.centre)
            {
                preferredWidth = 450;
                size.X = 450;
                textString = breakString(Text);
                position = new Point(Utilities.gameWindowWidth / 2, (Utilities.gameWindowHeight / 2) + yOffset + 6);
            }
            //rectangle = new Rectangle(Utilities.gameWindowWidth - (size.X / 2), position.Y - (size.Y / 2), size.X, size.Y);


@@ 162,6 165,44 @@ namespace Sionnach
            backgroundTexture = normalTexture;
        }

        public string breakString(string input)
        {
            string output = "";
            int desiredWidthOfString = preferredWidth - 24;
            List<string> lineSet = new List<string>();

            //Break string into words by space characters.
            //current line string then adds each additional words as long as the line width is less than preferred width.
            //If over preferred width, that is the line. Add to a list of strings for the lines. New line then starts at the word
            //That made it too long. Until the end.
            List<string> eachWord = input.Split(' ').ToList();

            string currentLine = "";

            foreach(string s in eachWord)
            {
                if ((int)textFont.MeasureString(currentLine + " " + s).X < desiredWidthOfString)
                {
                    currentLine += s + " ";
                }
                else
                {
                    currentLine = currentLine.Trim();
                    lineSet.Add(currentLine);
                    currentLine = s + " ";
                }
            }

            lineSet.Add(currentLine + " ");

            foreach(string s in lineSet)
            {
                output += s + '\n';
            }

            return output;
        }

        public void CenterText()
        {
            //float textWidth = stateManager.game.spriteFont.MeasureString(text.text).X; //measure string


@@ 202,7 243,7 @@ namespace Sionnach
            spriteBatch.Draw(backgroundTexture, new Rectangle(leftElementOffset + elementOffset, topElementOffset + elementOffset, size.X - (elementOffset * 2), size.Y - (elementOffset * 2)), new Rectangle(elementOffset, elementOffset, elementOffset, elementOffset), Color.White);


            spriteBatch.DrawString(textFont, textString, Utilities.PointToVector2(textPosition), Color.White);
            spriteBatch.DrawString(textFont, textString, Utilities.PointToVector2(textPosition), textColour);

            //Make mouse over false as it is checked every frame.
            over = false;

M StateManager.cs => StateManager.cs +3 -0
@@ 28,6 28,7 @@ namespace Sionnach
        public Matrix drawMatrix = Matrix.CreateScale(4, 4, 1);
        Color clearColour = new Color(40, 40, 40);
        public Texture2D buildingStatusIcons;
        public SoundManager soundManager;

        public StateManager(FNAGame Game)
        {


@@ 42,6 43,8 @@ namespace Sionnach
        {
            spriteBatch = game.spriteBatch;

            soundManager = this.game.soundManager;

            LoadContent();
        }


M TextureManager.cs => TextureManager.cs +9 -1
@@ 16,7 16,7 @@ namespace Sionnach
{
    public static class TextureManager
    {
        public static Texture2D checkboxTextureUnselected, checkboxTextureSelected;
        public static Texture2D checkboxTexture, checkboxTextureSelected;
        public static Texture2D buttonTexture, buttonSelectedTexture;
        public static Texture2D spinnerTexture;
        public static Texture2D cursorTexture;


@@ 46,6 46,14 @@ namespace Sionnach
            buttonSelectedTexture = Texture2D.FromStream(spriteBatch.GraphicsDevice, fileStream);
            fileStream.Close();

            fileStream = TitleContainer.OpenStream("Content/Checkbox9Slice.png");
            checkboxTexture = Texture2D.FromStream(spriteBatch.GraphicsDevice, fileStream);
            fileStream.Close();

            fileStream = TitleContainer.OpenStream("Content/Checkbox9SliceChecked.png");
            checkboxTextureSelected = Texture2D.FromStream(spriteBatch.GraphicsDevice, fileStream);
            fileStream.Close();

            fileStream = TitleContainer.OpenStream("Content/MenuBackground.png");
            menuBackgroundTexture = Texture2D.FromStream(spriteBatch.GraphicsDevice, fileStream);
            fileStream.Close();

M UI.cs => UI.cs +3 -3
@@ 34,10 34,10 @@ namespace Sionnach
            panel = new UIPanel(stateManager, new Point(Utilities.gameWindowWidth-125, Utilities.gameWindowHeight/2), new Point(250, Utilities.gameWindowHeight));
            UIRectangle = panel.rectangle;

            Button testButton = new Button(stateManager, LanguageManager.ENDTURN, panel.bottom - new Point(125, 30), new Point(240, 50), stateManager.game.fontSystem.GetFont(24));
            testButton.Clicked += new EventHandler(endTurnPress);
            Button endTurnButton = new Button(stateManager, LanguageManager.ENDTURN, panel.bottom - new Point(125, 35), new Point(230, 50), stateManager.game.fontSystem.GetFont(24));
            endTurnButton.Clicked += new EventHandler(endTurnPress);

            buttons.Add(testButton);
            buttons.Add(endTurnButton);

            toolTip = new Tooltip(stateManager, "Sample", new Point(0, 0), new Point(128, 28));
        }

M UIPanel.cs => UIPanel.cs +0 -2
@@ 74,8 74,6 @@ namespace Sionnach
        public void Click()
        {
            Clicked.Invoke(this, EventArgs.Empty);

            Console.WriteLine("Panel clicked");
        }

        public EventHandler Clicked;