예제 #1
0
    void OnGUI()
    {
        GUIStyle style;

        style                  = new GUIStyle(GUI.skin.box);
        style.wordWrap         = true;
        style.padding          = new RectOffset(5, 5, 5, 5);
        style.normal.textColor = Color.white;
        GUI.skin.box           = style;

        Rect rect;

        rect = new Rect(0, 0, Screen.width, Screen.height);

        string text = String.Format("{0}/{1}: {2}\n\n{3}",
                                    _curIndex + 1, _demos.Length, _test, _log);

        GUI.Box(rect, text);

        rect = new Rect(10, Screen.height - 100, Screen.width - 20, 90);

        if (_client != null)
        {
            if (GUI.Button(rect, "CANCEL"))
            {
                _client.Cancel();
            }
        }
        else if (GUI.Button(rect, "NEXT"))
        {
            StartCoroutine(StartDemo());
        }
    }