Thank you for this library, coding.jackalope!
Here's a bug report regarding short mouse clicks. Slab doesn't register most of the clicks I do with my trackpad.
If a mouse click is very short, which means that the interval between "mouse button is pressed down" and "mouse button is released" is somewhere less than 16.66 ms (if Löve is running at 60 FPS), then Slab doesn't recognize the mouse click. This is easy to reproduce when using a trackpad, if the trackpad is configured to register a click when the user lightly taps the trackpad. When testing with macOS and an Apple trackpad, I get clicks that are only about 0,000005 seconds long, as measured by love.timer.getTime() with the callback functions love.mousepressed() and love.mousepressed().
Currently Slab only queries the state of the mouse buttons with love.mouse.isDown() on every update, and if the button was pressed and released between two updates, no click is registered. I think Slab needs to utilize the callback functions love.mousepressed() and love.mousereleased() to track whether a click happened since the last update.
Slab - An Immediate Mode GUI Library In Lua
-
- Prole
- Posts: 17
- Joined: Sun Jun 30, 2019 5:38 pm
Re: Slab - An Immediate Mode GUI Library In Lua
You may check out my today workaround from my fork: https://github.com/pirogronian/Slab , branch MouseEvents. To not messing too much in original code, I introduced separate API:ki wrote: ↑Wed Aug 19, 2020 2:58 pm Here's a bug report regarding short mouse clicks. Slab doesn't register most of the clicks I do with my trackpad.
If a mouse click is very short, which means that the interval between "mouse button is pressed down" and "mouse button is released" is somewhere less than 16.66 ms (if Löve is running at 60 FPS), then Slab doesn't recognize the mouse click. This is easy to reproduce when using a trackpad, if the trackpad is configured to register a click when the user lightly taps the trackpad. When testing with macOS and an Apple trackpad, I get clicks that are only about 0,000005 seconds long, as measured by love.timer.getTime() with the callback functions love.mousepressed() and love.mousepressed().
Currently Slab only queries the state of the mouse buttons with love.mouse.isDown() on every update, and if the button was pressed and released between two updates, no click is registered. I think Slab needs to utilize the callback functions love.mousepressed() and love.mousereleased() to track whether a click happened since the last update.
Code: Select all
WasMousePressed(button, times)
WasMouseReleased(button, times)
WasControlPressed(button, times)
WasControlReleased(button, times)
Of course, You must provide appropriate events to Slab, for example:
Code: Select all
function love.mousepressed(x, y, button, istouch, times)
Slab.MousePressed(x, y, button, istouch, times)
end
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Hi ki, good to hear this library is helpful to your project. I am adding this issue to be fixed for the upcoming patch release.
Thanks for the suggestion pirogronian. Your solution is very similar to what I had planned for the fix and could get around needing developers to forward the mouse and keyboard calls to Slab.pirogronian wrote: ↑Thu Aug 20, 2020 8:49 am You may check out my today workaround from my fork: https://github.com/pirogronian/Slab , branch MouseEvents. To not messing too much in original code, I introduced separate API:
Re: Slab - An Immediate Mode GUI Library In Lua
Сan you show an example of creation node graph with slab?
like this
https://github.com/thedmd/imgui-node-editor
thanks.
like this
https://github.com/thedmd/imgui-node-editor
thanks.
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Slab v0.7.1
Hello everyone. There is a new patch release for Slab. This release provides fixes that have been found since the last release. Some of these fixes required a refactor such as the input system, which now processes input events asynchronously through the Love defined events. Please visit the releases page linked above for more information on the changes made for this release.
Hello everyone. There is a new patch release for Slab. This release provides fixes that have been found since the last release. Some of these fixes required a refactor such as the input system, which now processes input events asynchronously through the Love defined events. Please visit the releases page linked above for more information on the changes made for this release.
Hi borr, I saw that you posted this question to the project Github and it has been answered there.borr wrote: ↑Sun Oct 11, 2020 9:24 am Сan you show an example of creation node graph with slab?
like this
https://github.com/thedmd/imgui-node-editor
thanks.
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Slab v0.7.2
Hello everyone. There is a new patch release for Slab. This release provides fixes that have been found since the last release. Some progress has been made for mobile support as a few fixes on those platforms are included. Please visit the releases page linked above for more information on the changes made for this release.
Hello everyone. There is a new patch release for Slab. This release provides fixes that have been found since the last release. Some progress has been made for mobile support as a few fixes on those platforms are included. Please visit the releases page linked above for more information on the changes made for this release.
Re: Slab - An Immediate Mode GUI Library In Lua
I've been procrastinating about building a GUI for my latest project due to LOVE2D forcing 'controls' to be written from scratch but now that I've discovered this I think I'm good to go!!!
I looked through the GITHUB and saw options/radio buttons but I couldn't find a checkbox. Is that included? If I'm clever enough (and I'm probably not!) then I can perhaps suggest some coding for that maybe.
This is great stuff and sorely needed.
I looked through the GITHUB and saw options/radio buttons but I couldn't find a checkbox. Is that included? If I'm clever enough (and I'm probably not!) then I can perhaps suggest some coding for that maybe.
This is great stuff and sorely needed.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
-
- Prole
- Posts: 29
- Joined: Sun Feb 24, 2019 6:30 pm
Re: Slab - An Immediate Mode GUI Library In Lua
Thanks for the kind words! Glad to hear this project is helping out with yours.
Slab does support check boxes. The documentation for them can be found here.
Slab does support check boxes. The documentation for them can be found here.
Re: Slab - An Immediate Mode GUI Library In Lua
This would have been crazy hard to do in vanilla Love2D so I'm TOTALLY loving what has happened here.
https://cdn.discordapp.com/attachments/ ... nknown.png
This is my gridiron roster with player attributes colour coded in table format. Very nice. And I'll have even more examples soon enough.
https://cdn.discordapp.com/attachments/ ... nknown.png
This is my gridiron roster with player attributes colour coded in table format. Very nice. And I'll have even more examples soon enough.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Idle gridiron. Set team orders then idle and watch: https://togfox.itch.io/idle-gridiron
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest