예제 #1
0
        public CoreUIFlexibleImage FlexibleImage(Rect rect, CoreUIContainer container, CoreUIOrientation orientation, string styleName = DefaultFlexibleImageStyle)
        {
            var mesh    = _factory.CreateFlexibleImage(rect, orientation, styleName);
            var element = new CoreUIFlexibleImage(mesh);

            container.AddElement(element);
            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            return(element);
        }
예제 #2
0
        public CoreUIWindow Window(Rect rect, CoreUIContainer container, string styleName = DefaultWindowStyle)
        {
            var mesh    = _factory.CreateWindow(rect, styleName);
            var element = new CoreUIWindow(mesh);

            container.AddElement(element);
            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            return(element);
        }
예제 #3
0
        public CoreUIToggle Toggle(Rect rect, bool pressed, CoreUIContainer container, Action <bool> action, string styleName = DefaultToggleStyle)
        {
            var mesh    = _factory.CreateToggle(rect, styleName);
            var element = new CoreUIToggle(mesh, action, pressed);

            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            container.AddElement(element);
            return(element);
        }
예제 #4
0
        public CoreUILabel Label(Rect rect, string text, CoreUIContainer container, string fontName = DefaultFontName)
        {
            var mesh    = _factory.CreateLabel(rect, text, fontName);
            var element = new CoreUILabel(mesh);

            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            container.AddElement(element);
            return(element);
        }
예제 #5
0
        public CoreUIButton Button(Rect rect, CoreUIContainer container, Action <int> action, string styleName = DefaultButtonStyle)
        {
            var mesh    = _factory.CreateButton(rect, styleName);
            var element = new CoreUIButton(mesh, action);

            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            container.AddElement(element);
            return(element);
        }
예제 #6
0
        public CoreUILabel Label(Rect rect, string text, CoreUIContainer container, int sinPixelsOffset, float sinOffsetSpeed, float sinMultiplier,
                                 float horizontalPixelsOffset, float verticalPixelsOffset, string fontName = DefaultFontName)
        {
            var mesh    = _factory.CreateLabel(rect, text, fontName);
            var element = new CoreUILabel(mesh, sinPixelsOffset, sinOffsetSpeed, sinMultiplier, horizontalPixelsOffset, verticalPixelsOffset);

            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            container.AddElement(element);
            return(element);
        }
예제 #7
0
        public CoreUIImage Image(Rect rect, CoreUIContainer container, Texture2D texture, string styleName = DefaultImageStyle)
        {
            var mesh = _factory.CreateImage(rect, texture, styleName);

            mesh.Texture = texture;
            var element = new CoreUIImage(mesh);

            container.AddElement(element);
            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            return(element);
        }
예제 #8
0
        public CoreUIScroll Scroll(Rect rect, float viewWidth, float viewHeight, CoreUISlider horizontalSlider, CoreUISlider verticalSlider, CoreUIContainer container, string styleName = DefaultScrollStyle)
        {
            var mesh    = _factory.CreateScroll(rect, styleName);
            var element = new CoreUIScroll(viewWidth, viewHeight, mesh, horizontalSlider, verticalSlider);

            container.AddElement(element);
            element.OriginY = element.Position.y;
            element.OriginX = element.Position.x;
            CoreUIPresentation.Instance.CreateSimplePresentation(element);
            return(element);
        }