Skip to content

Commit

Permalink
Merge pull request #679 from AntlerForce/caribou
Browse files Browse the repository at this point in the history
Prevent key buttons from overlapping the close button
  • Loading branch information
AntlerForce authored May 12, 2024
2 parents 3af25f5 + 88d1d81 commit d61c0a2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion LuaMenu/widgets/gui_keys_panel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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()
Expand Down

0 comments on commit d61c0a2

Please sign in to comment.