Here's the example from the Slab Readme, just with a main menu bar:
local Slab = require "Slab"
function love.load(args)
Slab.Initialize(args)
end
function love.update(dt)
Slab.Update(dt)
if Slab.BeginMainMenuBar() then
Slab.EndMainMenuBar()
end
Slab.BeginWindow("MyFirstWindow",{Title = "My First Window"})
Slab.Text("Hello World")
Slab.EndWindow()
end
function love.draw()
Slab.Draw()
end
The window can be dragged anywhere on screen before, but with the addition of the menu, its y coordinate snaps back when you stop dragging.
Workaround: moving the menu configuration to the end of function.
Here's the example from the Slab Readme, just with a main menu bar:
The window can be dragged anywhere on screen before, but with the addition of the menu, its y coordinate snaps back when you stop dragging.
Workaround: moving the menu configuration to the end of function.