Change play button key to Space, and allowed it to be rebinded.
This commit is contained in:
Generated
+1
-1
@@ -801,7 +801,7 @@
|
||||
this.playButton.Name = "playButton";
|
||||
this.playButton.Size = new System.Drawing.Size(86, 23);
|
||||
this.playButton.TabIndex = 0;
|
||||
this.playButton.Text = "Play (P)";
|
||||
this.playButton.Text = "Play";
|
||||
this.playButton.UseVisualStyleBackColor = true;
|
||||
this.playButton.Click += new System.EventHandler(this.playButton_Click);
|
||||
//
|
||||
|
||||
@@ -125,6 +125,7 @@ namespace BAKKA_Editor
|
||||
blueButton.AppendHotkey(userSettings.HotkeySettings.SnapDownHotkey);
|
||||
chainButton.AppendHotkey(userSettings.HotkeySettings.ChainHotkey);
|
||||
holdButton.AppendHotkey(userSettings.HotkeySettings.HoldHotkey);
|
||||
playButton.AppendHotkey(userSettings.HotkeySettings.PlayHotkey);
|
||||
|
||||
// Look for temp files from previous runs
|
||||
var tempFile = Directory.GetFiles(Path.GetTempPath(), "*.bakka");
|
||||
@@ -932,14 +933,15 @@ namespace BAKKA_Editor
|
||||
currentSong.Paused = !currentSong.Paused;
|
||||
if (currentSong.Paused)
|
||||
{
|
||||
playButton.Text = "Play (P)";
|
||||
playButton.Text = "Play";
|
||||
updateTimer.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
playButton.Text = "Pause (P)";
|
||||
playButton.Text = "Pause";
|
||||
updateTimer.Enabled = true;
|
||||
}
|
||||
playButton.AppendHotkey(userSettings.HotkeySettings.PlayHotkey);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1695,11 +1697,6 @@ namespace BAKKA_Editor
|
||||
insertButton_Click(sender, e);
|
||||
insertButton.Focus();
|
||||
return true;
|
||||
case Keys.P:
|
||||
if (playButton.Enabled)
|
||||
playButton_Click(sender, e);
|
||||
playButton.Focus();
|
||||
return true;
|
||||
case Keys.Up | Keys.Shift:
|
||||
/* Fallthrough */
|
||||
case Keys.Down | Keys.Shift:
|
||||
@@ -1756,6 +1753,13 @@ namespace BAKKA_Editor
|
||||
holdButton.Focus();
|
||||
return true;
|
||||
}
|
||||
else if (keyData == (Keys)userSettings.HotkeySettings.PlayHotkey)
|
||||
{
|
||||
if (playButton.Enabled)
|
||||
playButton_Click(sender, e);
|
||||
playButton.Focus();
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,5 +37,6 @@ namespace BAKKA_Editor
|
||||
public int SnapDownHotkey { get; set; } = Convert.ToInt32(Keys.D5);
|
||||
public int ChainHotkey { get; set; } = Convert.ToInt32(Keys.D6);
|
||||
public int HoldHotkey { get; set; } = Convert.ToInt32(Keys.D7);
|
||||
public int PlayHotkey { get; set; } = Convert.ToInt32(Keys.Space);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,18 +181,14 @@ namespace BAKKA_Editor
|
||||
|
||||
internal static string KeyIntToString(int key)
|
||||
{
|
||||
int offset = 0;
|
||||
char ret = '0';
|
||||
// Gets the key name from the keycode
|
||||
string val = ((Keys)key).ToString();
|
||||
// Converts digit keycode into number instead of key name
|
||||
if (key >= 48 && key <= 57)
|
||||
{
|
||||
offset = key - 48;
|
||||
val = $"{key - 48}";
|
||||
}
|
||||
else if (key >= 65 && key <= 90)
|
||||
{
|
||||
offset = key - 65;
|
||||
ret = 'A';
|
||||
}
|
||||
return ((char)(ret + offset)).ToString();
|
||||
return val;
|
||||
}
|
||||
|
||||
internal static void AppendHotkey(this Button button, int key)
|
||||
|
||||
Reference in New Issue
Block a user