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;
|
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
|
#endregion
|
||||||
|
|
||||||
#region Event Handlers
|
#region Event Handlers
|
||||||
|
@ -909,21 +916,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
public IEnumerable<ToolStripItem> GenerateContextMenuItems()
|
public IEnumerable<ToolStripItem> GenerateContextMenuItems()
|
||||||
{
|
{
|
||||||
yield return new ToolStripSeparator();
|
if (Rotatable)
|
||||||
|
|
||||||
var rotate = new ToolStripMenuItem
|
|
||||||
{
|
{
|
||||||
Name = "RotateMenuItem",
|
yield return new ToolStripSeparator();
|
||||||
Text = "Rotate",
|
|
||||||
ShortcutKeyDisplayString = RotateHotkeyStr,
|
|
||||||
};
|
|
||||||
|
|
||||||
rotate.Click += (o, ev) =>
|
var rotate = new ToolStripMenuItem
|
||||||
{
|
{
|
||||||
HorizontalOrientation ^= true;
|
Name = "RotateMenuItem",
|
||||||
};
|
Text = "Rotate",
|
||||||
|
ShortcutKeyDisplayString = RotateHotkeyStr,
|
||||||
|
};
|
||||||
|
|
||||||
yield return rotate;
|
rotate.Click += (o, ev) => { HorizontalOrientation ^= true; };
|
||||||
|
|
||||||
|
yield return rotate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string RotateHotkeyStr => "Ctrl+Shift+F";
|
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
|
if (e.Control && !e.Alt && e.Shift && e.KeyCode == Keys.F) // Ctrl+Shift+F
|
||||||
{
|
{
|
||||||
HorizontalOrientation ^= true;
|
if (Rotatable)
|
||||||
|
{
|
||||||
|
HorizontalOrientation ^= true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Scroll
|
// Scroll
|
||||||
else if (!e.Control && !e.Alt && !e.Shift && e.KeyCode == Keys.PageUp) // Page Up
|
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
|
public class RollColumn
|
||||||
{
|
{
|
||||||
|
|
|
@ -1240,6 +1240,7 @@
|
||||||
this.TasView.MaxCharactersInHorizontal = 1;
|
this.TasView.MaxCharactersInHorizontal = 1;
|
||||||
this.TasView.MultiSelect = false;
|
this.TasView.MultiSelect = false;
|
||||||
this.TasView.Name = "TasView";
|
this.TasView.Name = "TasView";
|
||||||
|
this.TasView.Rotatable = true;
|
||||||
this.TasView.RowCount = 0;
|
this.TasView.RowCount = 0;
|
||||||
this.TasView.ScrollSpeed = 1;
|
this.TasView.ScrollSpeed = 1;
|
||||||
this.TasView.SeekingCutoffInterval = 0;
|
this.TasView.SeekingCutoffInterval = 0;
|
||||||
|
|
|
@ -252,15 +252,16 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
SetColumnsFromCurrentStickies();
|
SetColumnsFromCurrentStickies();
|
||||||
|
|
||||||
RightClickMenu.Items.AddRange(TasView.GenerateContextMenuItems().ToArray());
|
if (TasView.Rotatable)
|
||||||
|
|
||||||
RightClickMenu.Items
|
|
||||||
.OfType<ToolStripMenuItem>()
|
|
||||||
.First(t => t.Name == "RotateMenuItem")
|
|
||||||
.Click += (o, ov) =>
|
|
||||||
{
|
{
|
||||||
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.InputPaintingMode = Settings.DrawInput;
|
||||||
TasView.ScrollSpeed = Settings.ScrollSpeed;
|
TasView.ScrollSpeed = Settings.ScrollSpeed;
|
||||||
|
|
Loading…
Reference in New Issue