I'm happy to hear this library has helped you make progress on your project. If you run into any issues or have any suggestions to help improve the library, feel free to reach out and let me know.yintercept wrote: ↑Sat May 18, 2019 6:59 pm Jackalope just wanted to say thanks for this fantastic little library.
I tried Nuklear and despite my damndest, everything compiled, but it just didn't run for me. No error. No UI. Think I needed to run with '--fused' or something, but anyway. Tried slab, got it working first try. Your documentation is great too.
Your library has been a big help getting my tile editor to up and running quickly.
Thank you man.
Slab - An Immediate Mode GUI Library In Lua
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Heads up the docs for the menu/menubar component just redirect to the main wiki.
I can figure it out from the api source anyhow, but others might have trouble.
I take it is there or it's just not documented yet?
I can figure it out from the api source anyhow, but others might have trouble.
I take it is there or it's just not documented yet?
Last edited by yintercept on Mon May 20, 2019 4:41 pm, edited 1 time in total.
Back in the saddle again.
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Thanks for pointing that out. The link was pointing to an invalid page. The Menus page should be accessible now.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Cool, thanks Jack.
I'm literally implementing a menubar *today*. You fixed that fast. It's just 'new scene' and 'export' menu options, woopdeedoo, but Slab actually makes implementing small things like this enjoyable again. Thanks.
I'm literally implementing a menubar *today*. You fixed that fast. It's just 'new scene' and 'export' menu options, woopdeedoo, but Slab actually makes implementing small things like this enjoyable again. Thanks.
Back in the saddle again.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Slab - An Immediate Mode GUI Library In Lua
I added an OnHover option to the text, window, tree, and button elements.
I've only used Git a few times, should I do a pull request or something?
I've only used Git a few times, should I do a pull request or something?
Back in the saddle again.
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Yeah, go ahead and do a pull request.
Also, there is a function that already detects if a control is hovered after the control is declared. Slab.IsControlHovered will cover all controls that are supported by Slab.
Also, there is a function that already detects if a control is hovered after the control is declared. Slab.IsControlHovered will cover all controls that are supported by Slab.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Pardon, I currently have my head keyboard stuck to my forehead.
Added OnHover as one of the options in any case, calls whatever function is passed in when the element detects a hover.
But if Slab.IsControlHovered already exists is the additional option really worth doing a PR for?
Added OnHover as one of the options in any case, calls whatever function is passed in when the element detects a hover.
But if Slab.IsControlHovered already exists is the additional option really worth doing a PR for?
Last edited by yintercept on Sat May 25, 2019 9:19 pm, edited 1 time in total.
Back in the saddle again.
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Yeah, I would hold off on the PR for now and use the IsControlHovered function. It allows you to keep the standard behavior of controls while also allowing hover detection with that function.
- yintercept
- Citizen
- Posts: 64
- Joined: Mon Apr 02, 2018 3:31 pm
Re: Slab - An Immediate Mode GUI Library In Lua
I encountered the following problem..
xdelta, ydelta = slab.GetMouseDelta()
slab.Text(v.name)
if slab.IsControlClicked()
print "ydelta: " .. ydelta -- ydelta is ALWAYS 0
end
Don't know whats going on, if it's on my end, or if it's a bug or maybe it's something to do with scope?
I tried printing it before and after slab.Text, and before and after slab.IsControlClicked, it's only 0 inside the if statement.
xdelta, ydelta = slab.GetMouseDelta()
slab.Text(v.name)
if slab.IsControlClicked()
print "ydelta: " .. ydelta -- ydelta is ALWAYS 0
end
Don't know whats going on, if it's on my end, or if it's a bug or maybe it's something to do with scope?
I tried printing it before and after slab.Text, and before and after slab.IsControlClicked, it's only 0 inside the if statement.
Back in the saddle again.
- Bunnybacon
- Prole
- Posts: 20
- Joined: Fri Mar 25, 2016 8:42 am
Re: Slab - An Immediate Mode GUI Library In Lua
Hey!
Really excited about this lib!
Any easy way to know whether a click is inside or outside the UI layer?
Thanks!
Really excited about this lib!
Any easy way to know whether a click is inside or outside the UI layer?
Thanks!
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests