| CoshUI is a UI engine that's built to wrap around different game frameworks and easily slot into existing game loops. It is backend-agnostic, meaning the same UI code runs across different frameworks and graphics bindings with minor visual discrepancies. The current supported backends are Pygame, Raylib, PyOpenGL, and ModernGL, switching backends is a one parameter change (PygameBackend(screen) to RaylibBackend() and etc.) the UI code stays identical. To note, CoshUI technically acts like an immediate-mode UI library, but it takes a page out of React's book and reconciles state per frame, which lets it function like a retained-mode system. Its features include:
- An API that uses context managers for the "declarative" feel
- A built-in interaction system through "signals"
- An animation system through tweens
- Custom and pre-made themes
- Styling Nodes as you want
- and more CoshUI is a project I've been working on for a little less than 2 months, I started it by wanting to research UI systems for another lower-level project I'm working on that eventually grew too big in idea that I just had to publish it. I would love feedback on not just the code, but also the API design, which was the main reason for this "research". Reminder that this project is extremely young, I'm a self taught solo developer making all of this (the project and the documentation) in my free time before freshman year of college. There's a lot I probably missed, better and cleaner ways in doing things, and many features that could elevate the project. But it's ultimately learning material, and I would be grateful if you guys gave some thoughts on it. Repository: https://gitlab.com/jylefv/CoshUI (Primary) https://github.com/JyleFV/CoshUI (Mirror) Documentation: https://terrarizer03.github.io/coshui-docs (there are unfinished pages) Installation: [pip install coshui] |