コード例 #1
0
ファイル: MenuScreen.cs プロジェクト: a-r-t/monogame-3.8-test
 public override void Draw(GraphicsHandler graphicsHandler)
 {
     background.Draw(graphicsHandler);
     playGameText.Draw(graphicsHandler);
     creditsText.Draw(graphicsHandler);
     settingsText.Draw(graphicsHandler);
     graphicsHandler.DrawFilledRectangleWithBorder(new Rectangle(pointerLocationX, pointerLocationY, 20, 20), new Color(49, 207, 240), Color.Black, 2);
 }
コード例 #2
0
        public override void DrawMessage(GraphicsHandler graphicsHandler)
        {
            // draws a box with a border (think like a speech box)
            graphicsHandler.DrawFilledRectangleWithBorder(new Microsoft.Xna.Framework.Rectangle(GetCalibratedXLocation().Round() - 2, GetCalibratedYLocation().Round() - 24, 40, 25), Color.White, Color.Black, 2);

            // draws message "Hello" in the above speech box
            message.SetLocation(GetCalibratedXLocation() + 2, GetCalibratedYLocation() - 8);
            message.Draw(graphicsHandler);
        }