Inheritance: UIWidget, ISysFontTexturable
Ejemplo n.º 1
0
    static public void AddLabel()
    {
        GameObject go = NGUIMenu.SelectedRoot();

        if (NGUIEditorTools.WillLosePrefab(go))
        {
            NGUIEditorTools.RegisterUndo("Add a SysFont Label", go);

            GameObject child = new GameObject("UISysFontLabel");
            child.layer            = go.layer;
            child.transform.parent = go.transform;

            UISysFontLabel label = child.AddComponent <UISysFontLabel>();
            label.MakePixelPerfect();
            Vector3 pos = label.transform.localPosition;
            pos.z = -1f;
            label.transform.localPosition = pos;
            label.Text = "Hello World";
            Selection.activeGameObject = child;
        }
    }
 protected override bool DrawProperties()
 {
   _label = (UISysFontLabel)target;
   ISysFontTexturableEditor.DrawInspectorGUI(_label);
   return true;
 }
Ejemplo n.º 3
0
 protected override bool OnDrawProperties()
 {
     _label = (UISysFontLabel)target;
     ISysFontTexturableEditor.DrawInspectorGUI(_label);
     return(true);
 }