Skip to content

Releases: flamendless/Slab

Slab v0.9.0

19 Dec 02:30
Compare
Choose a tag to compare

Announcement

@coding-jackalope stepped down and passed to @flamendless the maintenance of this wonderful library. I am grateful for the opportunity of handling this repository and I want to thank everyone who uses this repo, from contributors to those who submit issues or requests. Please continue supporting and making this the best LOVE UI library out there.


This release adds new features as well as addressing issues reported since the last release. Below is a list of highlighted changes made since the last release. Thanks to the many contributions from the community which have been merged in as well. For a more detailed list of changes, refer to the commit history.

P.S. Since this is a transition to new maintainer, most of the changes are fixing issues.

New Slab Logo

slab

Minimize Window Button

slab_window_toolbar.mp4

Changes

  • [Window] Added showing of minimize/maximize button in windows bar. Improves #100
  • [Stats] Added GetStats and CalculateStats. See fixed #91
  • [Dialog] MessageBox expands if there are multiple buttons. Fixed #99
  • Cache not updating correctly when Image object is passed. Fixed #98
  • Added Slab logo
  • Allow horizontal scrolling when there is no vertical scrolling possible. Fixed #87
  • ContextMenu now works with void space again. Fixed #96
  • Dock now follows Window's options for W and H #92
  • Allow to programatically set a window to dock #92
  • [Input] Added NeedDrag option to InputNumberSlider
  • [Button] Added VLines option for multiline button label #81
  • Fixed BeginTree not returning IsOpen flag correctly #90
  • TransformPointToSlab (@idbrii)
  • Improved Properties to use ordered table (#93)
  • [Mouse] Read mouse arguments out of Args table (@idbrii)

Slab v0.8.0

06 Aug 18:16
Compare
Choose a tag to compare

This release adds new features as well as addressing issues reported since the last release. Below is a list of highlighted changes made since the last release. Thanks to the many contributions from the community which have been merged in as well. For a more detailed list of changes, refer to the commit history.

Custom Mouse Cursor

The mouse cursor can now be changed to use an image instead of the system default cursors. This is done through the SetCustomMouseCursor function. The ClearCustomMouseCursor function will clear the custom cursor and revert back to using the system mouse cursor. By passing nil to SetCustomMouseCursor, the cursor can be hidden.

Directory Navigation Breadcrumbs

slab_file_dialog_breadcrumbs

The file dialog has clickable navigation at the top of the dialog. Each component of the path can now be navigated to by clicking on the label.

PushID/PopID

This allows developers to set custom IDs for controls. This is useful for label controls, which uses the text as the ID, but if similar labels exist, the PushID/PopID functionality will allow for differentiation.

Changes

  • [Mouse] Allow customizing screen to slab transforms. (#80)(@idbrii)
  • [Slider] Support drawing as a bar or handle. (#79)(@idbrii)
  • Convert all Input verification to simpler style. (#78)(@idbrii)
  • [SlabTest] Pass nil for missing arg Step. (#77)(@idbrii)
  • [Tree] Render triangles as images instead of a polygon.
  • [API] Allow calls to 'Draw' if 'Update' has not been called. This is useful for developers running a custom love.run function which utilizes fixed updates. (#74)
  • [Separator] Slab.Separator() have wrong position in layout. (#73)
  • [Window] Added 'ConstrainPosition' option. This keeps the moving window's position constrained to the Love viewport. (#72)
  • [Input] Enable key repeat when control is focused. Disable when focus is lost. (#65)
  • Fix Window ResetLayout not resetting Size. (#67)(@Dude112113)
  • Added image with rect overlay option. (#70)(#71)(@flamendless)
  • Fix FFI undefined symbol stat64 by falling back to syscall. (#62)(@Matthew-Allen)
  • Fixed OnMouseMoved not calling MouseMovedFn. (#66)(@Dude112113)
  • [Menu] 'BeginMenu' and 'ContextMenuWindow' missing top rounded corners. (#63)
  • [ColorPicker] Optional alpha value passing and return value use int instead of string. (#69)(@flamendless)
  • [CheckBox] Added 'Disabled' option to disable user interaction with this widget.
  • [Window] Vertical alignment support with titles within the title bar. Title frame editable height.
  • [Window] Title alignment (left, center, right).

Slab v0.7.2

24 Nov 05:18
Compare
Choose a tag to compare

This release provides fixes that have been found since the last release. Some progress has been made for mobile support as a few fixes are included. For a more detailed list of changes, refer to the commit history.

Changes

  • [Keyboard] Fixed issue with keyboard callbacks not being invoked (#59).
  • [DrawCommands] Changed assertion to clamp width and height to a positive number (#58).
  • [Region] Always render scroll bars on mobile platforms.
  • [Window] Fix for adjusting the window position to match mouse location when tearing from dock (#60).
  • [Input] Fixed issue with soft keyboard not visible while editing an input control.

Slab v0.7.1

02 Nov 05:46
Compare
Choose a tag to compare

This release provides fixes that have been found since the last release. Some of these fixes required a refactor such as the input system. Below is a list of highlighted changes made since the last release. Some of the fixes have also come from the community and is much appreciated. For a more detailed list of changes, refer to the commit history.

Input

Mouse and Keyboard input are now handled asynchronously using the love provided callbacks. The system will process the events and forward the events to any developer defined functions. No changes need to be made from the developer.

Changes

  • Add Options and Fallback arguments to Properties (#40)(@idbrii)
  • [Dialog] Clear the focused Input control when opening a dialog. This will allow the cached text to be cleared if developer desires to do so. (#54)
  • [Menu] Fixed an issue where opening a context menu in between controls on the same line caused cursor issues. (#56)
  • [Image] Fixed an issue with scale not being applied to window bounds when specifying sub coordinates. (#52)
  • Allow ContextMenuItem to be opened on left click (#55)(@antoniotorresm)
  • [Window] Adjust region size to fit within the window. This will show the scrollbar if the window extends beyond the display. (#49)
  • [Dialog] Added option to include parent directory entry in File Dialog when retrieving directories is enabled. (#53)
  • [Mouse] State is now updated asynchronously. (#48)
  • [Menu] Added 'Options' parameter to 'BeginMenu', 'MenuItem', and 'MenuItemChecked'. 'Enabled' flag added to allow menus and menu items to be disabled. (#47)
  • [API] Added 'NoDocks' option to 'Initialize' function to disable docking. (#45)
  • Allow to title file dialogs via Title field. (#51)(@LaineZ)
  • [API] Fence call to 'Initialize'. This ensures this function is called only once. Fence calls to 'Update' and 'Draw'. This prevents these functions to be called multiple times in a single loop. (#44)
  • Add support for ReturnOnText to sliders. (#43)(@elemel)
  • Fixed Fix missing Step argument to InputNumberDrag. (#39)(@idbrii)
  • [Input] Fixed issue with InputNumberDrag being too sensitive for small ranges. (#38)

Slab v0.7.0

23 Jul 22:15
Compare
Choose a tag to compare

This release adds new features such as the docking system and addresses some issues reported since the last release. Changes have been made to better ensure interoperability between Slab and other libraries such as Push. Below is a list of highlighted changes made since the last release. Some of the fixes have also come from the community and is much appreciated. For a more detailed list of changes, refer to the commit history.

Docks

Slab now offers the ability for windows to be docked to a specific side of the viewport. Docked windows can be resized based on their dock position and can be undocked when the window is dragged from their position. More information can be found on the wiki page.

Dock_Example

Sliders

Numeric input controls now support drag and slider behavior. By default, numeric input controls allows the user to click and drag the control to alter the value. The slider input control will display the position of the value based on the min and max values specified. More information can be found on the wiki page.

Input_Drag

Input_Slider

Tree Table Ids

Trees have been modified so that tables can be used as Ids and not just strings. These tables will be kept as weak references internally and when garbage collected, will free up the cached entry. This will help to keep the number of cached entries to a minimum internally for systems that potentially use a large number of entries such as entities in a game engine. For now, this system is only used for trees but if no issues come up with these changes, could be extended to other Slab controls in future updates. More information can be found on the wiki page.

Shaders

Slab now offers support for applying shader effects to controls through a stack managed internally. Slab doesn't manage any shaders internally and should be handled by the user.

Shader_Example

Changes

  • [Filesystem] Converted IsDirectory and Exists function to use FFI and native platform calls.
  • [FileDialog] Double-clicking on file item entries to shortcut selection.
  • [FileDialog] Hide file items in directory selection window (@Rinkaa).
  • [API] Fixed issue with Slab working with the Push library (#20).
  • [Text] Support URL links.
  • [SlabTest] Remove redundant text (#29) (@idbrii).
  • [ColorPicker] Set initial position.
  • [Separator] Option to change the line thickness.
  • [Window] Fixes and improvements (#31) (#33) (@sdleffler).
  • [SlabDebug] Style fixes (@giovifav).

Slab v0.6.4

25 May 00:00
Compare
Choose a tag to compare

This release addresses some issues found within the last release as well as some feature requests. Below is a list of some important changes made. For a more detailed list of changes, refer to the commit history.

Changes

  • [Window] BeginWindow now returns the open state of the window to help in simplifying API calls and provides an alternative to managing window open state. (#16)
  • [Cursor] Added functionality to indent/unindent the anchored cursor X position. (#17)
  • [ListBox] Fixed an issue with elements being selectable outside the visible region. (#19)
  • [Save State] Implemented feature request to save UI state to disk and load from disk on initialize. (#18)
  • [Debug] Added SetVerbose function to toggle Slab logging to diagnose internal issues.

Slab v0.6.3

14 Apr 00:55
Compare
Choose a tag to compare

This release addresses some issues found within the last release as well as some long standing ones. Below is a list of some important changes made. For a more detailed list of changes, refer to the commit history.

Changes

  • [Tree] Fix for issue where sibling tree items were not properly aligned when a prior sibling is open. (#11)
  • [Tooltip] Support for multi-line tooltips. (#15)
  • [Window] Support for displaying a close button on windows, similar to behavior found in Dear ImGui. (#13)
  • [Region] Exposed functions to allow setting/retrieving of wheel scroll speed. Added a scroll section to SlabTest that demonstrates the usage of these functions. (#7)
  • [API] Fixed issue with IsControlHovered function not accounting for window obstruction.
  • [Optimization] Merge branch 'flamendless/optimization' into v0.6.3. This merge contains optimizations for standard library calls found in most modules. Thanks to @flamendless for the work. (#14)
  • [FileSystem] Fixed an issue with incorrect dirent struct layout used for Linux operating systems.
  • [Dialog] Moved message box handling to Dialog namespace. FileDialog function depends on this.

Slab v0.6.2

29 Mar 23:42
Compare
Choose a tag to compare

This is a small release and contains changes to how Slab retrieves directory items along with some minor fixes. The change uses FFI now instead of making system calls which could be a security issue. Thanks to pgimeno and zorg on the Love2D forums for finding this issue and providing suggestions. The FFI code is based on two libraries:

For a more detailed list of changes, refer to the commit history.

Slab v0.6.1

05 Sep 00:03
Compare
Choose a tag to compare

This is a hot fix release to fix a major issue with mouse wheel locking up user input in certain regions. This is the only fix going into this release. For a more detailed list of changes, refer to the commit history.

Slab v0.6.0

13 Aug 06:17
Compare
Choose a tag to compare

This release adds API functions to allow how controls are organized within a window. Slab now offers users the ability to add project specific stats and can be quickly viewed through the Slab Debug module. The Slab Test module can act as a good reference point for the API. For more information on the update, refer to the wiki page: https://github.com/coding-jackalope/Slab/wiki.
For a more detailed list of changes, refer to the commit history.

Layout

The layout API allows for controls to be grouped together and aligned to a specific position based on the window. These controls can be aligned to the left, the center, or the right part of a window horizontally. They can also be aligned to the top, the center, or the bottom vertically in a window. Multiple controls can be declared on the same line and the API will properly align the controls on the same line.

Layout_Align

Stats

The Slab API offers functions that track the performance of desired sections of code. With these functions coupled together with the debug performance window, end-users will be able to see bottlenecks located within their code base quickly. To display the performance window, call the SlabDebug.Performance function.

Stats_Overview

Fonts

Fonts can be pushed to a stack to alter the rendering of any text. All controls will use this pushed font until the font is popped from the stack, using the last pushed font or the default font. Below is an example of font being pushed to the stack to render a single text control and then being popped before the next text control.

SlabTest_Fonts