An open API service indexing awesome lists of open source software.

https://github.com/zalanwastaken/guified

Guified is a GUI library for Lร–VE (Love2D) that simplifies window management and UI element creation. It allows developers to create interactive graphical user interfaces with ease.
https://github.com/zalanwastaken/guified

lib love2d love2d-gui love2d-gui-library love2d-library rapid-prototyping

Last synced: 19 days ago
JSON representation

Guified is a GUI library for Lร–VE (Love2D) that simplifies window management and UI element creation. It allows developers to create interactive graphical user interfaces with ease.

Awesome Lists containing this project

README

        

```
_______ __ __ ___ _______ ___ _______ ______ _______ _______ _______ _______ ___ ____
| || | | || | | || | | || | | _ || || || _ | | | | |
| ___|| | | || | | ___|| | | ___|| _ | | |_| || ___||_ _|| |_| | |___| |_ |
| | __ | |_| || | | |___ | | | |___ | | | | | || |___ | | | | ___ | |
| || || || | | ___|| | | ___|| |_| | | _ | | ___| | | | | | | | |
| |_| || || | | | | | | |___ | | | |_| || |___ | | | _ | |___| _| |
|_______||_______||___| |___| |___| |_______||______| |_______||_______| |___| |__| |__| |____|

```
###### The 3000+ lines of code so you only have to write 100

Guified is a ~~lightweight~~ GUI library for Lร–VE (Love2D) that simplifies window management and UI element creation. With its easy-to-use features, Guified enables developers to craft intuitive and interactive graphical user interfaces without unnecessary complexity. ๐Ÿš€ Whether you're building a small game or a large application, Guified provides the tools you need to streamline the process.

