Exemplo n.º 1
0
        public void drawDesktop(IconRenderer ir, FontRenderer dfr)
        {
            ir.renderIcon(5, 20, 'C', 4);
            dfr.renderString(10, 65, "MY PC");

            ir.renderIcon(65, 20, 'N', 4);
            dfr.renderString(62, 65, "NOTEPAD");
        }
Exemplo n.º 2
0
        public void renderWindow(BufferedDisplayDriver display, IconRenderer ir, FontRenderer fr)
        {
            for (int i = 0; i <= width; i++)
            {
                for (int i2 = 0; i2 <= height; i2++)
                {
                    display.setPixel(i + x, i2 + y, 63);
                }
            }
            for (int i = 0; i <= width; i++)
            {
                display.setPixel(i + x, y, 0);
                display.setPixel(i + x, y + 20, 0);
                display.setPixel(i + x, y + height, 0);
            }
            for (int i = 0; i <= height; i++)
            {
                display.setPixel(x, y + i, 0);
                display.setPixel(x + width, y + i, 0);
            }

            ir.renderIcon(x + width - 20, y, 'X', 2);
            ir.renderIcon(x + width - 40, y, 'M', 2);
            ir.renderIcon(x + width - 60, y, '_', 2);

            fr.renderString(x + 10, y + 12, "WINDOW");
        }
Exemplo n.º 3
0
        protected override void Run()
        {
            display.clear(63);
            fr.renderString(5, 5, "HI THERE. MY NAME IS PAUL.");
            fr.renderString(5, 25, time.Hour().ToString() + ":" + time.Minute().ToString() + ":" + time.Second().ToString() + "    " + fps.ToString());

            if (second != time.Second())
            {
                fps    = temp;
                temp   = 0;
                second = time.Second();
            }
            else
            {
                temp++;
            }

            display.step();
        }
Exemplo n.º 4
0
        public static void renderWindow(BufferedDisplayDriver display, IconRenderer ir, FontRenderer fr)
        {
            if (isVisible)
            {
                for (int i = 0; i <= width; i++)
                {
                    for (int i2 = 0; i2 <= height; i2++)
                    {
                        display.setPixel(i + x, i2 + y, 41);
                    }
                }
                for (int i = 0; i <= width; i++)
                {
                    for (int i2 = 0; i2 <= 20; i2++)
                    {
                        display.setPixel(x + i, y + i2, 40);
                    }
                }
                for (int i = 0; i <= width; i++)
                {
                    display.setPixel(i + x, y, 25);
                    display.setPixel(i + x, y + 20, 25);
                    display.setPixel(i + x, y + height, 25);
                }
                for (int i = 0; i <= height; i++)
                {
                    display.setPixel(x, y + i, 25);
                    display.setPixel(x + width, y + i, 25);
                }

                ir.renderIcon(x + width - 20, y, 'X', 2);
                ir.renderIcon(x + width - 40, y, 'M', 2);
                ir.renderIcon(x + width - 60, y, '_', 2);

                fr.renderString(x + 10, y + 9, "NOTEPAD", 55, 2, 2);
            }
        }
Exemplo n.º 5
0
        public void draw(FontRenderer fr, FontRenderer dfr, Boolean startMenu, IconRenderer ir)
        {
            display.clearReal(63);

            for (int i = 0; i <= 120; i++)
            {
                for (int i2 = 0; i2 <= 15; i2++)
                {
                    display.setPixel(i, i2, 25);
                }
            }
            for (int i = 120; i <= 320; i++)
            {
                for (int i2 = 0; i2 <= 15; i2++)
                {
                    display.setPixel(i, i2, 43);
                }
            }

            drawDesktop(ir, dfr);

            if (startMenu)
            {
                for (int i = 0; i <= 120; i++)
                {
                    for (int i2 = 0; i2 <= 90; i2++)
                    {
                        display.setPixel(i, i2 + 15, 43);
                    }
                }
                for (int i = 0; i <= 85; i++)
                {
                    for (int i2 = 0; i2 <= 15; i2++)
                    {
                        display.setPixel(i + 25, i2 + 25, 25);
                    }
                }
                ir.renderIcon(10, 27, 'C', 1);
                fr.renderString(30, 30, "MY COMPUTER");

                for (int i = 0; i <= 85; i++)
                {
                    for (int i2 = 0; i2 <= 15; i2++)
                    {
                        display.setPixel(i + 25, i2 + 50, 25);
                    }
                }
                ir.renderIcon(10, 52, 'N', 1);
                fr.renderString(30, 55, "NOTEPAD");

                for (int i = 0; i <= 85; i++)
                {
                    for (int i2 = 0; i2 <= 15; i2++)
                    {
                        display.setPixel(i + 25, i2 + 80, 25);
                    }
                }
                ir.renderIcon(10, 82, 'P', 1);
                fr.renderString(30, 85, "REBOOT");
            }

            if (second != time.Second())
            {
                fps    = temp;
                temp   = 0;
                second = time.Second();
            }
            else
            {
                temp++;
            }

            fr.renderString(5, 5, "HELIX PYRO OS");
            fr.renderString(125, 5, time.Hour().ToString() + ":" + time.Minute().ToString() + ":" + time.Second().ToString() + "    " + fps.ToString());
        }