BrendonButler / BrendonButler/entropy

[Feature] Implement UI element rendering for the game menu

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
engine enhancement
Dominant language
Java
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

### Description of the Feature

Start implementing a game menu for Entropy Game. As this feature is developed, reusable/default UI components--such as buttons, sliders, dropdowns, checkboxes, panels, text fields, etc.--that leverage the 2D orthographic renderer. These components will handle input (mouse, keyboard, gamepad), manage visual states (normal, hover, pressed, disabled), and expose a simple API for layout and styling. They should be mudlar enough to drop into any 2D or 3D game as the HUD/menu layer.

### Benefits of the Feature

- Accelerates menu, settings screen, and HUD creation without reinventing common controls
- Ensures consistent look-and-feel across all game UIs (2D and 3D) for games that don't implement their own custom elements
- Decouples UI logic from gameplay code, improving maintainability
- Leverages existing orthographic pipeline for efficient, batched draw calls
- Supports theming and localization via configurable style properties (configuration management will need to be implemented)
- Provides build-in state management (hover, active, disabled) out of the box
- Simplifies input handling by integrating with the engine's InputManager

### Additional Information

New package: net.sparkzz.entropy.ui

Components will use rendering.orthographic under the hood and rely on TextRenderer for labels
Layout strategies to consider: absolute, flow (horizontal/vertical), grid
Styles can be defined in JSON or programmatically via a `UIStyle` object

#### Related issues:
- #25 Implement 2D orthographic renderer
- #27 Build compositor and render pipeline manager
- #28 Implement text and font renderer
- #31 Implement Configuration Management System

#### Inspiration:
- Dear ImGui for API design (https://github.com/ocornut/imgui)
- CSS Flexbox/Grid for layout patterns

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.