public void Test_Decorator_Based_Interface() { var deco = new MenuWindow(new Window()); deco.Draw(); var deco2 = new SideBarWindow(deco); deco2.Draw(); var deco3 = new StatusBarWindow(deco); deco3.Draw(); var deco4 = new StatusBarWindow(deco2); deco4.Draw(); /* Expected Output: * * deco: * Menu Window * Decorator Window * Window * */ }
public override void Draw(SpriteBatch spriteBatch) { menuWindow.Draw(spriteBatch, font, Color.White); if (OptionBox.isVisible) { OptionBox.Draw(spriteBatch, choice, font); } }
public override void Draw(SpriteBatch s) { if (!inKeyMenu) { optionsMenu.Draw(s, font, Color.White); } else { keyconfigMenu.Draw(s, font, Color.White); } }
public override void Draw(SpriteBatch spriteBatch) { menu.Draw(spriteBatch, font, Color.White); spriteBatch.DrawString( font, KeyConfig.KeyList[4].ToString() + " to Select | " + KeyConfig.KeyList[5] + " to go back", new Vector2( 5, ScreenHandler.SCREEN_HEIGHT - ScreenHandler.FontHeight - 5), Color.White); }
static void Main(string[] args) { Console.CursorVisible = false; MenuWindow menuWindow = new MenuWindow(); menuWindow.SetButtonActive(ButtonName.Start); menuWindow.SetButtonActive(ButtonName.Quit); menuWindow.Draw(); //Window menu = new Window(0, 0, 120, 30, "MENU"); //menu.Draw(); /* * Diamond diamond = new Diamond(5, 10); * diamond.Draw(); * * Candle candle = new Candle(40, 3); * candle.Draw(); * * * Rectangle rectangle = new Rectangle(60, 10, 15, 10); * rectangle.Draw(); * * Rectangle rectangle2 = new Rectangle(60, 7, 5, 7, '+'); * rectangle2.Draw(); * * int x = 30; * int y = 15; * int width = 20; * TextLine textLine = new TextLine(x, y, width, "My super todo list app!"); * textLine.Draw(); * * * * * Console.ReadKey(); * */ Console.ReadKey(); Console.SetCursorPosition(0, 25); }
/// <summary> /// This method is called once per frame (60fps is desired) to draw. /// </summary> public override void Draw(SpriteBatch spriteBatch) { if (IsVisible && !StopDrawing) //StopDrawing is used while transitioning zones { //updateSpriteLocation(player); //graphics.GraphicsDevice.Clear(Color.CornflowerBlue); //GameDraw.drawGround(map, player); GameDraw.DrawAdjacentGround(world, player); GameDraw.DrawScenery(world); GameDraw.DrawPlayer(player, world, player.spritePosition, new Rectangle(0, 0, 116, 153)); GameDraw.DrawNPCs(world); if (inMenu) { menu.Draw(spriteBatch, font, Color.White); } } }
public override void Draw(SpriteBatch spriteBatch) { menuWindow.Draw(spriteBatch, font, Color.White); }