-
-
Notifications
You must be signed in to change notification settings - Fork 328
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
Fix text scaling and font size issues in Level Editor #752
base: master
Are you sure you want to change the base?
Conversation
Fixes pokepetter#748 Update `LevelEditor` and `Help` classes to ensure consistent text scaling and font size adjustments. * **LevelEditor Class:** - Add `ui_scale_factor` attribute for default scale. - Modify `origin_mode_menu` and `local_global_menu` to scale with `ui_scale_factor`. - Update `update_text_scale` function to scale text entities in button groups. - Adjust `editor_camera` position scaling. - Scale `gizmo`, `gizmo_toggler`, and `quick_grabber` with `ui_scale_factor`. - Scale `inspector` and `help` with `ui_scale_factor`. - Scale `point_renderer` model thickness. - Scale `cubes` in `render_selection`. - Scale `ui` in `on_enable` and `on_disable` methods. - Adjust `entity_list_text` and `selected_renderer` scale. - Update `text_field` scale in `InspectorButton`. * **Help Class:** - Modify `tooltip` scale to 1 for noticeable text size changes. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/pokepetter/ursina/issues/748?shareId=XXXX-XXXX-XXXX-XXXX).
Hi @pokepetter, I’ve been working on addressing the issue described in #748 and made some modifications to
Current Progress:
Let me know if you’d like me to share the updated Thanks, |
What about if instead of every UI element having it's own scale factor, the UI scaler stores a single scale value and scales all the elements? I think that would be cleaner. |
Hi @pokepetter, Thank you for your feedback! While I agree that a single global UI scaler would simplify the implementation, I believe it might be very challenging to use in this case. The reason is that the scaling values for each of the components being scaled are different from each other, as they depend on the specific requirements of the individual elements. Could you share your thoughts or insights on how this could be approached effectively while maintaining flexibility for components with varying scale factors? Additionally, I’m struggling to address the issue of combining text scaling with the scaling of UI elements (like buttons) in a way that avoids text overlapping or misalignment. Do you have any recommendations on how to manage this effectively? Looking forward to hearing your thoughts! Best regards, |
Fixes #748
Update
LevelEditor
andHelp
classes to ensure consistent text scaling and font size adjustments.LevelEditor Class:
ui_scale_factor
attribute for default scale.origin_mode_menu
andlocal_global_menu
to scale withui_scale_factor
.update_text_scale
function to scale text entities in button groups.editor_camera
position scaling.gizmo
,gizmo_toggler
, andquick_grabber
withui_scale_factor
.inspector
andhelp
withui_scale_factor
.point_renderer
model thickness.cubes
inrender_selection
.ui
inon_enable
andon_disable
methods.entity_list_text
andselected_renderer
scale.text_field
scale inInspectorButton
.Help Class:
tooltip
scale to 1 for noticeable text size changes.For more details, open the Copilot Workspace session.