예제 #1
0
 internal Widget(Instance inst, FString name, Layout parent, WidgetType type)
 {
     mInstance = inst;
     mType = type;
     mName = name;
     mParentLayout = parent;
 }
예제 #2
0
 public bool GetLayout(Instance  layout_inst, out Layout layout)
 {
     foreach (KeyValuePair<FString, Layout> ly in mLayoutTable)
     {
         if (ly.Value.Root.Instance == layout_inst)
         {
             layout = ly.Value;
             return true;
         }
     }
     layout = null;
     return false;
 }
예제 #3
0
 public bool TryGetWidget(Instance widget_inst, out Widget widget)
 {
     foreach (KeyValuePair<FString, Widget> item in mWidgetTable)
     {
         if (item.Value.Instance == widget_inst)
         {
             widget = item.Value;
             return true;
         }
     }
     widget = null;
     return false;
 }
예제 #4
0
 internal ScrollBar(Instance inst, FString name, Layout parent)
     : base(inst, name, parent, WidgetType.ScrollBar)
 {
 }
예제 #5
0
 internal TextBox(Instance inst, FString name, Layout parent, WidgetType type)
     : base(inst, name, parent, type)
 {
 }
예제 #6
0
 internal Window(Instance inst, FString name, Layout parent)
     : base(inst, name, parent, WidgetType.Window)
 {
 }
예제 #7
0
 internal static bool Equals(Instance ls, Instance rs)
 {
     if (ReferenceEquals(ls, null))
     {
         return ReferenceEquals(rs, null);
     }
     else if (ReferenceEquals(rs, null))
     {
         return false;
     }
     return (ls.mPtr == rs.mPtr);
 }
예제 #8
0
 internal RenderTarget(ScriptRuntime.RenderToTexture rtt)
 {
     mInstance = ICall_createFromScriptRuntimeRenderToTexture(rtt);
 }
예제 #9
0
 internal virtual void Dispose()
 {
     clearEventsWidthOutParent();
     GUI.DisposeWidget(mInstance);
     mInstance = Instance.NullInstance;
 }
예제 #10
0
        internal static Widget CreateWidget(Instance inst, FString name, Layout parent_layout)
        {
            WidgetType type = ICall_getType(inst.Ptr);

            Widget widget = null;
            switch (type)
            {
                case WidgetType.Widget:
                    widget = new Widget(inst, name, parent_layout, WidgetType.Widget);
                    break;
                case WidgetType.ImageBox:
                    widget = new ImageBox(inst, name, parent_layout);
                    break;
                case WidgetType.Window:
                    widget = new Window(inst, name, parent_layout);
                    break;
                case WidgetType.TextBox:
                    widget = new TextBox(inst, name, parent_layout);
                    break;
                case WidgetType.ListBox:
                    widget = new ListBox(inst, name, parent_layout);
                    break;
                case WidgetType.Button:
                    widget = new Button(inst, name, parent_layout);
                    break;
                case WidgetType.EditBox:
                    widget = new EditBox(inst, name, parent_layout);
                    break;
                case WidgetType.ComboBox:
                    widget = new ComboBox(inst, name, parent_layout);
                    break;

                case WidgetType.ScrollBar:
                    widget = new ScrollBar(inst, name, parent_layout);
                    break;
                case WidgetType.DDContainer:
                    widget = new DDContainer(inst, name, parent_layout);
                    break;
                case WidgetType.ItemBox:
                    widget = new ItemBox(inst, name, parent_layout);
                    break;
                case WidgetType.Canvas:
                    widget = new Canvas(inst, name, parent_layout);
                    break;
                default:
                    widget = new Widget(inst, name, parent_layout, WidgetType.Unknown);
                    break;
            }
            return widget;
        }
예제 #11
0
 internal static Widget CreateWidget(Instance inst)
 {
     return CreateWidget(inst, null, null);
 }
예제 #12
0
 internal static Widget CreateWidget(Instance inst, Layout parent_layout)
 {
     Widget widget = CreateWidget(inst, null, parent_layout);
     widget.mName = GetName(widget.mInstance.Ptr);
     return widget;
 }
예제 #13
0
파일: Layout.cs 프로젝트: icegbq/Genesis-3D
 internal bool TryGetWidget(Instance widget_inst, out Widget widget)
 {
     return mChilds.TryGetWidget(widget_inst, out widget);
 }
예제 #14
0
 internal Button(Instance inst, FString name, Layout parent)
     : base(inst, name, parent, WidgetType.Button)
 {
 }
예제 #15
0
 internal ItemBox(Instance inst, FString name, Layout parent)
     : base(inst, name, parent, WidgetType.ItemBox)
 {
 }
예제 #16
0
 internal Canvas(Instance inst, FString name, Layout parent)
     : base(inst, name, parent, WidgetType.Canvas)
 {
 }
예제 #17
0
        protected ItemInfo findItem(Instance inst)
        {
            ItemInfo info = null;
            mItems.TryGetValue(inst.Ptr, out info);
            if (null == info)
            {
                int temp = mInstance.Ptr.ToInt32() + inst.Ptr.ToInt32();
                string name = mName.Name + "_item_" + temp.ToString();
                Widget widget = Widget.CreateWidget(inst, name, mParentLayout);//
                info = new ItemInfo(this, widget);

                mItems.Add(inst.Ptr, info);
                mParentLayout.AddWidget(info.Item);
            }
            return info;
        }
예제 #18
0
 internal DDContainer(Instance inst, FString name, Layout parent, WidgetType type)
     : base(inst, name, parent, type)
 {
 }