Unify big buttons

pull/35/head
Miepee 4 years ago
parent 5b520f3cbd
commit 9d1920c849

@ -0,0 +1,17 @@
namespace AM2RLauncher;
public class BigColorButton : ColorButton
{
public BigColorButton(string text)
{
Text = text;
Height = 40;
Width = 275;
TextColor = LauncherColors.Green;
TextColorDisabled = LauncherColors.Inactive;
BackgroundColor = LauncherColors.BG;
BackgroundColorHover = LauncherColors.BGHover;
FrameColor = LauncherColors.Green;
FrameColorDisabled = LauncherColors.Inactive;
}
}

@ -7,7 +7,7 @@ namespace AM2RLauncher;
/// <summary> /// <summary>
/// Extension of <see cref="CustomButton"/> that allows for advanced color settings. /// Extension of <see cref="CustomButton"/> that allows for advanced color settings.
/// </summary> /// </summary>
class ColorButton : CustomButton public class ColorButton : CustomButton
{ {
/// <summary>The <see cref="Color"/> to draw the background with when <see cref="CustomButton.Hover"/> is true.</summary> /// <summary>The <see cref="Color"/> to draw the background with when <see cref="CustomButton.Hover"/> is true.</summary>
public Color BackgroundColorHover { get; set; } public Color BackgroundColorHover { get; set; }

@ -178,17 +178,7 @@ public partial class MainForm : Form
DynamicLayout centerInterface = new DynamicLayout(); DynamicLayout centerInterface = new DynamicLayout();
// PLAY button // PLAY button
playButton = new ColorButton playButton = new BigColorButton(Text.Play);
{
BackgroundColorHover = LauncherColors.BGHover,
Height = 40,
Width = 250,
TextColor = LauncherColors.Green,
TextColorDisabled = LauncherColors.Inactive,
BackgroundColor = LauncherColors.BG,
FrameColor = LauncherColors.Green,
FrameColorDisabled = LauncherColors.Inactive
};
centerInterface.AddRow(playButton); centerInterface.AddRow(playButton);
@ -197,16 +187,7 @@ public partial class MainForm : Form
if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 2 }); if (OS.IsWindows) centerInterface.AddRow(new Label { BackgroundColor = LauncherColors.BG, Height = 2 });
// APK button // APK button
apkButton = new ColorButton apkButton = new BigColorButton(Text.CreateAPK);
{
Text = Text.CreateAPK,
Height = 40,
Width = 250,
TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG,
FrameColor = LauncherColors.Green,
BackgroundColorHover = LauncherColors.BGHover
};
centerInterface.AddRow(apkButton); centerInterface.AddRow(apkButton);
@ -624,7 +605,7 @@ public partial class MainForm : Form
{ {
Text = Text.AddNewMod, Text = Text.AddNewMod,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,
@ -662,7 +643,7 @@ public partial class MainForm : Form
{ {
Text = Text.CreateShortcut, Text = Text.CreateShortcut,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,
@ -674,7 +655,7 @@ public partial class MainForm : Form
{ {
Text = Text.OpenProfileFolder, Text = Text.OpenProfileFolder,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,
@ -686,7 +667,7 @@ public partial class MainForm : Form
{ {
Text = Text.OpenSaveFolder, Text = Text.OpenSaveFolder,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,
@ -698,7 +679,7 @@ public partial class MainForm : Form
{ {
Text = Text.UpdateModButtonText, Text = Text.UpdateModButtonText,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,
@ -710,7 +691,7 @@ public partial class MainForm : Form
{ {
Text = Text.DeleteModButtonText, Text = Text.DeleteModButtonText,
Font = smallButtonFont, Font = smallButtonFont,
Height = 30, Height = 40,
Width = 275, Width = 275,
TextColor = LauncherColors.Green, TextColor = LauncherColors.Green,
BackgroundColor = LauncherColors.BG, BackgroundColor = LauncherColors.BG,

Loading…
Cancel
Save