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

Gui optimization #28

Merged
merged 42 commits into from
Feb 24, 2025
Merged

Gui optimization #28

merged 42 commits into from
Feb 24, 2025

Conversation

dancazarin
Copy link
Contributor

❗ indicates a breaking change.

Added

  • Support for viewport-relative units (vw/vh/vmax/vmin)
  • ❗ Buffered GUI mode has been introduced. The GUI is rendered to an offscreen texture, tracking the updated rectangles each frame. The texture is then blitted to the screen, significantly improving performance in cases where GUI updates are infrequent. This mode can be switched off for a specific window or globally.
  • Lucide icons have been updated to latest version.
  • Ability to override ItemList visible property.
  • WidgetTree can now be used without a GUIWindow and InputQueue.
  • New algorithm for shadow rendering by Evan Wallace.

Changed

  • ❗ A new implementation of widget clipping has been introduced. Widget painting can now be clipped to the parent's bounds, the parent's clip rectangle, or the widget's own bounds.
  • DialogComponent::result is now a Property instead of a plain field.
    Use result.get() to retrieve the boolean value or rely on implicit conversion.
    The same applies to the value, prompt, text, and icon fields in derived dialogs.
  • buttonColor has been renamed to mainColor.
  • ❗ The layoutOptions property of the Text widget has been renamed to textOptions, and the LayoutOptions type is now TextOptions.
  • ❗ The createWindow function should now be overridden instead of makeWindow to use a custom window class for the component.
  • ❗ A new isHintVisible property controls whether the widget's hint is visible.
  • ❗ The description property has been removed in favor of the hint property.
  • ❗ New font size default (12 pixels).
  • ❗ The reflection static field is now used to store field information (previously Reflection).
  • ❗ Style variables (e.g., selectedColor) are now indexed by string hash instead of a linear index, making it easier to create custom variables.
  • ComboBox and PopupBox mouse interaction fixes.
  • ImplicitContext is now convertible to bool.
  • The descender value of Lucide icons has been adjusted to improve their alignment within text.
  • The Knob and Slider colors can be changed by assigning the selectedColor style variable. Hover and pressed styles are preserved.
  • Showcase app updated.
  • The ReflectionOf utility class has been introduced to provide reflection information for external types.
  • Performance optimizations.
  • New WrapAnywhere flag in TextOptions.

Fixed

  • Numerous fixes and improvements
  • _SCRIPTS_DIR is now cached in CMakeCache.txt, resolving issues when Brisk is included using add_subdirectory.
  • Rectangle::empty has been fixed to return true for {INT_MAX, INT_MAX, INT_MIN, INT_MIN}.
  • BackStrikedText now uses opacity for painting.
  • Fixed contrast ratio calculation, ensuring that light text color is preferred on certain backgrounds.

@dancazarin dancazarin merged commit cfd65d9 into main Feb 24, 2025
35 checks passed
@dancazarin dancazarin deleted the gui-optimization branch February 27, 2025 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant