pd-ui7: Improve Container/Menu Centering API #1

Open
opened 2025-02-28 11:41:51 +01:00 by tobid7 · 0 comments
Owner

Problem Description

Currently, creating UIs with centered objects is heavily hard-coded. This makes UI development more difficult and can lead to visual glitches.

Proposed Solution

  • Introduce parent containers that store position and size data.
  • These containers should handle centering or left-/right-alignment of their child objects.
  • After aligning the inner objects, the entire container should then be positioned on the screen.

Alternative Approach for Simple Cases

For simple cases, centering could be done by:

  • Calculating the maximum width within a given set of joined objects.
  • However, for more complex scenarios, a more efficient method is needed.

Next Steps

  • Implement parent containers for alignment.
  • Ensure UI7::Menu::JoinAlign correctly calculates the maximum width of the object set.
## **Problem Description** Currently, creating UIs with centered objects is heavily hard-coded. This makes UI development more difficult and can lead to visual glitches. ## **Proposed Solution** - Introduce **parent containers** that store position and size data. - These containers should handle **centering** or **left-/right-alignment** of their child objects. - After aligning the inner objects, the **entire container** should then be positioned on the screen. ### **Alternative Approach for Simple Cases** For simple cases, centering could be done by: - Calculating the **maximum width** within a given set of joined objects. - However, for more **complex scenarios**, a more efficient method is needed. ## **Next Steps** - Implement parent containers for alignment. - Ensure **`UI7::Menu::JoinAlign`** correctly calculates the maximum width of the object set.
tobid7 added the
Kind/Enhancement
Priority
High
labels 2025-02-28 11:41:51 +01:00
tobid7 self-assigned this 2025-02-28 11:41:51 +01:00
tobid7 added the
Compat/Breaking
label 2025-02-28 13:13:41 +01:00
tobid7 changed reference from rewrite to development 2025-03-06 08:37:30 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: tobid7/palladium#1
No description provided.