Ejemplo n.º 1
0
 public PanelView(View rootView, Vector2 position)
     : base(rootView)
 {
     SelectedNinepatch = GeeUI.NinePatchPanelSelected;
     UnselectedNinepatch = GeeUI.NinePatchPanelUnselected;
     Position = position;
 }
Ejemplo n.º 2
0
		public WindowView(GeeUIMain GeeUI, View rootView, Vector2 position)
			: base(GeeUI, rootView)
		{
			Position.Value = position;
			NinePatchNormal = GeeUIMain.NinePatchWindowUnselected;
			NinePatchSelected = GeeUIMain.NinePatchWindowSelected;
		}
Ejemplo n.º 3
0
		public PanelView(GeeUIMain GeeUI, View rootView, Vector2 position)
			: base(GeeUI, rootView)
		{
			SelectedNinepatch = GeeUIMain.NinePatchPanelSelected;
			UnselectedNinepatch = GeeUIMain.NinePatchPanelUnselected;
			Position.Value = position;
		}
Ejemplo n.º 4
0
 public WindowView(View rootView, Vector2 position, SpriteFont windowTextFont)
     : base(rootView)
 {
     Position = position;
     WindowTextFont = windowTextFont;
     NinePatchNormal = GeeUI.NinePatchWindowUnselected;
     NinePatchSelected = GeeUI.NinePatchWindowSelected;
 }
Ejemplo n.º 5
0
 public ButtonView(View rootview, View contentView, Vector2 position)
     : base(rootview)
 {
     NinePatchNormal = GeeUI.NinePatchBtnDefault;
     NinePatchHover = GeeUI.NinePatchBtnHover;
     NinePatchClicked = GeeUI.NinePatchBtnClicked;
     Position = position;
     ButtonContentview = contentView;
 }
Ejemplo n.º 6
0
		public SliderView(GeeUIMain GeeUI, View rootView, Vector2 position, int min, int max)
			: base(GeeUI, rootView)
		{
			SliderRange = GeeUIMain.NinePatchSliderRange;
			SliderDefault = GeeUIMain.TextureSliderDefault;
			SliderSelected = GeeUIMain.TextureSliderSelected;

			_min = min;
			_max = max;

			Position.Value = position;
		}
Ejemplo n.º 7
0
        public SliderView(View rootView, Vector2 position, int min, int max)
            : base(rootView)
        {
            SliderRange = GeeUI.NinePatchSliderRange;
            SliderDefault = GeeUI.TextureSliderDefault;
            SliderSelected = GeeUI.TextureSliderSelected;

            _min = min;
            _max = max;

            Position = position;
        }
Ejemplo n.º 8
0
        public TabView(View rootView, Vector2 position, SpriteFont font)
            : base(rootView)
        {
            Position = position;
            TabFont = font;
            NumChildrenAllowed = 1;

            NinePatchDefault = GeeUI.NinePatchTabDefault;
            NinePatchSelected = GeeUI.NinePatchTabSelected;
            this.Height = 25;
            new TextView(this, "", Vector2.Zero, font) { TextJustification = TextJustification.Center };
        }
Ejemplo n.º 9
0
        public ButtonView(View rootView, string text, Vector2 position, SpriteFont font)
            : base(rootView)
        {
            NinePatchNormal = GeeUI.NinePatchBtnDefault;
            NinePatchHover = GeeUI.NinePatchBtnHover;
            NinePatchClicked = GeeUI.NinePatchBtnClicked;
            Position = position;

            //Make the TextView for the text
            new TextView(this, text, new Vector2(0, 0), font) {TextJustification = TextJustification.Center};
            Width = (int)font.MeasureString(text).X + NinePatchNormal.LeftWidth + NinePatchNormal.RightWidth;
            Height = (int) font.MeasureString(text).Y + NinePatchNormal.TopHeight + NinePatchNormal.BottomHeight;
        }
Ejemplo n.º 10
0
		public ButtonView(GeeUIMain GeeUI, View rootView, string text, Vector2 position)
			: base(GeeUI, rootView)
		{
			NinePatchNormal = GeeUIMain.NinePatchBtnDefault;
			NinePatchHover = GeeUIMain.NinePatchBtnHover;
			NinePatchClicked = GeeUIMain.NinePatchBtnClicked;
			Position.Value = position;

			//Make the TextView for the text
			var textV = new TextView(this.ParentGeeUI, this, text, new Vector2(0, 0)) {TextJustification = TextJustification.Left};
			Width.Value = (textV.Width.Value = (int)GeeUIMain.Font.MeasureString(text).X) + NinePatchNormal.LeftWidth + NinePatchNormal.RightWidth;
			Height.Value = (textV.Height.Value = (int)GeeUIMain.Font.MeasureString(text).Y) + NinePatchNormal.TopHeight + NinePatchNormal.BottomHeight;
		}
