public PanelView(View rootView, Vector2 position) : base(rootView) { SelectedNinepatch = GeeUI.NinePatchPanelSelected; UnselectedNinepatch = GeeUI.NinePatchPanelUnselected; Position = position; }
public WindowView(GeeUIMain GeeUI, View rootView, Vector2 position) : base(GeeUI, rootView) { Position.Value = position; NinePatchNormal = GeeUIMain.NinePatchWindowUnselected; NinePatchSelected = GeeUIMain.NinePatchWindowSelected; }
public PanelView(GeeUIMain GeeUI, View rootView, Vector2 position) : base(GeeUI, rootView) { SelectedNinepatch = GeeUIMain.NinePatchPanelSelected; UnselectedNinepatch = GeeUIMain.NinePatchPanelUnselected; Position.Value = position; }
public WindowView(View rootView, Vector2 position, SpriteFont windowTextFont) : base(rootView) { Position = position; WindowTextFont = windowTextFont; NinePatchNormal = GeeUI.NinePatchWindowUnselected; NinePatchSelected = GeeUI.NinePatchWindowSelected; }
public ButtonView(View rootview, View contentView, Vector2 position) : base(rootview) { NinePatchNormal = GeeUI.NinePatchBtnDefault; NinePatchHover = GeeUI.NinePatchBtnHover; NinePatchClicked = GeeUI.NinePatchBtnClicked; Position = position; ButtonContentview = contentView; }
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; }
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; }
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 }; }
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; }
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; }
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; }
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) { }; }
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(); }
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", ""); }
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", ""); }