Exemplo n.º 1
0
        protected void updateView()
        {
            this.removeAllChildren();
            if (vo.isEmpty)
            {
                return;
            }
            updateEventConnectionUI();
            ISkillEvent       skillEvent = vo.evt;
            EditorToggleGroup box;

            box      = new EditorToggleGroup();
            box.data = skillEvent;
            box.addEventListener(EventX.CHANGE, toggleHandle);
            box.addEventListener(EventX.REPAINT, itemRepaintHandle);
            Type type;

            if (eventMaping.TryGetValue(skillEvent.GetType(), out type))
            {
                IEventUI ui = Activator.CreateInstance(type) as IEventUI;
                box.label  = ui.label;
                box.toggle = skillEvent.enabled;
                ui.createUI(skillEvent, box);
            }

            EditorButton btn = new EditorButton("delete");

            btn.style = EditorStyles.miniButton;
            btn.data  = skillEvent;
            btn.addEventListener(EventX.ITEM_CLICK, deleteHandle);
            box.addChild(btn);

            this.addChild(box);
        }
Exemplo n.º 2
0
 public RefEventUISort(IEventUI ui, EventUIAttribute attribute)
 {
     this.ui        = ui;
     this.attribute = attribute;
 }