Exemplo n.º 1
0
    public void Fit(bool force = false)
    {
        if (textElement.IsFinished() && !force)
        {
            return;
        }
        int oldheight = height;

        width = textElement.longestLineAfterSmartBreak + 2;
        //if (width > desiredWidth)
        //	width = desiredWidth;
        if (width < labelElement.text.Length + 1)
        {
            width = labelElement.text.Length + 1;
        }

        if (width < subElement.text.Length + 1)
        {
            width = subElement.text.Length + 1;
        }
        height = textElement.CountLines() + 1;
        //textElement.fade = 1;

        RefreshFrames();
        height += 1;

        if (height != oldheight && height > 3)
        {
            frameElement.PunchIn(.4f);
        }

        //return this;
    }
Exemplo n.º 2
0
    public override void Update()
    {
        base.Update();

        if (lastPrompter == null || lastPrompter.IsFinished())
        {
            if (lastPrompter != null)
            {
                currentline += lastPrompter.CountLines();
            }

            if (prompterQueue.Count > 0)
            {
                if (prompterQueue[0][0] == 'a')
                {
                    AddMyPrompter(prompterQueue[0].Substring(2));
                }
                else if (prompterQueue[0][0] == 'b')
                {
                    AddOtherPrompter(prompterQueue[0].Substring(2));
                }
                prompterQueue.RemoveAt(0);
            }
            else
            {
                Kill();
            }
        }
    }