## Features โœจ
- **Window Management:**
- ๐Ÿ“Œ Set the game window to always stay on top of other windows, ensuring your application remains in focus during critical interactions.
- **UI Element Support:**
- ๐Ÿ”˜ Create fully customizable buttons that detect clicks and allow for versatile user interactions.
- ๐Ÿ–๏ธ Design text boxes to display and update text dynamically at specified positions on the screen.
- ๐ŸŽจ Create flexible and colorful frames to visually group UI elements and improve layout design.
- **And More**
- **Dynamic Drawing and Updating:**
- โ™ป๏ธ Easily register UI elements to be dynamically drawn and updated, ensuring real-time responsiveness.
- โ–ถ๏ธ Easily toggle the drawing and updating of elements on or off during runtime for better control.
- **Extensible Registry:**
- ๐Ÿชง Extend the library by adding custom UI elements through the registry, making it adaptable to your specific needs.
- Make custom elements and easily register them using the registry :-
```lua
local element = {
name = "name" -- required
draw = function() -- required
end
update = function(dt) -- optional
end
keypressed = function(key) -- optional
end
textinput = function(key) -- optional
end
}
guified.registry.register(element)
```
- **Color Management:**
- ๐ŸŸจ Assign dynamic colors to UI elements with support for both RGB and alpha transparency values, enabling rich visual customizations.
- ๐Ÿ”น Adjust and experiment with colors seamlessly to enhance the visual appeal of your project.
- **Error Handling:**
- โŒ Provides detailed error messages for missing elements or invalid window handles, reducing debugging time.
- Custom error handler implimented by Guified.
- **Version Information:**
- ๐Ÿ”ข Built-in version tracking ensures you're always aware of the library's iteration and improvements.
- **๐Ÿ˜Š Choose what you need(TESTING BUILD):**
- โŒ Simply remove the files whose features you dont use gufied will adapt.
- Eg. Dont use modules ? ```rm -rf modules/```. Dont use FFI features ? ```rm -rf os_interop.lua```.
- **๐Ÿซต Guified adapts to you**
- Dont wanna use registry ? Use elements with love2d functions :-
```lua
local element -- your element
function love.update(dt)
element.update()
end
function love.draw()
element.draw()
end
```
- **๐Ÿ“œ Debug**
- Guified comes pre-packaged with a [logger](https://github.com/Nykenik24/love2d-tools) making debugging easy.
- **๐Ÿ”ซ No Dependency hunting**
- Guified come pre-packaged with its dependencies so no dependency hunting. More time you can spend coding !
- **๐Ÿงฉ Modules**
- Guified comes with many modules. Making it easy to create things like frames, tweens.
- Only load what you need. Guified wont make you load all the modules only load what you need
```lua
local module = require("guified.modules.modulename")
```
- **๐Ÿคท Not satisfied ?**
- Guified is still in beta so there is still more to come along

## Setup
### 1) Clone the repo.
```bash
git clone https://github.com/zalanwastaken/guified.git guified
cd guified
```
### 2) Copy guified to your project folder
```bash
cp -r guified
```
### 3) Include guified in main.lua of your project
```lua
local guified = require()
```
### 4) Setup ENV variable(Optional but highly recommended if you want to use modules)
```bash
export GUIFIEDROOTFOLDER=
```
### Done! โœจ Enjoy creating with Guified! ๐Ÿ˜Ž

## Latest Guified version
Latest Guified version is currently B-1.0.0 "Existential Crisis Edition". This brings a lot to the table the most important being stability.

This version supports the following Love2d version(These versions are tested with Guifed other versions might also run Guified fine):-
- 11.5 (Mysterious Mysteries)
- Windows โœ… Full support
- Linux โœ… Without FFI
- MacOS โŒ No support. Bugs on MacOS wont be fixed(Guified might still run MacOS is not blocked)
- 11.4 (Mysterious Mysteries)
- Windows โœ… Full support
- Linux โœ… Without FFI
- MacOS โŒ No support. Bugs on MacOS wont be fixed(Guified might still run MacOS is not blocked)

## ๐Ÿ“ Roadmap

### โœ… **Current Features**
โœ” **UI Elements:** Buttons, frames, text boxes, etc.
โœ” **Dynamic Registry System:** Easily register and manage UI components.
โœ” **Minimal Boilerplate:** Write less code, do more.
โœ” **Custom Error Handling:** No more cryptic errors.
โœ” **Debugging Tools:** Built-in logger for easy debugging.

### ๐Ÿš€ **Planned Features**
๐Ÿ”น **State Management (like React useState, but for Lร–VE)**
๐Ÿ”น **Scene Management (UI "sets" to switch views easily)**
๐Ÿ”น **Callback System for UI Events**
๐Ÿ”น **Better Input Handling (keyboard, mouse, and maybe gamepad support?)**
๐Ÿ”น **Performance Optimizations & Code Cleanup**
๐Ÿ”น **More UI Components (Dropdowns, Sliders, etc.)**
๐Ÿ”น **Make a studio for LOVE2D using Guified**
๐Ÿ”น **Modular Design: Use only the features you need.**

### ๐Ÿ”ฎ **Future Goals**
โœจ Make Guified the **go-to UI framework for Lร–VE**(TRY)

โœจ Provide **seamless integration** with other Lร–VE libraries(NOT CONFIRM)

โœจ Support **legacy Lร–VE versions for no reason at all**

### ๐ŸŽฏ **Side Quests (Ongoing Tasks)**
๐Ÿ”ธ Ensure removing unused modules doesnโ€™t break everything.

๐Ÿ”ธ Maintain FFI compatibility (or at least try to).

๐Ÿ”ธ Improve documentation so new users donโ€™t suffer.

๐Ÿ”ธ Test Guified on different Lร–VE versions (including ancient ones for no reason).

๐Ÿ”ธ Find and fix the weirdest possible edge cases.

## Notes
1. โš™๏ธ Encountered bugs? Report them to help speed up development and improve the library for everyone.
2. ๐Ÿ”ข Check out the examples folder to quickly familiarize yourself with Guified's capabilities and jumpstart your project.
3. โš  **Currently, there are no plans to support MacOS.**
4. โ„ **Features that use FFI are not supported on Linux due to FFI features using os dependent code**