Skip to content

Commit

Permalink
[Dialog] MessageBox expands if there are multiple buttons. Fixed regr…
Browse files Browse the repository at this point in the history
…ession #99
  • Loading branch information
flamendless committed Sep 18, 2021
1 parent 3f75b86 commit b544e66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Internal/UI/Button.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function Button.Begin(Label, Options)
Cursor.SetItemBounds(X, Y, W, H)
Cursor.AdvanceY(H)

-- Window.AddItem(X, Y, W, H, Id)
Window.AddItem(X, Y, W, H, Id)

Stats.End(StatHandle)

Expand Down
5 changes: 3 additions & 2 deletions Internal/UI/LayoutManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ local function AddControl(Instance, W, H, Type)
end
end

Cursor.SetX(WinX + X)
Cursor.SetY(WinY + Y)
local Border = Window.GetBorder()
Cursor.SetX(WinX + X - Border)
Cursor.SetY(WinY + Y - Border)

if H < RowH then
if Instance.AlignRowY == 'center' then
Expand Down

0 comments on commit b544e66

Please sign in to comment.