Changeset 13530
- Timestamp:
- 01/17/16 18:12:10 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/PackingPlanVisualizations/3D/PackingGame.cs
r13497 r13530 49 49 50 50 private CenteredContainer container; 51 private MouseManager Mouse;51 private MouseManager mouseManager; 52 52 #endregion Global Private Variables 53 53 … … 66 66 graphicsDeviceManager.PreparingDeviceSettings += 67 67 (object sender, PreparingDeviceSettingsEventArgs e) => { 68 e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X4; 68 e.GraphicsDeviceInformation.PresentationParameters.MultiSampleCount = MSAALevel.X4; 69 69 return; 70 70 }; 71 var controlColor = Color.White; // System.Drawing.SystemColors.Control;71 var controlColor = Color.White; 72 72 backgroundColor = new Color(controlColor.R, controlColor.G, controlColor.B, controlColor.A); 73 73 74 Mouse= new MouseManager(this);74 mouseManager = new MouseManager(this); 75 75 } 76 76 77 77 public void SetSize(int width, int height) { 78 79 78 graphicsDeviceManager.PreferredBackBufferHeight = height; 80 79 graphicsDeviceManager.PreferredBackBufferWidth = width; 81 80 } 82 83 84 81 85 82 public void InitializeContainer(BasicCuboidShape containerShape) { … … 105 102 base.Initialize(); 106 103 InitializeWorld(); 107 previousMouseState = Mouse.GetState(); 108 Console.WriteLine("Initial bounds:" + Window.ClientBounds); 104 previousMouseState = mouseManager.GetState(); 109 105 this.Window.IsMouseVisible = true; 110 106 } … … 189 185 190 186 #endregion 191 }192 193 194 protected override void LoadContent() {195 196 187 } 197 188 … … 237 228 base.Update(gameTime); 238 229 } 230 239 231 #region Mouse-Handling Variables 240 232 private MouseState previousMouseState; … … 243 235 private Vector2 currentViewAngle = new Vector2(0, 0); 244 236 #endregion Mouse-Handling Variables 237 245 238 private void ComputeMouseHandling() { 246 MouseState mouseState = Mouse.GetState(); 247 239 MouseState mouseState = mouseManager.GetState(); 248 240 ComputeLeftMouseBtnHandling(mouseState); 249 241 ComputeMouseWheelHandling(mouseState);
Note: See TracChangeset
for help on using the changeset viewer.