From b5122cd56122bb53267cc21f5742514292e8a0f9 Mon Sep 17 00:00:00 2001 From: Azumgi <4zumgi@gmail.com> Date: Mon, 15 Apr 2019 15:25:05 +0300 Subject: [PATCH] [Mod Options] Prevent binding LMB for Mod Options view toggling --- vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua b/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua index 086a9c8..9257d3f 100644 --- a/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua +++ b/vmf/scripts/mods/vmf/modules/ui/options/vmf_options_view.lua @@ -3362,6 +3362,11 @@ VMFOptionsView.callback_setting_keybind = function (self, widget_content) widget_content.first_pressed_button_index = nil widget_content.first_pressed_button_type = nil + -- Fix accidental LMB binding for Mod Options view toggling. + if widget_content.setting_id == "open_vmf_options" and #widget_content.keys == 1 and widget_content.keys[1] == "mouse left" then + widget_content.keys = {} + end + set_new_keybind(widget_content) self:callback_change_setting_keybind_state(widget_content)