-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to programmatically set a window to a dock position? Also make docked window unremovable there #92
Comments
Same question here. I need this too. |
@chicogamedev just implemented this in commit c77087d sample usage would be: Slab.BeginWindow("test", {Title = "test"})
Slab.WindowToDoc("Left")
Slab.EndWindow() For now users are to handle when they want to remove the window to the dock by using boolean flag to control whether to call Let me know if there's an issue with this. I may have missed out on some. |
Awesome ! I'll try it out. But is there a way to preset the size (Width) of the docked window ? Or will it adapt on the W of the window? Thanks |
@chicogamedev this is fixed now. Sample usage would be: local flag = false
local flag2 = false
local flag3 = false
function love.update(dt)
Slab.Update(dt)
-- SlabTest.Begin()
Slab.BeginWindow("test", {
Title = "test",
W = 320,
})
if not flag then
Slab.WindowToDock("Left")
flag = true
end
Slab.EndWindow()
Slab.BeginWindow("test2", {
Title = "test2",
W = 160,
})
if not flag2 then
Slab.WindowToDock("Right")
flag2 = true
end
Slab.EndWindow()
Slab.BeginWindow("test3", {
Title = "test3",
H = 120
})
if not flag3 then
Slab.WindowToDock("Bottom")
flag3 = true
end
Slab.EndWindow()
end Right now ( i have to think more how to make it so that the flags are stored internally in Slab's side) |
No description provided.
The text was updated successfully, but these errors were encountered: