public IUIObject CreateFrame(FrameType frameType, string name, IFrame parent, string inherits)
        {
            LayoutFrameType xml;

            switch (frameType)
            {
            case FrameType.Frame:
                xml = new ObjFrameType();
                break;

            case FrameType.Button:
                xml = new ButtonType();
                break;

            case FrameType.EditBox:
                xml = new EditBoxType();
                break;

            case FrameType.GameTooltip:
                xml = new GameTooltipType();
                break;

            case FrameType.CheckButton:
                xml = new CheckButtonType();
                break;

            default:
                throw new UiSimuationException(string.Format("Unhandled frame type {0}.", frameType));
            }
            xml.inherits = inherits;
            xml.name     = name;
            xml.Items    = new object[] {};
            return(this.util.CreateObject(xml, parent));
        }
示例#2
0
 public IUIObject CreateFrame(FrameType frameType, string name, IFrame parent)
 {
     return(this.CreateFrame(frameType, name, parent, null));
 }
示例#3
0
 public IUIObject CreateFrame(FrameType frameType, string name)
 {
     return(this.CreateFrame(frameType, name, null, null));
 }