BlisterUI.Widgets.TextInputWidget.tInput_OnTextChanged C# (CSharp) 메소드

tInput_OnTextChanged() 공개 메소드

public tInput_OnTextChanged ( TextInput arg1, string arg2 ) : void
arg1 TextInput
arg2 string
리턴 void
        void tInput_OnTextChanged(TextInput arg1, string arg2)
        {
            drawText.Text = arg2;
            Recompute();
            if(Font == null) return;

            Vector3 cPosH = Font.GetCaretOffsetAndHeight(arg2, Math.Max(0, arg1.Caret));
            Vector2 cPos = new Vector2(cPosH.X, cPosH.Y) * drawText.TextScale;
            Caret.Offset = new Point((int)cPos.X, (int)cPos.Y);
            Caret.Height = (int)(cPosH.Z * drawText.TextScale);
        }