public override string GetLabel(object forObject, out FontStyle fontStyle)
        {
            fontStyle = FontStyle.Bold | FontStyle.Underline;
            UrhoBackend.Scene nd   = ((UrhoBackend.Scene)forObject);
            string            name = "Scene";

            if (!String.IsNullOrWhiteSpace(nd.GetName()))
            {
                name = nd.GetName();
            }
            return(String.Format("{0} ({1})", name, nd.GetID()));
        }
Esempio n. 2
0
 public void GetInfo(object item, ItemInfo info)
 {
     if (item is UrhoBackend.Node)
     {
         if (item is UrhoBackend.Scene)
         {
             UrhoBackend.Scene scene = ((UrhoBackend.Scene)item);
             info.IsExpandedInView = true;
             info.IsLeaf           = false;
             if (String.IsNullOrWhiteSpace(scene.GetName()))
             {
                 info.Label = "Scene : " + scene.GetID();
             }
             else
             {
                 info.Label = scene.GetName() + " : " + scene.GetID();
             }
             info.FontStyle      = System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline;
             info.AllowLabelEdit = true;
         }
         else
         {
             UrhoBackend.Node node = ((UrhoBackend.Node)item);
             info.IsLeaf = node.GetChildren().Count > 0;
             if (String.IsNullOrWhiteSpace(node.GetName()))
             {
                 info.Label = "Node" + (node.IsNetworked() ? " : NET " : " : ") + node.GetID();
             }
             else
             {
                 info.Label = node.GetName() + (node.IsNetworked() ? " : NET " : " : ") + node.GetID();
             }
             info.FontStyle      = System.Drawing.FontStyle.Bold;
             info.AllowLabelEdit = true;
         }
     }
     else if (item is UrhoBackend.Component)
     {
         UrhoBackend.Component comp = ((UrhoBackend.Component)item);
         info.IsLeaf         = true;
         info.Label          = comp.GetTypeName() + " : " + comp.GetID();
         info.AllowLabelEdit = false;
     }
 }
Esempio n. 3
0
 SceneTreeView(UrhoBackend.Scene scene)
 {
 }