Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI element text alignment #812

Open
maluoi opened this issue Dec 19, 2023 · 0 comments
Open

UI element text alignment #812

maluoi opened this issue Dec 19, 2023 · 0 comments
Labels
ui An issue related to StereoKit's built-in UI system.

Comments

@maluoi
Copy link
Collaborator

maluoi commented Dec 19, 2023

Describe the feature

Currently, UI.Button always center-aligns text. For auto-width buttons this is reasonable, since there's no extra room for an explicit alignment to be useful. But for explicitly sized elements, the fact that text is center-aligned can become obvious, and this raises the need for explicit control.

To resolve this, any explicitly sized UI element with text should have a text alignment and text fit parameter. In this case, the parameters can be appended to the end of the existing function's list and provided with default values. The same can likely be done in C#.

In particular, these functions:

ui_label_sz
ui_label_sz_16
ui_button_sz
ui_button_sz_16
ui_button_at
ui_button_at_16
ui_button_img_sz
ui_button_img_sz_16
ui_button_img_at
ui_button_img_at_16
ui_toggle_sz
ui_toggle_sz_16
ui_toggle_at
ui_toggle_at_16
ui_toggle_img_sz
ui_toggle_img_sz_16
ui_toggle_img_at
ui_toggle_img_at_16
@maluoi maluoi added the ui An issue related to StereoKit's built-in UI system. label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui An issue related to StereoKit's built-in UI system.
Projects
None yet
Development

No branches or pull requests

1 participant