Skip to content

Commit f3847c8

Browse files
committed
Toggle Stay on Top hotkey
1 parent ca8bf2f commit f3847c8

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/BizHawk.Client.Common/config/Binding.cs

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ void Bind(string tabGroup, string displayName, string defaultBinding = "", strin
6767
Bind("General", "Toggle Display Nothing");
6868
Bind("General", "Accept Background Input");
6969
Bind("General", "Capture Mouse", "WMouse M");
70+
Bind("General", "Toggle Stay on Top");
7071

7172
Bind("Save States", "Save State 1", "Shift+F1");
7273
Bind("Save States", "Save State 2", "Shift+F2");

src/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs

+3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ void SelectAndLoadFromSlot(int slot)
152152
case "Capture Mouse":
153153
ToggleCaptureMouse();
154154
break;
155+
case "Toggle Stay on Top":
156+
ToggleStayOnTop();
157+
break;
155158

156159
// Save States
157160
case "Save State 1":

src/BizHawk.Client.EmuHawk/MainForm.cs

+6
Original file line numberDiff line numberDiff line change
@@ -2868,6 +2868,12 @@ private void ToggleCaptureMouse()
28682868
AddOnScreenMessage($"Capture Mouse {(Config.CaptureMouse ? "enabled" : "disabled")}");
28692869
}
28702870

2871+
private void ToggleStayOnTop()
2872+
{
2873+
TopMost = Config.MainFormStayOnTop = !Config.MainFormStayOnTop;
2874+
AddOnScreenMessage($"Stay on Top {(Config.MainFormStayOnTop ? "enabled" : "disabled")}");
2875+
}
2876+
28712877
private void VsyncMessage()
28722878
{
28732879
AddOnScreenMessage($"Display Vsync set to {(Config.VSync ? "on" : "off")}");

0 commit comments

Comments
 (0)