예제 #1
0
    public void AddPrompterToQueue(string Text, float Delay, bool centered = false)
    {
        SHGUItext TextView = new SHGUItext(Text, frameOffset, 0, 'z');

        TextView.BreakCut(SHGUI.current.resolutionX - 2 - frameOffset, 100);
        int width = TextView.GetLongestLineLength();

        SHGUIprompter promp = new SHGUIprompter(frameOffset, 0, 'w');

        promp.SetInput(Text);
        if (centered)
        {
            promp.x = (int)(SHGUI.current.resolutionX / 2) - (int)(promp.GetFirstLineLengthWithoutSpecialSigns() / 2);
        }
        promp.maxLineLength       = SHGUI.current.resolutionX - 2;
        promp.maxSmartBreakOffset = 0;
        queue.Add(new scrollmessage(promp, TextView.CountLines(), Delay));
    }