Exemplo n.º 1
0
        }                          //default ctor not valid - we want to enforce initializing our data

        public UIStaticImage(string name) : base(name)
        {
            backgroundRenderComp = new UIComp_DrawTextureAtlas(this);

            backgroundRenderComp.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            backgroundRenderComp.AtlasItemName         = "0";
        }
Exemplo n.º 2
0
        public UITreeView(string name)
            : base(name)
        {
            // 创建缺省的根节点
            this.rootNode             = new UIComp_TreeNodeRoot(this);
            this.rootNode.EndUpdated += new EventHandler <TreeNodeEventArg>(rootNode_LayoutChanged);

            this.backgroundRenderComp = new UIComp_DrawTextureAtlas(this);

            this.backgroundRenderComp.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            this.backgroundRenderComp.AtlasItemName         = "0";

            this.stickRenderComp = new UIComp_DrawTextureAtlas(this);
            this.stickRenderComp.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            this.stickRenderComp.AtlasItemName         = @"N_sys-gb-a";

            this.resourceImages = new DrawTextureAtlasCollection();
            this.resourceImages.Add(new UIComp_DrawTextureAtlas(this));
            this.resourceImages.Add(new UIComp_DrawTextureAtlas(this));
            this.resourceImages[(int)ResourceImageType.CollapseIcon].ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            this.resourceImages[(int)ResourceImageType.CollapseIcon].AtlasItemName         = @"N_help-button-d";
            this.resourceImages[(int)ResourceImageType.ExpandIcon].ResourceAtlasLocation   = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            this.resourceImages[(int)ResourceImageType.ExpandIcon].AtlasItemName           = @"N_help-button-c";
            this.resourceImages[(int)ResourceImageType.CollapseIcon].Width  = new UIDim(0, 9);
            this.resourceImages[(int)ResourceImageType.CollapseIcon].Height = new UIDim(0, 9);
            this.resourceImages[(int)ResourceImageType.ExpandIcon].Width    = new UIDim(0, 9);
            this.resourceImages[(int)ResourceImageType.ExpandIcon].Height   = new UIDim(0, 9);


            // 创建子控件
            this.verticalScrollBar   = CreateVerticalScrollBar();
            this.horizontalScrollBar = CreateHorizontalScrollBar();

            InitEventHandler();
        }
Exemplo n.º 3
0
        }                         //default ctor not valid - we want to enforce initializing our data

        public UIListHeader(string name)
            : base(name)
        {
            sortSegment      = null;
            sizingEnabled    = true;
            sortingEnabled   = true;
            sortingDirection = SortDirection.None;
            //this.segmentOffset = 0.0f;

            backgroundRenderComp = new UIComp_DrawTextureAtlas(this);

            backgroundRenderComp.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            backgroundRenderComp.AtlasItemName         = "0";
        }
Exemplo n.º 4
0
        }                            //default ctor not valid - we want to enforce initializing our data

        public UIButtonBase(string name)
            : base(name)
        {
            normalText       = new UIComp_DrawText(this);
            normalBackground = new UIComp_DrawTextureAtlas(this);

            hoveringText       = new UIComp_DrawText(this);
            hoveringBackground = new UIComp_DrawTextureAtlas(this);

            pushedText       = new UIComp_DrawText(this);
            pushedBackground = new UIComp_DrawTextureAtlas(this);

            disableText       = new UIComp_DrawText(this);
            disableBackground = new UIComp_DrawTextureAtlas(this);
        }
Exemplo n.º 5
0
        }                      //default ctor not valid - we want to enforce initializing our data

        public UIEditBox(string name)
            : base(name)
        {
            CursorTimer            = 1.1f;
            this.ValidationPattern = ".*";
            validator     = new Regex(validationPattern);
            maskCodePoint = '*';
            MaxTextLength = int.MaxValue;

            textComp = new UIComp_DrawEditBoxText(this);

            backgroundComp = new UIComp_DrawTextureAtlas(this);
            backgroundComp.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            backgroundComp.AtlasItemName         = "editbox";
        }
Exemplo n.º 6
0
        }                          //default ctor not valid - we want to enforce initializing our data

        public UIProgressBar(string name)
            : base(name)
        {
            step = 0.01f;

            textComponent             = new UIComp_DrawText(this);
            textComponent.TextFormat |= NexusEngine.DrawTextFormat.NoClip;
            background = new UIComp_DrawTextureAtlas(this);
            foreground = new UIComp_DrawTextureAtlas(this);

            background.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            background.AtlasItemName         = @"progress_back";

            foreground.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            foreground.AtlasItemName         = @"progress";
        }
Exemplo n.º 7
0
        }                           //default ctor not valid - we want to enforce initializing our data

        protected UIScrollBar(string name)
            : base(name)
        {
            this.documentSize = 1.0f;
            this.pageSize     = 1.0f;
            this.stepSize     = 1.0f;

            background = new UIComp_DrawTextureAtlas(this);

            background.ResourceAtlasLocation = new NexusEngine.NResourceLoc(@"engine_data:/ui/Atlas/engine_data1.txa");
            background.AtlasItemName         = "0";

            increaseButton = CreateDecreaseButton();
            decreaseButton = CreateIncreaseButton();
            thumb          = CreateThumb();

            InitEventHandler();
        }