Esempio n. 1
0
 public void ResetScreen(bool apply)
 {
     Screen.Clear();
     Cursor.SetPosition(borderWidth, borderHeight);
     DrawBorder();
     Screen.Apply();
 }
Esempio n. 2
0
    public void OnPower()
    {
        IsStarting = true;
        TextAsset code = Resources.Load("start") as TextAsset;

        // draw logo
        Texture2D logo    = Resources.Load("logo") as Texture2D;
        int       xcenter = (DisplaySystem.WIDTH - logo.width) / 2;
        int       ycenter = (DisplaySystem.HEIGHT + logo.height) / 2;

        _screen.SetFontColor(Color.white);
        _screen.SetBackColor(Color.black);
        _screen.Clear();
        _screen.DrawImage(xcenter, ycenter, logo.width, logo.height, logo.GetPixels());

        _runner.RunCode(code.text);
    }
Esempio n. 3
0
        private void ClearPage()
        {
            screen.ResetInvertBlock(typer.Cursor.x, typer.Cursor.y);
            typer.Cursor.SetPosition(typer.borderWidth, typer.borderHeight);
            screen.Clear();
            typer.DrawBorder();
            int step = 4;

            foreach (char c in openedFile)
            {
                screen.TypeChar(Utils.GetCharNumber(c), step++, 0, screen.GetBackColor(), typer.GetBorderColor());
            }
            step = DisplaySystem.COLS / 2;
            foreach (char c in "ctrl+Q to exit")
            {
                screen.TypeChar(Utils.GetCharNumber(c), step++, DisplaySystem.LINES - 1, screen.GetBackColor(), typer.GetBorderColor());
            }
            step = DisplaySystem.COLS / 2;
            foreach (char c in saved ? "    saved" : "ctrl+S to save")
            {
                screen.TypeChar(Utils.GetCharNumber(c), step++, 0, screen.GetBackColor(), typer.GetBorderColor());
            }
        }