public void Draw(GraphicsDevice graphicsDevice, SpriteBatch batch, PrimitiveDrawer drawer, FontHandler font) { Vector2 headPlacement = testingRectangle.GetVector(); headPlacement.Y -= 46; headPlacement.X += (testingRectangle.GetWidth() / 2); if(textBox.GetSelected()) textBox.Draw(batch, drawer, font, graphicsDevice); drawer.DrawRoundedRectangle(graphicsDevice, testingRectangle.ScalePosition(-1,-1).ScaleSize(2,2), Color.Black); drawer.DrawRoundedRectangle(graphicsDevice, testingRectangle, color); drawer.DrawCircle(graphicsDevice, headPlacement, 50, Color.Black, sides); drawer.DrawCircle(graphicsDevice, headPlacement, 49, Color.Wheat, sides); Vector2 lower = testingRectangle.GetVector(); lower.Y += 30; lower.X += testingRectangle.GetWidth(); headPlacement.Y += -16; headPlacement.X += -28; // e e\n , ____ , string face = " l l\n"; if (squareOrCircle) face = " n n\n"; bool blinking = false; string face2 = " ____ "; if ((blink > 43 && blink < 56) ) { face = " _ _\n"; blinking = true; } if(blink == 110) { blink = 0; } if(blink % 140 < 15 ) { face2 = " ____ "; } left.Draw(graphicsDevice, batch, drawer, font); right.Draw(graphicsDevice, batch, drawer, font); lleft.Draw(graphicsDevice, batch, drawer, font); lright.Draw(graphicsDevice, batch, drawer, font); Vector2 dis = new Vector2(TetrisGameRunner.GetOffsetX(), TetrisGameRunner.GetOffsetY()); batch.DrawString(font.GetVerdana(), "Frame : " + ff + " "+"S: Save Frame C: Correct Frame V: Correct Frame Dynamic\nH: Hide Dots", new Vector2(300, 0) + dis, Color.White); batch.DrawString(((!blinking) ? font.GetWingdings() : font.GetVerdana()), face, headPlacement + dis, Color.Black); batch.DrawString(font.GetVerdana(), "\n\n", testingRectangle.GetVector(), Color.Black, 0, dis + new Vector2(), .82f, SpriteEffects.None, 0); batch.DrawString(font.GetVerdana(), "\n"+face2, dis + headPlacement, Color.Black); }
public override void Draw(PrimitiveDrawer drawer, GraphicsDevice graphics, SpriteBatch batch, FontHandler font) { Vector2 headPlacement = GetVector(); headPlacement.Y -= 46; headPlacement.X += (GetWidth() / 2); base.Draw(drawer, graphics, batch, font); drawer.DrawCircle(graphics, headPlacement, 50, Color.Black, 60); drawer.DrawCircle(graphics, headPlacement, 49, Color.Wheat, 60); Vector2 lower = GetVector(); lower.Y += 30; lower.X += GetWidth(); headPlacement.Y += -16; headPlacement.X += -28; // e e\n , ____ , string face = " l l\n"; bool blinking = false; string face2 = " ____ "; if ((blink > 43 && blink < 56)) { face = " _ _\n"; blinking = true; } if (blink == 110) { blink = 0; } if (blink % 140 < 15) { face2 = " ____ "; } if (left != null) { left.Draw(graphics, batch, drawer, font); right.Draw(graphics, batch, drawer, font); leg_left.Draw(graphics, batch, drawer, font); leg_right.Draw(graphics, batch, drawer, font); } Vector2 dis = new Vector2(TetrisGameRunner.GetOffsetX(), TetrisGameRunner.GetOffsetY()); batch.DrawString(((!blinking) ? font.GetWingdings() : font.GetVerdana()), face, headPlacement + dis, Color.Black); batch.DrawString(font.GetVerdana(), "\n\n", GetVector(), Color.Black, 0, dis + new Vector2(), .82f, SpriteEffects.None, 0); batch.DrawString(font.GetVerdana(), "\n" + face2, dis + headPlacement, Color.Black); }
public override void Draw(PrimitiveDrawer drawer, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphics, SpriteBatch batch, FontHandler font) { if(borderMode) { drawer.DrawCircle(graphics, GetVector(), GetWidth(), border); drawer.DrawCircle(graphics, GetVector(), GetWidth()-1, color); } else { drawer.DrawCircle(graphics, GetVector(), GetWidth(), color); } if(editing) { drawer.DrawFilledRectangle(graphics, point, Color.White); } }
private void RenderVerts(ConvexPolyForm poly) { for (int i = 0; i < poly.Vertices.Count; i++) { Point p = poly.Vertices[i]; PrimitiveDrawer.DrawCircle(new Circle(p.X, p.Y, 16), new Color(0, 0, 0, 1)); if (i == _selectedVert && _editState == EditState.VertexPressed) { PrimitiveDrawer.DrawFilledCircle(p, 15, new Color(0, 1, 1, 1)); } else { PrimitiveDrawer.DrawFilledCircle(p, 15, new Color(1, 1, 1, 1)); } } }
public override void Draw(PrimitiveDrawer drawer, Microsoft.Xna.Framework.Graphics.GraphicsDevice graphics, SpriteBatch batch, FontHandler font) { if(!normal) graphics.BlendState = TetrisGameRunner.LightState(); for (int i = 0;i < 2;i++) { if(culled) drawer.DrawCulledCircle(graphics, GetVector(), GetWidth(), color, Color.Black, 60, new GameRectangle(320, 0, 1024 - 320, 768)); else { drawer.DrawCircle(graphics, GetVector(), GetWidth(), color, Color.Black, 60); } } graphics.BlendState = TetrisGameRunner.OriginalState(); if (editing) { drawer.DrawFilledRectangle(graphics, point, Color.White); } }