Nevu-UI V0.8.0 - NevuCobject V2, Panel, Switch, Performance
This update focuses on performance optimizations, memory footprint reduction, animation extensions, and core Cython refactoring!
Big Changes:
- Refactored: Redesigned
NevuCobjectarchitecture to V2, introducing major performance and structural updates:- Conditional Event/Update Execution: Added direct check flags to execute heavy draw, logic, and update routines only when overridden or explicitly flagged, significantly reducing overhead per object.
- Standardized State & System Hooks: Moved internal input and hover handling and transition groups entirely to optimized Cython methods.
- Optimized Event Cycle: Implemented low-overhead
_core_event_cycleand_core_event_cycle_clearfor lightning-fast internal event routing
- Added:
InitializedWindowsubclass to support direct embedding into external window contexts:- Implemented static factory methods
from_raylib,from_pygame,from_sdlto easily hook the Nevu-UI lifecycle onto pre-existing, externally initialized display and renderer contexts. - Allows wrapping native pygame displays, Pygame SDL2 renderers, or raylib contexts without letting Nevu-UI initialize the window from scratch, enabling cleaner integration with third-party window managers.
- Standardized internal context bindings, window resizing handlers, and rendering pipeline adaptation for these pre-existing targets.
- Implemented static factory methods
- Added:
Switchwidget supporting smooth dragging, transition animations. (only works correctly on raylib framework, pygame fix will be soon maybe) - Added:
Panellayout extendingGridfor background widget rendering and slotted components. - Refactored:
NvVector2internally rewritten to use a raw c-structnv_vector2_t, resulting in a performance speedup for vector calculations - Refactored:
Display- all of the renderers have been standardized to almost identical API
- Renamed:
DisplayBase->WindowRendererBaseDisplaySdl->WindowRendererSdlDisplayRayLib->WindowRendererRaylibDisplayClassic->WindowRendererPygame
- Optimized: Redesigned
ZSystemcollision logic! Replaced heavy NumPy where-queries with direct memory views to drastically reduce garbage collection overhead and memory allocations in hot cycles. - Added:
static_runmode inManagerto run a heavily optimized main loop process. - Added: New Cython module
NvSpecificfor specific fucntions - Added: 10+ new transitions and ease curves to the animation library such as
spring,pulse,breathe,shake_easing,smoothstep, etc.. - Added:
AnimationQueueclass for sequential animation chaining.
Small - Medium Changes:
- Added: bg_variant param into
NevuObject - Added:
AnimatedGradientsupporting animated properties managed by an internal animation manager. - Optimized: Added
__slots__to animations and various utility classes:NevuEvent,PygameMouse,RaylibMouse,Timeto optimize memory footprint. - Refactored: Cleaned up outdated widgets to single-line exceptions.
- Refactored: Simplified character classification in
InputTypeby introducing a centralized_Lettersclass. - Cleaned: Modernized imports and standardized module exposures inside
__init__.py. - Fixed:
Menubug with layout incorect layout position before first resize.
Full Changelog: v0.7.6...v0.8.0