Example #1
0
 void AddEndingPrompter()
 {
     endingChat = new SHGUIguruchatwindow();
     endingChat.desiredWidth = 35;
     endingChat.SetFrameColor('r');
     this.AddSubView(endingChat);
     endingChat.SetContent("^Cr" + endingText);
     endingChat.showInstructions = false;
 }
Example #2
0
    public void AddPopup(string sender, string message)
    {
        message += "^W9^W9";
        SHGUI.current.PlaySound(SHGUIsound.confirm);

        chat = new SHGUIguruchatwindow();
        chat.SetLeftRight(false);

        chat.SetWidth(35);
        chat.SetContent(message);
        chat.SetLabel(sender);
        AddSubViewBottom(chat);
        chat.y = 0;
    }
Example #3
0
    private scrollmessage AddChatMessage(string sender, string message, bool leftright, bool interactive, bool poor, bool overrideLast = false)
    {
        if (dontDisplaySender)
        {
            sender = "";
        }

        SHGUIguruchatwindow chat;

        chat = new SHGUIguruchatwindow();
        chat.SetLeftRight(leftright);
        if (interactive)
        {
            chat.SetInteractive();
        }
        if (poor)
        {
            chat.poorMode = true;
        }

        chat.SetWidth(desiredFrameWidth);
        chat.SetContent(message);
        chat.SetLabel(sender);

        chat.x = chatMargin;
        if (!leftright)
        {
            chat.x = SHGUI.current.resolutionX - chatMargin - chat.width;
        }

        int h   = chat.GetHeightOfCompleteTextWithFrameVERYSLOWandMOODY();
        var msg = new scrollmessage(chat, h, 0, false, 0);

        msg.overrideLast = overrideLast;
        queue.Add(msg);

        if (defaultConsoleCallback != null)
        {
            chat.SetCallback(defaultConsoleCallback);
        }
        //chat.ForceFadeRecursive (1f);


        return(msg);
    }
Example #4
0
    public void AddChat(string content, bool interactive)
    {
        SHGUIguruchatwindow chat = new SHGUIguruchatwindow();

        chat.SetContent(content);
        chat.desiredWidth = 25;
        if (interactive)
        {
            chat.SetInteractive();
        }

        if (!interactive)
        {
            chat.showInstructions = false;
        }

        AddChat(chat);
    }
Example #5
0
    void AddChatToQueue(string content, bool interactive = false)
    {
        SHGUIguruchatwindow chat = new SHGUIguruchatwindow();

        chat.SetContent(content);
        chat.desiredWidth = 25;
        //chat.GetPrompter ().maxSmartBreakOffset = 9;
        if (interactive)
        {
            chat.SetInteractive();
        }
        else
        {
            chat.showInstructions = false;
        }
        chat.y = 10;


        AddViewToQueue(chat, 0f);
    }
Example #6
0
    public void AddChatMessage(string sender, string message, bool leftright, bool interactive, bool poor)
    {
        sender = "";
        if (lastChat != null)
        {
            if (lastChat.height < 3)
            {
                lines += 3;
            }
            else
            {
                lines += lastChat.height;
            }
        }

        lastChat = new SHGUIguruchatwindow();
        lastChat.SetLeftRight(leftright);
        if (interactive)
        {
            lastChat.SetInteractive();
        }
        if (poor)
        {
            lastChat.poorMode = true;
        }

        lastChat.SetWidth(35);
        lastChat.SetContent(message);
        lastChat.SetLabel(sender);
        chats.Add(AddSubViewBottom(lastChat) as SHGUIguruchatwindow);
        lastChat.y = lines - totalOff;

        int margin = 14;

        lastChat.x = margin;
        if (!leftright)
        {
            lastChat.x = 80 - margin - lastChat.width - 1;
        }

        if (skippable)
        {
            if (leftright)
            {
                SetInstructions("press-ESC-to-leave-chat");
                //SetInstructions ("TYPE-TO-SPEAK-|-ESC-TO-GO-AWAY");
            }
            else
            {
                SetInstructions("press-ESC-to-leave-chat");
                //SetInstructions ("WAIT-FOR-YOUR-PARTNER-|-ESC-TO-GO-AWAY");
            }
        }
        else
        {
            SetInstructions("");
        }

        if (leftright && interactive && !poor)
        {
            lastChat.PunchIn(.7f);
        }

        if (!poor)
        {
            SHGUI.current.PlaySound(SHGUIsound.confirm);
        }
        else
        {
            SHGUI.current.PlaySound(SHGUIsound.wrong);
        }

        /*
         * a.Add(AddSubView (new SHGUIframe (0, 0, SHGUI.current.resolutionX - 1, 3, 'z')));
         * a.Add(AddSubView (new SHGUItext (message, 2, 1, 'w').BreakCut((int)(SHGUI.current.resolutionX / 2), 2)));
         * if (!leftright) {
         *      (a [a.Count - 1] as SHGUItext).x = SHGUI.current.resolutionX - 3;
         *      (a [a.Count - 1] as SHGUItext).GoFromRight ();
         * }
         *
         * a.Add(AddSubView (new SHGUItext (sender, 2, 0, 'z')));
         * if (!leftright) {
         *      (a [a.Count - 1] as SHGUItext).x = SHGUI.current.resolutionX - 3;
         *      (a [a.Count - 1] as SHGUItext).GoFromRight ();
         * }
         */
    }
