Пример #1
0
    void AddDownload()
    {
        string str = "DOWNLOAD COMPLETE";


        SHGUIview a1 = new SHGUItempview(2.5f);

        a1.AddSubView(new SHGUIframe((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2) - 1, (int)(SHGUI.current.resolutionY / 2) - 2, (int)(SHGUI.current.resolutionX / 2) + (int)(str.Length / 2) + 1, (int)(SHGUI.current.resolutionY / 2), 'z'));
        SHGUIprompter prom = new SHGUIprompter((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'z');

        prom.SetInput("^Cz████████████^W1█^W1████");
        a1.AddSubView(prom);

        queue.Add(a1);

        SHGUIview a = new SHGUItempview(2.5f);
        SHGUIview b = new SHGUIblinkview(.2f);

        a.AddSubView(b);

        b.AddSubView(new SHGUIframe((int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2) - 1, (int)(SHGUI.current.resolutionY / 2) - 2, (int)(SHGUI.current.resolutionX / 2) + (int)(str.Length / 2) + 1, (int)(SHGUI.current.resolutionY / 2), 'z'));
        b.AddSubView(new SHGUItext(str, (int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'w'));

        queue.Add(a);
    }
Пример #2
0
    void AddIntro()
    {
        SHGUIview a = new SHGUItempview(3f);
        SHGUIview b = new SHGUIblinkview(.3f);

        a.AddSubView(b);
        string str = "NEW SMS";

        b.AddSubView(new SHGUItext(str, (int)(SHGUI.current.resolutionX / 2) - (int)(str.Length / 2), (int)(SHGUI.current.resolutionY / 2) - 1, 'w'));

        queue.Add(a);
    }
Пример #3
0
    public APPtreedude() : base("TREE-DUDE-TREE-DUDE-DUDE-by-piotr")
    {
        //AddSubView (new SHGUItext (SHGUI.current.GetASCIIartByName ("APPtreedudeback"), 0, 0, 'z'));


        timeToDie = timeToDieMax * .5f;
        GenerateDifficulty();

        trees = new List <SHGUIsprite> ();
        dude  = new SHGUIsprite().AddFramesFromFile("APPtreedudedude", 6);
        AddSubView(dude);


        AddTreeOnTop(true);
        AddTreeOnTop(true);
        AddTreeOnTop(true);

        for (int i = 0; i < 10; ++i)
        {
            AddTreeOnTop(false);
            AddTreeOnTop(true);
        }

        timeToDieBar = new SHGUIprogressbar(20, 3, 21, "", "").SetBlinkingLabel("WATCH-TIME!", .2f);
        timeToDieBar.SetStyle("z█z░z█");
        AddSubView(timeToDieBar);

        tutorialView = new SHGUIview();
        AddSubView(tutorialView);

        SHGUIblinkview b1        = new SHGUIblinkview(.75f).SetFlipped();
        int            tutorialy = 15;

        b1.AddSubView(new SHGUItext("CHOP-LEFT-->", 13, tutorialy, 'w'));
        tutorialView.AddSubView(b1);

        SHGUIblinkview b2 = new SHGUIblinkview(.75f).SetFlipped();

        b2.AddSubView(new SHGUItext("<--CHOP-RIGHT", 40, tutorialy, 'w'));
        tutorialView.AddSubView(b2);
    }
Пример #4
0
    public APPmessage()
    {
        string message    = "INCOMING MESSAGE";
        char   frameColor = 'z';
        char   textColor  = 'w';

        x = (int)(SHGUI.current.resolutionX / 2) - (int)(message.Length / 2);
        y = 12 - 3;

        //AddSubView (new SHGUIrect (-3, -1, message.Length + 4, 6, 'z', '░'));
        back = AddSubView(new SHGUIrect(-3, -1, message.Length + 4, 3, '0', '▒'));
        //back.AddSubView (new SHGUIframe (-3, -2, message.Length + 4, 6, 'z'));

        allowCursorDraw = false;
        frame           = AddSubView(new SHGUIframe(-2, -1, message.Length + 3, 3, frameColor));
        //frame = AddSubView(new SHGUIframe(-2, -1, message.Length + 3, 3, frameColor));

        float blinkTime = .6f;

        blink = new SHGUIblinkview(blinkTime);
        AddSubView(blink);
        text = blink.AddSubView(new SHGUItext(message, 1, 1, textColor));

        blink2 = new SHGUIblinkview(blinkTime).SetFlipped();
        AddSubView(blink2);
        instructions1 = blink2.AddSubView(new SHGUItext(LocalizationManager.Instance.GetLocalized("INCOMING_MESSAGE_REPLY_INPUT"), 1, 1, textColor));
        if (InputManager.ActiveDevice.Name != "Keyboard/Mouse")
        {
            instructions1.x -= 1;
        }
        instructions2 = AddSubView(new SHGUItext(LocalizationManager.Instance.GetLocalized("INCOMING_MESSAGE_DISMISS_INPUT"), message.Length, 3, 'z').GoFromRight());

        instructionX = message.Length;
        instructionY = instructions2.y;

        dontDrawViewsBelow = false;

        restrictedInstructions = new List <string> ();

        AddSubView(new SHGUIplaysound(SHGUIsound.incomingmessage));
    }
Пример #5
0
    void DrawScore()
    {
        if (smallScore != null)
        {
            smallScore.y = 6 - guiHideOffset;
        }

        if (alive)
        {
            if (score == lastdisplayedscore)
            {
                return;
            }

            if (smallScore != null)
            {
                smallScore.KillInstant();
            }

            smallScore = null;
            smallScore = new SHGUIview();
            smallScore.overrideFadeInSpeed = 4f;
            string s = (score) + "";
            if (s.Length == 2)
            {
                s = s[0] + " " + s[1];
            }
            if (s.Length == 4)
            {
                s = s[0] + "" + s[1] + " " + s[2] + "" + s[3];
            }
            smallScoreContent = new SHGUItext(s, 0 - (int)(s.Length / 2), 0, 'w');
            smallScore.x      = 32;
            smallScore.y      = 6 - guiHideOffset;
            smallScore.AddSubView(new SHGUIrect(-(int)(s.Length / 2) - 2, -1, (int)(s.Length / 2) + 2, 1, 'z'));
            smallScore.AddSubView(new SHGUIframe(-(int)(s.Length / 2) - 2, -1, (int)(s.Length / 2) + 2, 1, 'z'));

            smallScore.AddSubView(smallScoreContent);

            AddSubView(smallScore);

            lastdisplayedscore = score;
        }
        else
        {
            if (bigScore == null && guiHideOffset == 40)
            {
                bigScore = new SHGUIview();
                AddSubView(bigScore);

                //bigScore.AddSubView(new SHGUItext(SHGUI.current.GetASCIIartFromFont(score + ""), 10, 11, 'x'));
                //bigScore.AddSubView(new SHGUItext(SHGUI.current.GetASCIIartFromFont("DUDE DEAD"), 10, 3, 'w'));
                SHGUIsprite s1 = new SHGUIsprite();
                s1.x = 10;
                s1.y = 2;
                s1.animationSpeed = .75f;
                s1.loops          = true;
                APPtreedudeintro.TreeDudeSequence(s1, "D%T%");
                bigScore.AddSubView(s1);

                SHGUIsprite s2 = new SHGUIsprite();
                s2.x              = 35;
                s2.y              = 2;
                s2.loops          = true;
                s2.animationSpeed = .75f;
                APPtreedudeintro.TreeDudeSequence(s2, "%DDD");
                bigScore.AddSubView(s2);


                //score += 990;
                int len = (6 + score.ToString().Length) * 6 - 1;
                int off = (((score.ToString().Length % 2) == 0)?(1):(0));
                bigScore.AddSubView(new SHGUItext(SHGUI.current.GetASCIIartFromFont("SCORE " + score), 34 - (int)(len / 2) + off, 9, 'w'));
                //bigScore.AddSubView(new SHGUItext(SHGUI.current.GetASCIIartFromFont(score + ""), 10, 15, 'w'));

                string ttt = "--PERSONAL-BEST-" + personalBest + "--";
                if (score > personalBest)
                {
                    personalBest = score;
                    ttt          = "--NEW-PERSONAL-BEST!-";
                }

                SHGUIview v = new SHGUIview();

                v.AddSubView(new SHGUItext(ttt, 32 - (int)(ttt.Length / 2) - 1, 15, 'w'));
                bigScore.AddSubView(v);

                SHGUIview v2   = new SHGUIblinkview(.75f);
                string    ttt2 = "[PRESS ENTER TO RESTART]";
                v2.AddSubView(new SHGUIrect(32 - (int)(ttt2.Length / 2), 20, 32 + (int)(ttt2.Length / 2) - 1, 20));
                v2.AddSubView(new SHGUItext(ttt2, 32 - (int)(ttt2.Length / 2), 20, 'w'));
                bigScore.AddSubView(v2);
            }
        }
    }