Slab - An Immediate Mode GUI Library In Lua

Showcase your libraries, tools and other projects that help your fellow love users.
coding.jackalope
Prole
Posts: 17
Joined: Sun Feb 24, 2019 6:30 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by coding.jackalope » Sun May 19, 2019 5:33 pm

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.
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.

User avatar
yintercept
Citizen
Posts: 61
Joined: Mon Apr 02, 2018 3:31 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by yintercept » Sun May 19, 2019 9:02 pm

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?
Last edited by yintercept on Mon May 20, 2019 4:41 pm, edited 1 time in total.
Apparently I'm a fan of most people.

Or maybe LOVE devs are just that good.

coding.jackalope
Prole
Posts: 17
Joined: Sun Feb 24, 2019 6:30 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by coding.jackalope » Mon May 20, 2019 2:15 am

Thanks for pointing that out. The link was pointing to an invalid page. The Menus page should be accessible now.

User avatar
yintercept
Citizen
Posts: 61
Joined: Mon Apr 02, 2018 3:31 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by yintercept » Mon May 20, 2019 4:43 pm

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.
Apparently I'm a fan of most people.

Or maybe LOVE devs are just that good.

User avatar
yintercept
Citizen
Posts: 61
Joined: Mon Apr 02, 2018 3:31 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by yintercept » Fri May 24, 2019 2:51 pm

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?
Apparently I'm a fan of most people.

Or maybe LOVE devs are just that good.

coding.jackalope
Prole
Posts: 17
Joined: Sun Feb 24, 2019 6:30 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by coding.jackalope » Sat May 25, 2019 5:37 pm

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.

User avatar
yintercept
Citizen
Posts: 61
Joined: Mon Apr 02, 2018 3:31 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by yintercept » Sat May 25, 2019 6:31 pm

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?
Last edited by yintercept on Sat May 25, 2019 9:19 pm, edited 1 time in total.
Apparently I'm a fan of most people.

Or maybe LOVE devs are just that good.

coding.jackalope
Prole
Posts: 17
Joined: Sun Feb 24, 2019 6:30 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by coding.jackalope » Sat May 25, 2019 8:33 pm

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.

User avatar
yintercept
Citizen
Posts: 61
Joined: Mon Apr 02, 2018 3:31 pm

Re: Slab - An Immediate Mode GUI Library In Lua

Post by yintercept » Fri May 31, 2019 11:09 pm

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.
Apparently I'm a fan of most people.

Or maybe LOVE devs are just that good.

User avatar
Bunnybacon
Prole
Posts: 18
Joined: Fri Mar 25, 2016 8:42 am

Re: Slab - An Immediate Mode GUI Library In Lua

Post by Bunnybacon » Mon Jun 03, 2019 8:43 pm

Hey!

Really excited about this lib!

Any easy way to know whether a click is inside or outside the UI layer?

Thanks!

Post Reply

Who is online

Users browsing this forum: nasty and 8 guests