From 88d1d81363b6da89d7b2108871443e267e64bc8a Mon Sep 17 00:00:00 2001 From: Moose <124457076+AntlerForce@users.noreply.github.com> Date: Sun, 12 May 2024 00:17:37 -0700 Subject: [PATCH] Prevent key buttons from overlapping the close button --- LuaMenu/widgets/gui_keys_panel.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/LuaMenu/widgets/gui_keys_panel.lua b/LuaMenu/widgets/gui_keys_panel.lua index ddfcfa328..e3ed7d012 100644 --- a/LuaMenu/widgets/gui_keys_panel.lua +++ b/LuaMenu/widgets/gui_keys_panel.lua @@ -67,6 +67,18 @@ local function InitializeControls() local offsetX = 20 local imgBtns = {} + + local buttonsHolder = Control:New { + x = 0, + y = 0, + right = 100, + bottom = 0, + name = "buttonsHolder", + parent = keysWindow, + padding = {0, 0, 0, 0}, + children = {} + } + for i, img in ipairs(images) do imgBtns[imgCaptions[i]] = Button:New { x = offsetX, @@ -76,7 +88,7 @@ local function InitializeControls() caption = imgCaptions[i], objectOverrideFont = WG.Chobby.Configuration:GetFont(2), classname = "negative_button", - parent = keysWindow, + parent = buttonsHolder, backgroundColor = {0.8, 0.8, 1, 0.4}, OnClick = { function()