# HG changeset patch # User alys # Date 2021-01-29 04:14:30 # Node ID 7ca5e64d6ad0af949534fccfea2bd6f1593a6d91 # Parent 1de4452f82e95e372f94c245c42b71af192e7e1a Fix close button. diff --git a/isometric-park-fna/BudgetWindow.cs b/isometric-park-fna/BudgetWindow.cs --- a/isometric-park-fna/BudgetWindow.cs +++ b/isometric-park-fna/BudgetWindow.cs @@ -17,6 +17,9 @@ private Vector2 mouseStart; private MouseState mousePrev; + private static int bar_height = 25; + + public BudgetWindow(Budget budget, SpriteFont font, int start_x, int start_y) { @@ -31,8 +34,8 @@ this.budget = budget; if ((mouseCur.LeftButton == ButtonState.Pressed) - && MathUtils.Between(mouseCur.X, 700+x-40, 700+x) - // && MathUtils.Between(mouseCur.Y, 500+y-20, 500 + y) + && MathUtils.Between(mouseCur.X, 700+x-20, 700+x) + && MathUtils.Between(mouseCur.Y, y+bar_height, y+bar_height+20) ) { return false; @@ -69,7 +72,6 @@ { - int bar_height = 25; int height = 500; FilledRectangle.drawFilledRectangle(batch, new Rectangle(x - 20, y+bar_height, 20, height), Color.White);