{
public static class Buttons
{
- public static NinePatchButtonStyle Regular => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_full_28px.png",
- PressedColor = new Color(240f / 255f, 245f / 255f, 252f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- EnableMarkup = true,
- TextColor = new Selector<Color>
- {
- Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
- Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
- },
- FontFamily = GetNavigationFont(),
- },
- };
+ public static NinePatchButtonStyle Regular => new LightButtonStyle();
- public static NinePatchButtonStyle Inverse => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_full_28px.png",
- NormalColor = new Color(10f / 255f, 14f / 255f, 74f / 255f, 1),
- PressedColor = new Color(43f / 255f, 95f / 255f, 185f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- TextColor = Color.White,
- FontFamily = GetNavigationFont(),
- },
- };
+ public static NinePatchButtonStyle Inverse => new DarkButtonStyle();
- public static NinePatchButtonStyle Previous => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_full_28px.png",
- PressedColor = new Color(240f / 255f, 245f / 255f, 252f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 24.0f,
- TextColor = Color.Black,
- FontFamily = GetNavigationFont(),
- HorizontalAlignment = HorizontalAlignment.Begin,
- },
- Icon = new ImageViewStyle
- {
- ResourceUrl = new Selector<string>
- {
- Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active.png",
- Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active.png",
- Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active.png",
- },
- },
- TextPadding = new Extents(20, 0, 0, 0),
- IconRelativeOrientation = Button.IconOrientation.Left,
- };
+ public static NinePatchButtonStyle Previous => new DirectionButtonStyle(Direction.Previous);
- public static NinePatchButtonStyle Next => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_full_28px.png",
- PressedColor = new Color(240f / 255f, 245f / 255f, 252f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 24.0f,
- TextColor = Color.Black,
- FontFamily = GetNavigationFont(),
- HorizontalAlignment = HorizontalAlignment.End,
- },
- Icon = new ImageViewStyle
- {
- ResourceUrl = new Selector<string>
- {
- Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active_reverse.png",
- Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active_reverse.png",
- Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/12_icon_back_arrow_active_reverse.png",
- },
- },
- IconPadding = new Extents(20, 0, 0, 0),
- IconRelativeOrientation = Button.IconOrientation.Left,
- };
+ public static NinePatchButtonStyle Next => new DirectionButtonStyle(Direction.Next);
- public static NinePatchButtonStyle RegularRepeat => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_full_28px.png",
- PressedColor = new Color(240f / 255f, 245f / 255f, 252f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- EnableMarkup = true,
- TextColor = new Selector<Color>
- {
- Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
- Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
- },
- FontFamily = GetNavigationFont(),
- HorizontalAlignment = HorizontalAlignment.Begin,
- },
- Icon = new ImageViewStyle
- {
- ResourceUrl = new Selector<string>
- {
- Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- },
- },
- IconPadding = new Extents(276, 0, 0, 0),
- TextPadding = new Extents(23, 0, 0, 0),
- IconRelativeOrientation = Button.IconOrientation.Left,
- };
+ public static NinePatchButtonStyle White => new WhiteButtonStyle();
- public static NinePatchButtonStyle ReviewMovement => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- EnableMarkup = true,
- TextColor = new Selector<Color>
- {
- Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
- Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
- },
- FontFamily = GetNavigationFont(),
- HorizontalAlignment = HorizontalAlignment.Begin,
- },
- Icon = new ImageViewStyle
- {
- ResourceUrl = new Selector<string>
- {
- Normal = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- Pressed = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- Disabled = NUIApplication.Current.DirectoryInfo.Resource + "styles/button/icon-feather-repeat.png",
- },
- },
- IconPadding = new Extents(76, 0, 0, 0),
- TextPadding = new Extents(24, 0, 0, 0),
- IconRelativeOrientation = Button.IconOrientation.Left,
- };
+ public static NinePatchButtonStyle RegularRepeat => new DarkButtonStyle();
- public static ButtonStyle Transparent => new ButtonStyle
- {
- BackgroundColor = Color.Transparent,
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- EnableMarkup = true,
- TextColor = new Selector<Color>
- {
- Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
- Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
- },
- FontFamily = GetNavigationFont(),
- HorizontalAlignment = HorizontalAlignment.Center,
- },
- };
+ public static ButtonStyle Transparent => new TransparentButtonStyle();
- public static NinePatchButtonStyle Outline => new NinePatchButtonStyle
- {
- BackgroundColor = Color.Transparent,
- NormalImageUrl = "*Resource*/styles/button/button_outline_28px.png",
- NormalColor = new Color(10f / 255f, 14f / 255f, 74f / 255f, 1),
- PressedColor = new Color(10f / 255f, 14f / 255f, 74f / 255f, 1),
- Text = new TextLabelStyle
- {
- PixelSize = 32.0f,
- EnableMarkup = true,
- TextColor = new Selector<Color>
- {
- Normal = new Color(0.0f, 20.0f / 255.0f, 71 / 255.0f, 1.0f),
- Pressed = new Color(41.0f / 255.0f, 91.0f / 255.0f, 178 / 255.0f, 1.0f),
- },
- FontFamily = GetNavigationFont(),
- },
- };
+ public static NinePatchButtonStyle Outline => new OutlineButtonStyle();
- public static NinePatchButtonStyle RegularBig
- {
- get
- {
- var style = Regular;
- style.Text.PixelSize = 40.0f;
- return style;
- }
- }
+ public static NinePatchButtonStyle RegularBig => new BigLightButtonStyle();
- public static ButtonStyle Back => new ButtonStyle
+ public static ButtonStyle Exit => new ButtonStyle
{
BackgroundColor = Color.Transparent,
Overlay = new ImageViewStyle
ResourceUrl = NUIApplication.Current.DirectoryInfo.Resource + "/styles/button/icon_exit.png",
},
};
-
- private static Selector<string> GetNavigationFont()
- {
- return new Selector<string>
- {
- Normal = "BreezeSans",
- };
- }
}
}