-
Notifications
You must be signed in to change notification settings - Fork 414
Add some hotkeys for markers, and display them in tool tips. #4377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like adding an event to Config
. What if HandleHotkeyUpdate
was a virtual method on ToolFormBase
and you called it on all open tools at the end of this method?
BizHawk/src/BizHawk.Client.EmuHawk/MainForm.Events.cs
Lines 750 to 758 in adf8e38
private void HotkeysMenuItem_Click(object sender, EventArgs e) | |
{ | |
using var hotkeyConfig = new HotkeyConfig(Config); | |
if (!this.ShowDialogWithTempMute(hotkeyConfig).IsOk()) return; | |
AddOnScreenMessage("Hotkey settings saved"); | |
InitControls(); | |
InputManager.SyncControls(Emulator, MovieSession, Config); | |
} |
I think that would work, but what is wrong with using an event? Personally I think more things in BizHawk should be events. I don't like adding methods to base classes or interfaces just for them to be implemented in only a single class. |
It's applicable to other tools too. (If it was just for TAStudio, why set up multicast?) |
A virtual method on all tools that most tools don't use (though I don't actually know how many would actually benefit from this particular one) also adds overhead. I'll switch the implementation. |
I haven't checked the code but conceptually this PR makes sense. The only difference from the current workflow is that we're adding markers on selected frames using the menu, and to arbitrary frames using double-click. So these hotkeys are kinda unique in functionality by adding it on emulated frame instead. But I don't mind having options for all 3 methods of adding them. |
There is already a button for adding a marker on the emulated frame, but not for removing on the emulated frame. |
Yeah no need for extra stuff for now. |
Hotkeys:
Add marker (default M): Adds a marker to the emulated frame, same as the add marker button under the markers list.
Delete marker (default Ctrl+M): Deletes a marker on the emulated frame
Seek to prev/next marker (default Shift+PageUp/Down): Already existed, they are just now configurable.
Check if completed: