Skip to content

Commit 52ceedb

Browse files
actually fixed keybinds now, added new check for window minimizing
1 parent 8012e40 commit 52ceedb

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

Addons/InterfaceManager.luau

-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ local InterfaceManager = {} do
117117
Title = "Minimize Bind",
118118
Default = Settings.MenuKeybind,
119119
ChangedCallback = function(Value)
120-
print(Settings.MenuKeybind, Value, typeof(Settings.MenuKeybind), typeof(Value))
121120
Settings.MenuKeybind = Value
122121
InterfaceManager:SaveSettings()
123122
end

Example.client.luau

+7-1
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,13 @@ InterfaceSection:Toggle("TransparentToggle", {
353353
end
354354
})
355355

356-
InterfaceSection:Keybind("MenuKeybind", { Title = "Minimize Bind", Default = Main.MinimizeKey or Enum.KeyCode.RightShift})
356+
InterfaceSection:Keybind("MenuKeybind", {
357+
Title = "Minimize Bind",
358+
Default = Main.MinimizeKey or Enum.KeyCode.RightShift,
359+
ChangedCallback = function(Value)
360+
Main.MinimizeKey = Value
361+
end
362+
})
357363
Main.MinimizeKeybind = Main.Options.MenuKeybind
358364

359365
Window:SelectTab(1)

src/Components/Window.luau

+3-3
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ return function(Config)
368368
and Library.MinimizeKeybind.Type == "Keybind"
369369
and not UserInputService:GetFocusedTextBox()
370370
then
371-
if Input.KeyCode.Name == Library.MinimizeKeybind.Value then
371+
if Input.KeyCode.Name == Library.MinimizeKeybind.Value or Input.KeyCode.Name == Library.MinimizeKeybind.Value.Name then
372372
Window:Minimize()
373373
end
374374
elseif (Input.KeyCode == Library.MinimizeKey or Input.KeyCode.Name == Library.MinimizeKey) and not UserInputService:GetFocusedTextBox() then
@@ -377,7 +377,7 @@ return function(Config)
377377
end)
378378

379379
Creator.AddSignal(Window.HideButton.MouseButton1Click, function()
380-
Library.CreatedWindow:Minimize()
380+
Window:Minimize()
381381
end)
382382

383383
Creator.AddSignal(Window.HideButton.InputBegan, function(Input)
@@ -405,7 +405,7 @@ return function(Config)
405405

406406
if UserInputService.TouchEnabled then
407407
Creator.AddSignal(Window.HideButton.TouchTap, function()
408-
Library.CreatedWindow:Minimize()
408+
Window:Minimize()
409409
end)
410410
end
411411

src/Elements/Keybind.luau

+1
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ function Element:New(Idx, Config)
108108
Keybind.Mode = Mode
109109

110110
KeybindDisplayLabel.Text = Library.Utilities:Prettify(Keybind.Value)
111+
111112
Library:SafeCallback(Keybind.ChangedCallback, Key)
112113
Library:SafeCallback(Keybind.Changed, Key)
113114
end

0 commit comments

Comments
 (0)