Exemplo n.º 1
0
		public ButtonSimple( string name, Vector2 position, string BtnTextureName, SFormStyle style ) {
			ControlType = EControlType.TextButton;
			Name = name;
			PositionOrg = position;
			Position = position;
			WindowStyle = style;

			InitDefaults();
			InitEvents();
			InitTextures( BtnTextureName );
		}
Exemplo n.º 2
0
        public ButtonSimple(string name, Vector2 position, string BtnTextureName, SFormStyle style)
        {
            ControlType = EControlType.TextButton;
            Name        = name;
            PositionOrg = position;
            Position    = position;
            WindowStyle = style;

            InitDefaults();
            InitEvents();
            InitTextures(BtnTextureName);
        }
Exemplo n.º 3
0
		public Button( string name, Vector2 position, string BtnTextureName, int Width, SFormStyle style ) {
			ControlType = EControlType.TextButton;
			Name = name;
			PositionOrg = position;
			Position = position;
			WindowStyle = style;
			ControlSize = new Point( Width, ControlSize.Y );

			InitDefaults();
			InitEvents();
			InitTextures( BtnTextureName );
		}
Exemplo n.º 4
0
		public Scrollbar( string name, Vector2 position, EScrollBarAxis Axis, int width, int height, int max, int value, SFormStyle WndStyle ) {
			ControlType = EControlType.Scrollbar;
			Name = name;
			PositionOrg = position;
			Position = position;
			ScrollBarAxis = Axis;
			WindowStyle = WndStyle;

			InitDefaults();
			InitTextures();
			InitEvents();
		}
Exemplo n.º 5
0
		public ComboBox( string name, Vector2 origin, int Width, SpriteFont font, SFormStyle style ) {
			ControlType = EControlType.Combo;
			PositionOrg = origin;
			ControlSize = new Point( Width, 0 );
			Position = PositionOrg;
			Name = name;
			SpriteFont = font;
			WindowStyle = style;

			InitTextures();
			InitDefaults();
			InitEvents();
		}
Exemplo n.º 6
0
        public Button(string name, Vector2 position, string BtnTextureName, int Width, SFormStyle style)
        {
            ControlType = EControlType.TextButton;
            Name        = name;
            PositionOrg = position;
            Position    = position;
            WindowStyle = style;
            ControlSize = new Point(Width, ControlSize.Y);

            InitDefaults();
            InitEvents();
            InitTextures(BtnTextureName);
        }
Exemplo n.º 7
0
		public RadioButton( string name, Vector2 origin, string text, bool bChecked, SpriteFont font, SFormStyle style ) {
			ControlType = EControlType.RadioButton;
			Name = name;
			PositionOrg = origin;
			Position = PositionOrg;
			Text = text;
			Checked = bChecked;
			SpriteFont = font;

			InitTextures();
			InitDefaults();
			InitEvents();
		}
Exemplo n.º 8
0
        public Scrollbar(string name, Vector2 position, EScrollBarAxis Axis, int width, int height, int max, int value, SFormStyle WndStyle)
        {
            ControlType   = EControlType.Scrollbar;
            Name          = name;
            PositionOrg   = position;
            Position      = position;
            ScrollBarAxis = Axis;
            WindowStyle   = WndStyle;

            InitDefaults();
            InitTextures();
            InitEvents();
        }
Exemplo n.º 9
0
        public Checkbox(string name, Vector2 origin, string text, SpriteFont Font, SFormStyle WndStyle)
        {
            ControlType = EControlType.Checkbox;
            Name        = name;
            PositionOrg = origin;
            Position    = PositionOrg;
            Text        = text;
            SpriteFont  = Font;
            WindowStyle = WndStyle;

            InitTextures();

            OnPress += new EventHandler(checkbox_onPress);
        }
Exemplo n.º 10
0
        public ComboBox(string name, Vector2 origin, int Width, SpriteFont font, SFormStyle style)
        {
            ControlType = EControlType.Combo;
            PositionOrg = origin;
            ControlSize = new Point(Width, 0);
            Position    = PositionOrg;
            Name        = name;
            SpriteFont  = font;
            WindowStyle = style;

            InitTextures();
            InitDefaults();
            InitEvents();
        }
