Наследование: TextBox
Пример #1
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;
        }