InputRoll - add a flag for whether the control can be toggled into HorizontalOrientation, and only enable it on tastudio
This commit is contained in:
parent
d687babb41
commit
6640146c0a
|
@ -330,6 +330,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
set => _hoverTimer.Interval = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not the control can be toggled into HorizontalOrientation mode
|
||||
/// </summary>
|
||||
[DefaultValue(false)]
|
||||
[Category("Behavior")]
|
||||
public bool Rotatable { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Event Handlers
|
||||
|
@ -909,21 +916,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public IEnumerable<ToolStripItem> GenerateContextMenuItems()
|
||||
{
|
||||
yield return new ToolStripSeparator();
|
||||
|
||||
var rotate = new ToolStripMenuItem
|
||||
if (Rotatable)
|
||||
{
|
||||
Name = "RotateMenuItem",
|
||||
Text = "Rotate",
|
||||
ShortcutKeyDisplayString = RotateHotkeyStr,
|
||||
};
|
||||
yield return new ToolStripSeparator();
|
||||
|
||||
rotate.Click += (o, ev) =>
|
||||
{
|
||||
HorizontalOrientation ^= true;
|
||||
};
|
||||
var rotate = new ToolStripMenuItem
|
||||
{
|
||||
Name = "RotateMenuItem",
|
||||
Text = "Rotate",
|
||||
ShortcutKeyDisplayString = RotateHotkeyStr,
|
||||
};
|
||||
|
||||
yield return rotate;
|
||||
rotate.Click += (o, ev) => { HorizontalOrientation ^= true; };
|
||||
|
||||
yield return rotate;
|
||||
}
|
||||
}
|
||||
|
||||
public string RotateHotkeyStr => "Ctrl+Shift+F";
|
||||
|
@ -1314,7 +1321,10 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (e.Control && !e.Alt && e.Shift && e.KeyCode == Keys.F) // Ctrl+Shift+F
|
||||
{
|
||||
HorizontalOrientation ^= true;
|
||||
if (Rotatable)
|
||||
{
|
||||
HorizontalOrientation ^= true;
|
||||
}
|
||||
}
|
||||
// Scroll
|
||||
else if (!e.Control && !e.Alt && !e.Shift && e.KeyCode == Keys.PageUp) // Page Up
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
namespace BizHawk.Client.EmuHawk
|
||||
{
|
||||
public class RollColumn
|
||||
{
|
||||
|
|
|
@ -1240,6 +1240,7 @@
|
|||
this.TasView.MaxCharactersInHorizontal = 1;
|
||||
this.TasView.MultiSelect = false;
|
||||
this.TasView.Name = "TasView";
|
||||
this.TasView.Rotatable = true;
|
||||
this.TasView.RowCount = 0;
|
||||
this.TasView.ScrollSpeed = 1;
|
||||
this.TasView.SeekingCutoffInterval = 0;
|
||||
|
|
|
@ -252,15 +252,16 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
SetColumnsFromCurrentStickies();
|
||||
|
||||
RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());
|
||||
|
||||
RightClickMenu.Items
|
||||
.OfType<ToolStripMenuItem>()
|
||||
.First(t => t.Name == "RotateMenuItem")
|
||||
.Click += (o, ov) =>
|
||||
if (TasView.Rotatable)
|
||||
{
|
||||
CurrentTasMovie.FlagChanges();
|
||||
};
|
||||
RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems()
|
||||
.ToArray());
|
||||
|
||||
RightClickMenu.Items
|
||||
.OfType<ToolStripMenuItem>()
|
||||
.First(t => t.Name == "RotateMenuItem")
|
||||
.Click += (o, ov) => { CurrentTasMovie.FlagChanges(); };
|
||||
}
|
||||
|
||||
TasView.InputPaintingMode = Settings.DrawInput;
|
||||
TasView.ScrollSpeed = Settings.ScrollSpeed;
|
||||
|
|
Loading…
Reference in New Issue