Exemplo n.º 11
0
		public ImageBox( string ImageName, Vector2 Pos, Point Size, Texture2D ImgTexture, Color DefaultColor, SFormStyle Style ) {
			ControlType = EControlType.ImageBox;
			Name = ImageName;
			PositionOrg = Pos;
			Position = Pos;
			WindowStyle = Style;
			ControlTexture = ImgTexture;
			ColorBgDefault = DefaultColor;
			ControlSize = Size;

			OnMouseOver += new EventHandler( buttonMouseOver );
			OnMouseOut += new EventHandler( buttonMouseOut );
			OnMouseClick += new EventHandler( buttonMouseClick );
			OnMouseRelease += new EventHandler( buttonMouseRelease );
		}
Exemplo n.º 12
0
        public ImageBox(string ImageName, Vector2 Pos, Point Size, Texture2D ImgTexture, Color DefaultColor, SFormStyle Style)
        {
            ControlType    = EControlType.ImageBox;
            Name           = ImageName;
            PositionOrg    = Pos;
            Position       = Pos;
            WindowStyle    = Style;
            ControlTexture = ImgTexture;
            ColorBgDefault = DefaultColor;
            ControlSize    = Size;

            OnMouseOver    += new EventHandler(buttonMouseOver);
            OnMouseOut     += new EventHandler(buttonMouseOut);
            OnMouseClick   += new EventHandler(buttonMouseClick);
            OnMouseRelease += new EventHandler(buttonMouseRelease);
        }
Exemplo n.º 13
0
		public Slider( string name, Vector2 position, Texture2D Texture, int Width, int min, int max, int value, SFormStyle WndStyle ) {
			ControlType = EControlType.Slider;
			Name = name;
			PositionOrg = position;
			Position = PositionOrg;
			ControlSize = new Point( Width, ControlSize.Y );
			MinValue = min;
			MaxValue = max;
			Value = value;
			WindowStyle = WndStyle;
			slider = Texture;

			InitTextures();
			InitDefaults();
			InitEvents();
		}
Exemplo n.º 14
0
        public Listbox(string name, Vector2 origin, Point Csize, Color BackColor, Color ForeColor, SpriteFont Font, SFormStyle Wstyle)
        {
            ControlType    = EControlType.Listbox;
            Name           = name;
            PositionOrg    = origin;
            Position       = this.PositionOrg;
            ControlSize    = Csize;
            ColorBgDefault = BackColor;
            ColorFgDefault = ForeColor;
            SpriteFont     = Font;
            WindowStyle    = Wstyle;

            InitTextures();
            InitDefaults();
            InitEvents();
        }
Exemplo n.º 15
0
        public Slider(string name, Vector2 position, Texture2D Texture, int Width, int min, int max, int value, SFormStyle WndStyle)
        {
            ControlType = EControlType.Slider;
            Name        = name;
            PositionOrg = position;
            Position    = PositionOrg;
            ControlSize = new Point(Width, ControlSize.Y);
            MinValue    = min;
            MaxValue    = max;
            Value       = value;
            WindowStyle = WndStyle;
            slider      = Texture;

            InitTextures();
            InitDefaults();
            InitEvents();
        }
Exemplo n.º 16
0
		public Textbox( string name, Vector2 origin, int width, int height, string StndText, string PassChar, int MaxLength, bool Numerical, SpriteFont Font, SFormStyle style ) {
			ControlType = EControlType.Textbox;
			Name = name;
			PositionOrg = origin;
			Position = origin;
			Text = StndText;
			bNumerical = Numerical;
			SpriteFont = Font;
			WindowStyle = style;
			maxLength = MaxLength;
			passChar = PassChar;

			minHeigth = height;
			ControlSize = new Point( width, minHeigth );

			InitTextures();
			InitDefaults();
			InitEvents();
		}
Exemplo n.º 17
0
        public Textbox(string name, Vector2 origin, int width, int height, string StndText, string PassChar, int MaxLength, bool Numerical, SpriteFont Font, SFormStyle style)
        {
            ControlType = EControlType.Textbox;
            Name        = name;
            PositionOrg = origin;
            Position    = origin;
            Text        = StndText;
            bNumerical  = Numerical;
            SpriteFont  = Font;
            WindowStyle = style;
            maxLength   = MaxLength;
            passChar    = PassChar;

            minHeigth   = height;
            ControlSize = new Point(width, minHeigth);

            InitTextures();
            InitDefaults();
            InitEvents();
        }