Ejemplo n.º 11
0
        public TextFieldView(View rootView, Vector2 position, SpriteFont textFont)
            : base(rootView)
        {
            NinePatchDefault = GeeUI.NinePatchTextFieldDefault;
            NinePatchSelected = GeeUI.NinePatchTextFieldSelected;

            Position = position;
            TextInputFont = textFont;
            NumChildrenAllowed = -1;

            GeeUI.OnKeyPressedHandler += keyPressedHandler;
            GeeUI.OnKeyReleasedHandler += keyReleasedHandler;
        }
Ejemplo n.º 12
0
		public TabView(GeeUIMain GeeUI, View rootView, Vector2 position)
			: base(GeeUI, rootView)
		{
			Position.Value = position;
			this.numChildrenAllowed = 1;

			NinePatchDefault = GeeUIMain.NinePatchTabDefault;
			NinePatchSelected = GeeUIMain.NinePatchTabSelected;

			// HACK
			this.Height.Value = (int)(25.0f * GeeUI.Main.FontMultiplier);

			new TextView(GeeUI, this, "", Vector2.Zero) {  };
		}
Ejemplo n.º 13
0
		public ToolTip(GeeUIMain theGeeUI, View parentView, View linkedTo, string text)
			: base(theGeeUI, parentView)
		{
			this.Patch = GeeUIMain.NinePatchPanelUnselected;

			ToolTipText.Value = text;
			TextView = new TextView(theGeeUI, this, text, Vector2.Zero);
			this.ChildrenLayouts.Add(new ExpandToFitLayout());
			this.ChildrenLayouts.Add(new VerticalViewLayout(0, false));

			this.realParent = linkedTo;

			if (this.realParent != null)
				this.Add(new NotifyBinding(this.CheckActive, this.realParent.Active, this.realParent.Attached));
			
			this.Add(new NotifyBinding(this.CheckActive, this.Active));

			this.AnchorPoint.Value = new Vector2(0f, 1f);
			this.Position.Value = InputManager.GetMousePosV();

			this.Add(new NotifyBinding(CheckActive, this.Active, realParent.Active));
			this.AnimateIn();
		}
Ejemplo n.º 14
0
		public TextFieldView(GeeUIMain GeeUI, View rootView, Vector2 position)
			: base(GeeUI, rootView)
		{
			NinePatchDefault = GeeUIMain.NinePatchTextFieldDefault;
			NinePatchSelected = GeeUIMain.NinePatchTextFieldSelected;
			NinePatchRegexGood = GeeUIMain.NinePatchTextFieldRight;
			NinePatchRegexBad = GeeUIMain.NinePatchTextFieldWrong;

			Position.Value = position;

			GeeUI.OnKeyPressedHandler += keyPressedHandler;
			GeeUI.OnKeyReleasedHandler += keyReleasedHandler;

			TextColor = GeeUI.TextColorDefault;

			ContentMustBeScissored.Value = true;

			//Text = new Property<string>();
			//Text.Get = () => MultiLine ? Text.Value : Text.Value.Replace("\n", "");
		}
Ejemplo n.º 15
0
		public TextFieldView(View rootView, Vector2 position, SpriteFont textFont)
			: base(rootView)
		{
			NinePatchDefault = GeeUI.NinePatchTextFieldDefault;
			NinePatchSelected = GeeUI.NinePatchTextFieldSelected;
			NinePatchRegexGood = GeeUI.NinePatchTextFieldRight;
			NinePatchRegexBad = GeeUI.NinePatchTextFieldWrong;

			Position = position;
			TextInputFont = textFont;
			NumChildrenAllowed = -1;

			GeeUI.OnKeyPressedHandler += keyPressedHandler;
			GeeUI.OnKeyReleasedHandler += keyReleasedHandler;

			//Text = new Property<string>();
			//Text.Get = () => MultiLine ? Text.Value : Text.Value.Replace("\n", "");
		}