diff --git a/isometric-park-fna/UI/BudgetWindow.cs b/isometric-park-fna/UI/BudgetWindow.cs --- a/isometric-park-fna/UI/BudgetWindow.cs +++ b/isometric-park-fna/UI/BudgetWindow.cs @@ -36,9 +36,10 @@ this.budget = budget; this.previous_budget = previous_budget; - if ((mouseCur.LeftButton == ButtonState.Pressed) - && MathUtils.BetweenExclusive(mouseCur.X, width+x-20, width+x) - && MathUtils.BetweenExclusive(mouseCur.Y, y+bar_height, y+bar_height+20) + if ((mouseCur.LeftButton == ButtonState.Released) + && (mousePrev.LeftButton == ButtonState.Pressed) + && MathUtils.BetweenExclusive(mouseCur.X, width+x-20, width+x) + && MathUtils.BetweenExclusive(mouseCur.Y, y+bar_height, y+bar_height+20) ) { return false; @@ -104,9 +105,9 @@ } } + Vector2 dimensions = font.MeasureString("X"); + batch.DrawString(font, "X", new Vector2(x+width -20 + (dimensions.X/2), y+bar_height), Color.Black); FilledRectangle.drawFilledRectangle(batch, new Rectangle(x + width - 20, y+bar_height, 20, 20), Color.LightGray); - Vector2 dimensions = font.MeasureString("X"); - batch.DrawString(font, "X", new Vector2(x+width -20 + (dimensions.X/2), y+bar_height), Color.Black); batch.DrawString(font, String.Format("BUDGET REPORT FOR {0:MMMMM yyyy}", this.budget.DateTime), new Vector2(x, bar_height * 1 + y), Color.Black);