Exemple #1
0
 /// <summary>
 /// Draws the plant viewing window
 /// </summary>
 /// <param name="c">The plant to draw the viewing window for</param>
 private void drawPlantView(Plant p)
 {
     drawBack();
     Simulation.getGraphicsDeviceManager().GraphicsDevice.SamplerStates[0] = SamplerState.PointWrap;
     spriteBatch.Begin(0, null, SamplerState.PointWrap, null, null);
     Rectangle r = new Rectangle((Display.getWindowWidth() - 800) / 2 + 10, Display.getWindowHeight() - 130, 120, 120);
     Texture2D tex = null;
     if(p.isDepeleted())
     {
         tex = depletedPlantTile;
     }
     else
     {
         tex = plantTile;
     }
     spriteBatch.Draw(tex, r, Color.White);
     spriteBatch.End();
     string[] status = inputHandler.getPlantInfo(p);
     Vector2 topLeft = new Vector2((Display.getWindowWidth() - 800) / 2 + 10 + 120 + 10, Display.getWindowHeight() - 130);
     string title = "Plant";
     if(p.isDepeleted())
     {
         title += " (depleted)";
     }
     drawStrings(topLeft, title, status, 4);
 }