Пример #1
0
 public SliderWindow(DeviceContext dc, UserInterfaceLocal gui) : base(dc, gui)
 {
     this.dc  = dc;
     this.gui = gui;
     CommonInit();
 }
Пример #2
0
        public SimpleWindow(Window win)
        {
            gui        = win.Gui;
            dc         = win.dc;
            drawRect   = win.drawRect;
            clientRect = win.clientRect;
            textRect   = win.textRect;
            origin     = win.origin;
            fontNum    = win.fontNum;
            name       = win.name;
            matScalex  = win.matScalex;
            matScaley  = win.matScaley;
            borderSize = win.borderSize;
            textAlign  = win.textAlign;
            textAlignx = win.textAlignx;
            textAligny = win.textAligny;
            background = win.background;
            flags      = (int)win.flags;
            textShadow = win.textShadow;

            visible        = win.visible;
            text           = win.text;
            rect           = win.rect;
            backColor      = win.backColor;
            matColor       = win.matColor;
            foreColor      = win.foreColor;
            borderColor    = win.borderColor;
            textScale      = win.textScale;
            rotate         = win.rotate;
            shear          = win.shear;
            backGroundName = win.backGroundName;
            if (backGroundName.Length != 0)
            {
                background      = declManager.FindMaterial(backGroundName);
                background.Sort = (float)SS.GUI;
                background.SetImageClassifications(1); // just for resource tracking
            }
            backGroundName.SetMaterialPtr(x => background = x);

            mParent = win.Parent;

            hideCursor = win.hideCursor;

            var parent = win.Parent;

            if (parent != null)
            {
                if (text.NeedsUpdate)
                {
                    parent.AddUpdateVar(text);
                }
                if (visible.NeedsUpdate)
                {
                    parent.AddUpdateVar(visible);
                }
                if (rect.NeedsUpdate)
                {
                    parent.AddUpdateVar(rect);
                }
                if (backColor.NeedsUpdate)
                {
                    parent.AddUpdateVar(backColor);
                }
                if (matColor.NeedsUpdate)
                {
                    parent.AddUpdateVar(matColor);
                }
                if (foreColor.NeedsUpdate)
                {
                    parent.AddUpdateVar(foreColor);
                }
                if (borderColor.NeedsUpdate)
                {
                    parent.AddUpdateVar(borderColor);
                }
                if (textScale.NeedsUpdate)
                {
                    parent.AddUpdateVar(textScale);
                }
                if (rotate.NeedsUpdate)
                {
                    parent.AddUpdateVar(rotate);
                }
                if (shear.NeedsUpdate)
                {
                    parent.AddUpdateVar(shear);
                }
                if (backGroundName.NeedsUpdate)
                {
                    parent.AddUpdateVar(backGroundName);
                }
            }
        }
Пример #3
0
 public SliderWindow(UserInterfaceLocal gui) : base(gui)
 {
     this.gui = gui;
     CommonInit();
 }
Пример #4
0
 public GameWindowProxy(DeviceContext dc, UserInterfaceLocal gui) : base(dc, gui) { }