From 70538adfac47cc1d075bb943b8397dcf5537d912 Mon Sep 17 00:00:00 2001 From: Suuper Date: Sat, 25 Jul 2015 03:33:23 -0500 Subject: [PATCH] -Follow Cursor settings are now saved. --- .../tools/TAStudio/TAStudio.MenuItems.cs | 10 +++++----- BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs index 86fc9a36b2..701b1e1c36 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.MenuItems.cs @@ -815,27 +815,27 @@ namespace BizHawk.Client.EmuHawk private void alwaysScrollToolStripMenuItem_Click(object sender, EventArgs e) { - TasView.AlwaysScroll = alwaysScrollToolStripMenuItem.Checked; + TasView.AlwaysScroll = Settings.FollowCursorAlwaysScroll = alwaysScrollToolStripMenuItem.Checked; } private void scrollToViewToolStripMenuItem_Click(object sender, EventArgs e) { - TasView.ScrollMethod = "near"; + TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "near"; } private void scrollToTopToolStripMenuItem_Click(object sender, EventArgs e) { - TasView.ScrollMethod = "top"; + TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "top"; } private void scrollToBottomToolStripMenuItem_Click(object sender, EventArgs e) { - TasView.ScrollMethod = "bottom"; + TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "bottom"; } private void scrollToCenterToolStripMenuItem_Click(object sender, EventArgs e) { - TasView.ScrollMethod = "center"; + TasView.ScrollMethod = Settings.FollowCursorScrollMethod = "center"; } private void followCursorToolStripMenuItem_DropDownOpened(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 152b540ba3..47d71c995b 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -56,6 +56,8 @@ namespace BizHawk.Client.EmuHawk public bool FollowCursor { get; set; } public bool EmptyMarkers { get; set; } public int ScrollSpeed { get; set; } + public bool FollowCursorAlwaysScroll { get; set; } + public string FollowCursorScrollMethod { get; set; } } public TasMovie CurrentTasMovie @@ -153,6 +155,9 @@ namespace BizHawk.Client.EmuHawk if (Settings.ScrollSpeed == 0) Settings.ScrollSpeed = 1; // Default to 1, not 0. TODO: Surely there's a better way? TasView.ScrollSpeed = Settings.ScrollSpeed; + TasView.AlwaysScroll = Settings.FollowCursorAlwaysScroll; + if (!string.IsNullOrEmpty(Settings.FollowCursorScrollMethod)) // Better default here too? + TasView.ScrollMethod = Settings.FollowCursorScrollMethod; RefreshDialog(); _initialized = true;