Exemple #1
0
        public static void StartGUI()
        {
            Screen.SetGraphicsMode(VGAScreen.ScreenSize.Size320x200, VGAScreen.ColorDepth.BitDepth8);
            Screen.Clear(0);
            FontGui.SetupFont();
            FontGui.drawText("solaros gui v0.0.1b", 5, 5, 4, ref Screen); //mancono le lettere maiuscole
            while (true)                                                  //ciclo eterno per la gui
            {
                //int tic=0;
                DrawTime(240, 190, 0);
                DrawTime(240, 190, 4);
                Utilita.Attendi.AttendiSecondi(1);
                //tic++;
                //if (Cosmos.Hardware.RTC.Second.ToString("00") == "59")
                //{
                //FontGui.drawText(tic.ToString(),10, 30, 4, ref Screen);
                //DrawTime(240, 190, 0);
                //DrawTime(240, 190, 4);      //sovrascrive le sue stesse scritte da vedere la cancellazione
                //}
                //else
                //{

                //}
                // in fase di test
                // Draw mouse
                //uint curX = (uint)mouse.X; uint curY = (uint)mouse.Y;
                //if (oldx != curX || oldy != curY) UndrawMouse();
                //DrawMouse(curX, curY);
            }
        }
Exemple #2
0
        public static void DrawTime(uint __x, uint __y, uint __color)
        {
            string hour   = RTC.Hour.ToString("00");
            string minute = RTC.Minute.ToString("00");
            string second = RTC.Second.ToString("00");

            for (int i = 0; i != 9; i++)
            {
                string ix = i.ToString("00");
                FontGui.drawText(ix + ix + "h " + ix + ix + "m " + ix + ix + "s", __x, __y, 255, ref Screen);
            }
            FontGui.drawText(hour + "h " + minute + "m " + second + "s", __x, __y, __color, ref Screen);
        }