Exemplo n.º 18
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="WndPos">Window Position (Vector2.zero for Center)</param>
        /// <param name="WndSize">Window Size</param>
        /// <param name="WndTitle">Title Name</param>
        /// <param name="ManualInit">Initialize manual?</param>
        /// <param name="ColBg">Background Color</param>
        /// <param name="ColFg">Foreground Color</param>
        /// <param name="WndFont">Window Font for Title Name</param>
        /// <param name="WndStyle">Window Style</param>
        public Form(Vector2 WndPos, Vector2 WndSize, string WndTitle, bool ManualInit, Color ColBg, Color ColFg, SpriteFont WndFont, SFormStyle WndStyle)
        {
            Form.CurrentDrawOrder++;

            mScreenSize = new Vector2(Constants.GraphicsDevice.Viewport.Width, Constants.GraphicsDevice.Viewport.Height);

            // public Settings
            this.FormPos         = WndPos;
            this.FormSize        = WndSize;
            this.FormTitle       = WndTitle;
            this.ColorBackground = ColBg;
            this.ColorForeground = ColFg;
            this.FormStyle       = WndStyle;
            this.FormFont        = WndFont;
            this.FormTitlePos    = this.FormStyle.TitlePosition;

            // private Settings
            Form.TopForm       = this;
            this.mFormAlpha    = 0f;
            this.mAlpha        = 0f;
            this.mFormPosPrev  = this.FormPos;
            this.mFormSizePrev = this.FormSize;
            this.mDrawOrder    = Form.CurrentDrawOrder;

            if (this.FormPos == Vector2.Zero)
            {
                this.FormPos = new Vector2(Constants.GraphicsDevice.Viewport.Width / 2f - this.FormSize.X / 2f, Constants.GraphicsDevice.Viewport.Height / 2f - this.FormSize.Y / 2f);
            }

            Initialize(ManualInit);
        }
Exemplo n.º 19
0
		public BottomlessForm( Vector2 WndPos, Vector2 WndSize, string WndTitle, Color ColBg, Color ColFg, SpriteFont WndFont, SFormStyle WndStyle )
			: base( WndPos, WndSize, WndTitle, true, ColBg, ColFg, WndFont, WndStyle ) {
		}
Exemplo n.º 20
0
        public RadioButton(string name, Vector2 origin, string text, bool bChecked, SpriteFont font, SFormStyle style)
        {
            ControlType = EControlType.RadioButton;
            Name        = name;
            PositionOrg = origin;
            Position    = PositionOrg;
            Text        = text;
            Checked     = bChecked;
            SpriteFont  = font;

            InitTextures();
            InitDefaults();
            InitEvents();
        }
Exemplo n.º 21
0
		/// <summary>
		/// 
		/// </summary>
		/// <param name="WndPos">Window Position (Vector2.zero for Center)</param>
		/// <param name="WndSize">Window Size</param>
		/// <param name="WndTitle">Title Name</param>
		/// <param name="ManualInit">Initialize manual?</param>
		/// <param name="ColBg">Background Color</param>
		/// <param name="ColFg">Foreground Color</param>
		/// <param name="WndFont">Window Font for Title Name</param>
		/// <param name="WndStyle">Window Style</param>
		public Form( Vector2 WndPos, Vector2 WndSize, string WndTitle, bool ManualInit, Color ColBg, Color ColFg, SpriteFont WndFont, SFormStyle WndStyle ) {
			Form.CurrentDrawOrder++;

			mScreenSize = new Vector2( Constants.GraphicsDevice.Viewport.Width, Constants.GraphicsDevice.Viewport.Height );

			// public Settings
			this.FormPos = WndPos;
			this.FormSize = WndSize;
			this.FormTitle = WndTitle;
			this.ColorBackground = ColBg;
			this.ColorForeground = ColFg;
			this.FormStyle = WndStyle;
			this.FormFont = WndFont;
			this.FormTitlePos = this.FormStyle.TitlePosition;

			// private Settings
			Form.TopForm = this;
			this.mFormAlpha = 0f;
			this.mAlpha = 0f;
			this.mFormPosPrev = this.FormPos;
			this.mFormSizePrev = this.FormSize;
			this.mDrawOrder = Form.CurrentDrawOrder;

			if( this.FormPos == Vector2.Zero )
				this.FormPos = new Vector2( Constants.GraphicsDevice.Viewport.Width / 2f - this.FormSize.X / 2f, Constants.GraphicsDevice.Viewport.Height / 2f - this.FormSize.Y / 2f );

			Initialize( ManualInit );
		}
Exemplo n.º 22
0
 public BottomlessForm(Vector2 WndPos, Vector2 WndSize, string WndTitle, Color ColBg, Color ColFg, SpriteFont WndFont, SFormStyle WndStyle)
     : base(WndPos, WndSize, WndTitle, true, ColBg, ColFg, WndFont, WndStyle)
 {
 }