示例#1
0
 public virtual void ResolutionChange()
 {
     if (dockType == DockType.SCREENRESOLUTION)
     {
         location        = ScreenController.gameWindow;
         containerCamera = new ContainerCamera(location);
     }
 }
示例#2
0
        //  Resizing possibleResize;


        public ContainerBorder(ContainerCamera parentContainerCamera, int borderThickness, Resizing allowedResize, int textureColour)
        {
            this.parentContainerCamera = parentContainerCamera;
            spriteBack           = GraphicsManager.GetSpriteColour(textureColour);
            this.borderThickness = borderThickness;
            this.allowedResize   = allowedResize;

            name = "ContainerBorder";
            SetSize();
            parentContainerCamera.ToggleBorder(borderThickness);
        }
示例#3
0
 public ContainerScrollV(ContainerCamera parentContainerCamera, int thickness, int textureColourBack, int textureColorScroll)
 {
     this.thickness             = thickness;
     drawSpriteBack             = true;
     spriteBack                 = GraphicsManager.GetSpriteColour(textureColourBack);
     spriteScroll               = GraphicsManager.GetSpriteColour(textureColorScroll);
     this.parentContainerCamera = parentContainerCamera;
     name           = "ContainerScrollV";
     currentUiScale = DisplayController.uiScale;
     SetSize();
 }
示例#4
0
        protected Container(Rectangle localLocation, DockType dockType, bool fadeIn)
        {
            currentUiScale      = DisplayController.uiScale;
            originalLocation    = localLocation;
            this.dockType       = dockType;
            canChangeFocusOrder = true;
            this.alwaysOnTop    = alwaysOnTop;
            localLocation       = CalcDockType();
            containerCamera     = new ContainerCamera(localLocation);
            location            = new Rectangle(0, 0, localLocation.Width, localLocation.Height);

            if (fadeIn)
            {
                SetFadeIn();
            }
            else
            {
                containerState = ContainerState.Normal;
                containerFade  = 1f;
            }
        }
示例#5
0
        public ContainerHeading(ContainerCamera parentContainerCamera, int height, string text, SpriteFont spriteFont, Color fontColor, bool buttonClose, bool buttonPin, bool buttonAction, bool buttonText, bool moveable, Sprite spriteBack)
        {
            name                       = "ContainerHeading";
            drawSpriteBack             = true;
            drawText                   = true;
            this.spriteBack            = spriteBack;
            currentUiScale             = DisplayController.uiScale;
            this.parentContainerCamera = parentContainerCamera;
            this.height                = height;
            SetText(text);
            this.spriteFont = spriteFont;
            this.fontColor  = fontColor;
            SetSize();
            parentContainerCamera.ToggleHeading(height);

            this.buttonClose  = buttonClose;
            this.buttonPin    = buttonPin;
            this.buttonAction = buttonAction;
            this.moveable     = moveable;
            this.buttonText   = buttonText;

            if (buttonClose)
            {
                buttonHeadingClose = new ButtonHeadingClose(parentContainerCamera);
            }
            if (buttonPin)
            {
                buttonHeadingPin = new ButtonHeadingPin(parentContainerCamera);
            }
            if (buttonAction)
            {
                buttonHeadingAction = new ButtonHeadingAction(parentContainerCamera);
            }
            if (buttonText)
            {
                buttonHeadingText = new ButtonHeadingText(parentContainerCamera);
                isText            = buttonHeadingText.TogglePressed();
                buttonHeadingText.SetPress();
            }
        }