Input Roll - add a method that generates built in context menu items (for now just a separator and a rotate menu item), add rotate as a hotkey Ctrl+Shift+F, note: this is built into input roll, it can conflict with mapped hotkeys since tastudio sends input to the mainform! Need to deal with that at some point, in the meantime that's an unlikely key combo. Still todo: a tastudio menu item for rotate, and fix the context menu in horizontal orientation
This commit is contained in:
parent
b87177a0b5
commit
c14028d6c8
|
@ -405,7 +405,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
/// Sets the width of data cells when in Horizontal orientation.
|
||||
/// </summary>
|
||||
/// <param name="maxLength">The maximum number of characters the column will support in Horizontal orientation.</param>
|
||||
public int MaxCharactersInHorizontal{
|
||||
public int MaxCharactersInHorizontal
|
||||
{
|
||||
get
|
||||
{
|
||||
return _maxCharactersInHorizontal;
|
||||
|
@ -537,6 +538,25 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
public IEnumerable<ToolStripItem> GenerateContextMenuItems()
|
||||
{
|
||||
yield return new ToolStripSeparator();
|
||||
|
||||
var rotate = new ToolStripMenuItem
|
||||
{
|
||||
Name = "RotateMenuItem",
|
||||
Text = "Rotate",
|
||||
ShortcutKeyDisplayString = "Ctrl+Shift+F",
|
||||
};
|
||||
|
||||
rotate.Click += (o, ev) =>
|
||||
{
|
||||
this.HorizontalOrientation ^= true;
|
||||
};
|
||||
|
||||
yield return rotate;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Paint
|
||||
|
@ -1227,6 +1247,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
if (e.Control && !e.Alt && e.Shift && e.KeyCode == Keys.F) // Ctrl+Shift+F
|
||||
{
|
||||
HorizontalOrientation ^= true;
|
||||
}
|
||||
|
||||
base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Change Events
|
||||
|
|
|
@ -1132,6 +1132,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
LoadConfigSettings();
|
||||
SetColumnsFromCurrentStickies();
|
||||
RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());
|
||||
RefreshDialog();
|
||||
}
|
||||
|
||||
|
@ -1166,7 +1167,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
private void RightClickMenu_Opened(object sender, EventArgs e)
|
||||
{
|
||||
RemoveMarkersContextMenuItem.Enabled = _currentTasMovie.Markers.Any(m => TasView.SelectedRows.Contains(m.Frame)); // Disable the option to remove markers if no markers are selected (FCUEX does this).
|
||||
RemoveMarkersContextMenuItem.Enabled = _currentTasMovie.Markers.Any(m => TasView.SelectedRows.Contains(m.Frame)); // Disable the option to remove markers if no markers are selected (FCEUX does this).
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in New Issue