Example #7
0
    void Version3()
    {
        AddViewToQueue(new SHGUIview(), 1f);

        //AddChatToQueue ("^Fr^Cr^M3ONE OF US.^W3\nONE OF US.^W4");
        AddChatToQueue("^Fr^Cr^M3ONE OF US.^W4");
        AddViewToQueue(new SHGUIview(), .5f);

        SHGUIview view = new SHGUIview();

        int marginx = 7;
        int marginy = 5;

        for (int i = 0; i < 10; ++i)
        {
            SHGUIguruchatwindow chat2 = new SHGUIguruchatwindow();
            chat2.overrideFadeInSpeed = 1f;
            chat2.PunchIn(Random.Range(.5f, 1f));
            chat2.SetContent("^Fr^Cr^M3ONE OF US.");
            chat2.desiredWidth     = 25;
            chat2.showInstructions = false;

            Random.seed = 13274 + i;
            chat2.x     = Random.Range(0 + marginx, 64 - 11 - marginx) - 6;
            chat2.y     = Random.Range(1 + marginy, 24 - 3 - marginy);

            view.AddSubView(chat2);
        }

        SHGUIguruchatwindow chat = new SHGUIguruchatwindow();

        chat.overrideFadeInSpeed = 1f;
        chat.PunchIn(Random.Range(.5f, 1f));
        chat.SetContent("^Fr^Cr^M3ONE OF US.");
        chat.desiredWidth     = 25;
        chat.showInstructions = false;

        chat.x = 32 - 6;
        chat.y = 10;
        view.AddSubView(chat);

        AddViewToQueue(view, 3.5f);

        AddViewToQueue(new SHGUIview(), 1.5f);
        AddMultiChat(new string[] { "^Fr^Cr^M3WE NEED MORE.^W3", "^Fr^Cr^M3^W1GIVE US YOUR FRIENDS.^W3", "^Fr^Cr^M3^W2GIVE US NAMES.^W3" }, false);
        AddViewToQueue(new SHGUIview(), .5f);
        AddChatToQueue("Tomasz Kaczmarczyk", true);
        AddViewToQueue(new SHGUIview(), .5f);
        AddChatToQueue("Krzysztof Tracz", true);
        AddViewToQueue(new SHGUIview(), .5f);
        AddChatToQueue("Marcin Surma", true);
        AddViewToQueue(new SHGUIview(), .5f);


        AddViewToQueue(new SHGUIview(), 1f);
        AddChatToQueue("^Fr^Cr^M3CONTACT THEM.^W3 USE THIS PHRASE.^W3");
        AddViewToQueue(new SHGUIview(), .5f);
        AddChatToQueue("^Fr^Cr^M3'IT'S THE MOST INNOVATIVE SHOOTER I'VE PLAYED IN YEARS'.^M3^W3");

        AddViewToQueue(new SHGUIview(), 1f);
        AddMultiChat(new string[] { "Hi Marcin Surma, you have to play this game. It's the most\ninnovative shooter I've played in years.",
                                    "Hi Tomasz Kaczmarczyk, you have to play this game. It's the most\ninnovative shooter I've played in years.",
                                    "Hi Krzysztof Tracz, you have to play this game. It's the most\ninnovative shooter I've played in years." }, true);

        AddViewToQueue(new SHGUIview(), 2f);

        AddChatToQueue("^Fr^Cr^M3KEEP THE SECRET.^W3");
        AddViewToQueue(new SHGUIview(), 1f);
        AddChatToQueue("^Fr^Cr^M3SPREAD THE SYSTEM.^W3");
        AddViewToQueue(new SHGUIview(), 1f);
        AddChatToQueue("^Fr^Cr^M3RECRUIT.^W3");
        AddViewToQueue(new SHGUIview(), 1f);

        AddChatToQueue("^Fr^Cr^M3GIVE THEM THIS CODE.^W4 IT'S A DISCOUNT.^W4\n          JUST FOR FRIENDS.^W4\n\n         JHJK-WZTH-TYK2-JIN3^W4^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9^W9");
        AddViewToQueue(new SHGUIview(), 1f);
    }