예제 #1
0
        public override void render(Bitmap target)
        {
            string str = "You found the " + item.name + "!";
            target.scaleDraw(Art.items, 3, target.width / 2 - 8 * 3, 2, item.icon * 16, 0, 16, 16, Art.GetColor(item.color));
            target.draw(str, (target.width - str.Length * 6) / 2 + 2, 60 - 10, Art.GetColor(0xffff80));

            str = item.description;
            target.draw(str, (target.width - str.Length * 6) / 2 + 2, 60, Art.GetColor(0xa0a0a0));

            if (tickDelay == 0) target.draw("-> Continue", 40, target.height - 40, Art.GetColor(0xffff80));
        }
예제 #2
0
파일: Bitmap.cs 프로젝트: rlods/PocDotNet
        public void draw(Bitmap bitmap, int xOffs, int yOffs)
        {
            for (int y = 0; y < bitmap.height; y++) {
                int yPix = y + yOffs;
                if (yPix < 0 || yPix >= height) continue;

                for (int x = 0; x < bitmap.width; x++) {
                    int xPix = x + xOffs;
                    if (xPix < 0 || xPix >= width) continue;

                    pixels[xPix + yPix * width] = bitmap.pixels[x + y * bitmap.width];
                }
            }
        }
예제 #3
0
파일: LoseMenu.cs 프로젝트: rlods/PocDotNet
        public override void render(Bitmap target)
        {
            target.draw(Art.logo, 0, 10, 0, 39, 160, 23, Art.GetColor(0xffffff));

            int seconds = player.time / 60;
            int minutes = seconds / 60;
            seconds %= 60;
            string timeString = minutes + ":";
            if (seconds < 10) timeString += "0";
            timeString += seconds;
            target.draw("Trinkets: " + player.loot + "/12", 40, 45 + 10 * 0, Art.GetColor(0x909090));
            target.draw("Time: " + timeString, 40, 45 + 10 * 1, Art.GetColor(0x909090));

            if (tickDelay == 0) target.draw("-> Continue", 40, target.height - 40, Art.GetColor(0xffff80));
        }
예제 #4
0
파일: Bitmap.cs 프로젝트: rlods/PocDotNet
        public void draw(Bitmap bitmap, int xOffs, int yOffs, int xo, int yo, int w, int h, int col)
        {
            for (int y = 0; y < h; y++) {
                int yPix = y + yOffs;
                if (yPix < 0 || yPix >= height) continue;

                for (int x = 0; x < w; x++) {
                    int xPix = x + xOffs;
                    if (xPix < 0 || xPix >= width) continue;

                    int src = bitmap.pixels[(x + xo) + (y + yo) * bitmap.width];
                    if (src >= 0) {
                        pixels[xPix + yPix * width] = src * col;
                    }
                }
            }
        }
예제 #5
0
파일: Art.cs 프로젝트: rlods/PocDotNet
 public static Bitmap LoadBitmap(System.Drawing.Bitmap bmp)
 {
     int w = bmp.Width;
     int h = bmp.Height;
     Bitmap result = new Bitmap(w, h);
     for (int y = 0; y < h; ++y)
     {
         for (int x = 0; x < w; ++x)
         {
             System.Drawing.Color pixel = bmp.GetPixel(x, y);
             int argb = pixel.ToArgb();
             int col = (argb & 0xf) >> 2;
             if (pixel.A == 255 && pixel.R == 255 && pixel.G == 0 && pixel.B == 255) col = -1;
             result.pixels[x + y * w] = col;
         }
     }
     return result;
 }
예제 #6
0
        public override void render(Bitmap target)
        {
            target.fill(0, 0, 160, 120, 0);
            target.draw(Art.logo, 0, 8, 0, 0, 160, 36, Art.GetColor(0xffffff));

            for (int i = 0; i < options.Length; i++)
            {
                string msg = options[i];
                int col = 0x909090;
                if (selected == i)
                {
                    msg = "-> " + msg;
                    col = 0xffff80;
                }
                target.draw(msg, 40, 60 + i * 10, Art.GetColor(col));
            }
            target.draw("Copyright (C) 2011 Mojang", 1 + 4, 120 - 9, Art.GetColor(0x303030));
        }
예제 #7
0
파일: Menu.cs 프로젝트: rlods/PocDotNet
 public virtual void render(Bitmap target)
 {
 }