From 48c90afe772dc40072ae9d25868e4abb4d307015 Mon Sep 17 00:00:00 2001 From: BOTLester <58360400+BOTLester@users.noreply.github.com> Date: Mon, 15 Jun 2020 09:52:17 +0200 Subject: [PATCH] Window fixes --- Game1/Game1.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Game1/Game1.cs b/Game1/Game1.cs index 6af18be..73ac99c 100644 --- a/Game1/Game1.cs +++ b/Game1/Game1.cs @@ -3,6 +3,7 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using System; using System.IO; +using WinForm = System.Windows.Forms; namespace Game1 { @@ -84,8 +85,10 @@ namespace Game1 //Generates the map with some random values inventory.initInventorySystem(); + string path = directory + "Game1/Content/ML/Fertilizer_Prediction.csv"; - input.init(graphics, new Vector2(16,16), 56, 0); //Generates the starting size + int res = WinForm.Screen.PrimaryScreen.Bounds.Height; + input.init(graphics, new Vector2((float)Math.Floor(WinForm.Screen.PrimaryScreen.Bounds.Width/56*0.6f), (float)Math.Floor((WinForm.Screen.PrimaryScreen.Bounds.Height / 56f) - 7)), 56, 0); //Generates the starting size houseUnit.init(input.getTileSize(), input.getSpacing()); //Generates the house position tractorUnit.init(houseUnit.GetRectangle(), input); //Generates the Tractor tractorUnit.updateSizing(input, 0, houseUnit.getVector(), Time); //Updates the first Size of the Tractor