public static void StyleStandardButton(this GradientButton b) { b.BorderColor = UIExtensions.RGBColor(0xFFFFFF); b.SetTitleColor(UIColor.White, UIControlState.Normal); b.SetTitleColor(UIColor.DarkGray, UIControlState.Highlighted); b.Border = 2; b.DisabledGradient = new GradientHelper(0xFF999999.UIColor(), 0xFF555555.UIColor()); }
private void StyleButton(GradientButton button) { button.CornerRadius = 0; button.SetTitleColor(UIColor.White, UIControlState.Normal); button.SetTitleColor(UIColor.Black, UIControlState.Selected); button.TitleLabel.Font = UIFont.BoldSystemFontOfSize(17f); button.TitleLabel.AdjustsFontSizeToFitWidth = true; button.TitleLabel.MinimumFontSize = 14f; button.Gradient = new GradientHelper(CMUIColors.SecondaryColorADark, CMUIColors.SecondaryColorADarker); }
void StylePadButton(GradientButton button) { button.CornerRadius = 0; button.SetTitleColor(UIColor.White, UIControlState.Normal); button.Gradient = new GradientHelper(CMUIColors.SecondaryColorAMedium, CMUIColors.SecondaryColorADarker); }
public void StyleButton(GradientButton button, bool selected) { button.SetTitleColor(UIColor.White, UIControlState.Normal); UIColor color1 = CMUIColors.PrimaryColorDarker; UIColor color2 = CMUIColors.PrimaryColorLight; if (selected) { button.Gradient = new GradientHelper(color1, color2); button.SetTitleColor(UIColor.White, UIControlState.Normal); } else { button.Gradient = new GradientHelper(UIExtensions.RGBColor(0xEEEEEE), UIExtensions.RGBColor(0xEEEEEE)); button.SetTitleColor(UIExtensions.ARGBColor(0xFF999999), UIControlState.Normal); } }
private void StyleTab(GradientButton b, bool selected) { b.CornerRadius = 0; UIColor colorA = CMUIColors.PrimaryColorDarker; UIColor colorB = CMUIColors.PrimaryColorMedium; if (selected) { b.Gradient = new GradientHelper(colorA, colorB); } else { b.Gradient = new GradientHelper(colorB, colorA); } b.SetTitleColor(UIColor.White, UIControlState.Normal); b.SetTitleColor(UIColor.Gray, UIControlState.Highlighted); }
public static void TextFieldStyle(GradientButton b, float fontsize = 15.0f) { b.SetTitleColor(UIColor.Black, UIControlState.Normal); b.BorderColor = 0xFF777777.UIColor(); b.Gradient = new GradientHelper(0xFFFFFFFF.UIColor()); b.TitleLabel.Font = UIFont.SystemFontOfSize(fontsize); b.TitleLabel.LineBreakMode = UILineBreakMode.TailTruncation; AlignButtonLeft(b); b.CornerRadius = 3.0f; }
public SpecialAbilityView(Monster monster, SpecialAbility ability) { _Monster = monster; _Ability = ability; BackgroundColor = UIColor.Clear; BorderColor = 0xFFFFFFFF.UIColor(); Border = 2.0f; Gradient = new GradientHelper(CMUIColors.PrimaryColorDark); _DeleteButton = new UIButton(); _DeleteImage = UIImage.FromFile("Images/External/redx.png"); _DeleteButton.SetImage(_DeleteImage, UIControlState.Normal); _DeleteButton.TouchUpInside += delegate { _Monster.SpecialAbilitiesList.Remove(_Ability); }; _SpecialTextButton = new GradientButton(); _SpecialTextButton.SetTitleColor(0x00000000.UIColor(), UIControlState.Normal); _SpecialTextManager = new ButtonPropertyManager(_SpecialTextButton, MainUI.MainView, _Ability, "Text") { Multiline = true }; _Manager.Add(_SpecialTextManager); _NameButton = new GradientButton(); CMStyles.TextFieldStyle(_NameButton); _Manager.Add(new ButtonPropertyManager(_NameButton, MainUI.MainView, _Ability, "Name")); _TypeButton = new GradientButton(); ButtonPropertyManager typeMan = new ButtonPropertyManager(_TypeButton, MainUI.MainView, _Ability, "Type"); typeMan.ValueList = new List <KeyValuePair <object, string> > { new KeyValuePair <object, string>("Ex", "Ex"), new KeyValuePair <object, string>("Sp", "Sp"), new KeyValuePair <object, string>("Su", "Su"), new KeyValuePair <object, string>("", "-"), }; _Manager.Add(typeMan); Add(_DeleteButton); Add(_NameButton); Add(_TypeButton); Add(_SpecialTextButton); LayoutSubviews(); }
void StyleButton(GradientButton button) { button.CornerRadius = 0; button.SetTitleColor(UIColor.White, UIControlState.Normal); }