Esempio n. 1
0
        protected internal override void Draw(double deltaTime, Camera camera)
        {
            var g = Drawer.BindGraphicsDraw();

            g.Clip = new Region(new RectangleF(0, 0, MMW.Width, MMW.Height));
            bool draw = false;

            foreach (var t in texts.Values)
            {
                if (string.IsNullOrWhiteSpace(t.text))
                {
                    continue;
                }
                if (MMW.ClientSize.Width < t.x || MMW.ClientSize.Height < t.y)
                {
                    continue;
                }
                g.DrawString(t.text, Font, Brush, t.x + 1, t.y + 1);
                g.DrawString(t.text, Font, Brushes.Black, t.x, t.y);
                draw = true;
            }
            g.ResetClip();
            if (draw)
            {
                Drawer.IsGraphicsUsed = true;
            }
        }
Esempio n. 2
0
        protected override void Draw(double deltaTime, Camera camera)
        {
            var g = Drawer.BindGraphicsDraw();

            controls.ForEach(c => c.Draw(g, deltaTime));

            Drawer.IsGraphicsUsed = true;
        }
        protected override void Draw(double deltaTime, Camera camera)
        {
            var g = Drawer.BindGraphicsDraw();

            label.Draw(g, deltaTime);
            tabCtr.Draw(g, deltaTime);

            Drawer.IsGraphicsUsed = true;
        }
Esempio n. 4
0
        protected override void Draw(double deltaTime, Camera camera)
        {
            var g     = Drawer.BindGraphicsDraw();
            var white = new Color4(1.0f, 1.0f, 1.0f, rate);
            var black = new Color4(0.0f, 0.0f, 0.0f, rate);

            if (rate > 0.0f)
            {
                g.FillRectangle(new System.Drawing.SolidBrush(System.Drawing.Color.FromArgb(black.ToArgb())), new System.Drawing.Rectangle(0, 0, MMW.ClientSize.Width, MMW.ClientSize.Height));

                ControlDrawer.DrawString(g, "Now Loading...", MMW.ClientSize.Width - 200, MMW.ClientSize.Height - 48, white);
                if (!string.IsNullOrWhiteSpace(mes.mes))
                {
                    ControlDrawer.DrawString(g, mes.mes, 20, MMW.ClientSize.Height - 48, white);
                }

                Drawer.IsGraphicsUsed = true;
            }
        }
Esempio n. 5
0
        protected override void Draw(double deltaTime, Camera camera)
        {
            var g = Drawer.BindGraphicsDraw();

            // タイトルロゴ
            Drawer.DrawTexturePixeledAlignment(texTitle, ContentAlignment.TopCenter, 0.0f, 60.0f);
            Drawer.DrawTexturePixeledAlignment(texSubTitle, ContentAlignment.TopCenter, 0.0f, 160.0f);

            if (GameObject.Enabled)
            {
                controls.ForEach(c => c.Draw(g, deltaTime));
            }

            /*
             * if (state == State.ModeSelect)
             * {
             *  var pen = new Pen(Color.White, 2.0f);
             *  for (var i = 0; i < 4; i++)
             *  {
             *      Drawer.DrawTexturePixeledAlignment(texModes[i], ContentAlignment.TopLeft, 120.0f, MMW.ClientSize.Height + ((font.Size + 24.0f) * i) - 240.0f);
             *      if (i == modeSelectIndex)
             *      {
             *          var x = 120.0f;
             *          var y = MMW.ClientSize.Height + ((font.Size + 24.0f) * i) - 240.0f + font.Height;
             *          var w = texModes[i].Size.Width;
             *
             *          g.DrawLine(pen, x, y, MMWMath.Lerp(x, x + w, rate), y);
             *
             *          Drawer.DrawTexturePixeledAlignment(texStar, ContentAlignment.TopLeft, MMWMath.Lerp(x, x + w, rate) - texStar.Size.Width * 0.5f, y - texStar.Size.Height * 0.5f, Color4.White, -(float)MMW.TotalElapsedTime * 2.0f, 1.0f / 32.0f);
             *      }
             *  }
             * }
             * else if (state == State.Option)
             * {
             *
             * }*/

            Drawer.IsGraphicsUsed = true;
        }