Пример #1
0
    void DisplayName()
    {
        //var old

        bool valid = !string.IsNullOrEmpty(_toon.Name);

        if (!valid)
        {
            using (GuiHelper.ContentColor(Color.red))
            {
                GUI.Label(new Rect(OFFSET + 165, OFFSET, 10, LINE_HEIGHT), "*");
            }
        }
        GUI.Label(new Rect(OFFSET, OFFSET, 50, LINE_HEIGHT), "Name:");
        using (GuiHelper.ColorIf(Color.red, !valid))
        {
            _toon.Name = GUI.TextField(new Rect(65, OFFSET, 100, LINE_HEIGHT), _toon.Name);
        }
    }