Releases: mikke89/RmlUi
RmlUi 6.0
RmlUi 6.0 comes with some of the most visible changes so far, being the biggest release to date. It has taken its time, and I am very happy to finally release it into the wild! The release brings a good selection of smaller and larger goodies for everyone. I want to particularly emphasize three major changes:
- Advanced rendering effects
- Major layout engine improvements
- CMake modernization
The advanced rendering effects include support for the box-shadow
, filter
, backdrop-filter
, and mask-image
properties from CSS. We also have support for all the CSS gradients, which can be used in our decorator system and as image masks. With these features you should have the tools to really make those elements pop. These additions also include more subtle but important changes, like making elements with border radius actually clip to the curved border. This has been a large undertaking, I started this work over two years ago, and it has been steadily (and sometimes not so steadily) worked on since then, with a lot of iterations on the implementation and API. Feedback from users during this process has been invaluable! I am quite happy with the end result, and it's nice to see this work finally being released.
For now, only the OpenGL 3 renderer has built-in support for the new effects. The other backends have been updated for the new API, but only support the old feature set. To support all of these features, the render interface needed a thorough update. At the same time, we took this opportunity to simplify and modernize the interface. So please be sure to check the breaking changes if you are upgrading with a custom render interface. We have made sure to make the new advanced effects optional, so you can start with the basics and opt-in to new functions incrementally as you want to expand your supported RCSS feature set.
The layout engine improvements are the very opposite of the advanced effects, they are hidden underneath in the library, not really visible to the end user. Nonetheless, this has been another massive undertaking. The inline layout part of the engine has been rewritten from scratch, and other large parts have been re-architectured. This change improves a lot of subtle layout issues, in the end over a hundred CSS tests have been fixed, and many long standing issues resolved. It also creates a foundation which will make it a lot easier to make changes and fix issues in the future. You can see some screenshots and comparisons to web browsers in the detailed release notes below. This change was in fact merged into master over a year ago. In this case, I am quite pleased that there has not been a lot of reports about it. I take that as an indication that your projects kept working pretty much the same, despite the massive changes underneath. Do expect some layout changes when upgrading from the previous release though, details and solutions are posted below.
Our CMake implementation really used to be a patch-work with an ancient foundation. It was time for a complete rewrite. Special thanks to @hobyst who initiated and layed the groundwork for the new implementation following modern guidelines. It should now be a lot easier to build the library and link to it. This does however involve changes to pretty much all options, targets, and executable names, so be sure to check the detailed release notes below to migrate your existing project.
I want to give a sincere thanks to all the contributors, and everyone active in the community. A lot of effort has been put into the library from a lot of people. Many of the changes in this release come directly from you, and your feedback helps improve the quality of the library. It has almost been a bit hard for me to keep up with everything and to respond as fast as I'd like. But I also need to give myself some breathers from time to time, and contribute with the amount I can.
In addition to all the contributors mentioned in the release notes below, I also want to give a special mention to contributors to the documentation: @ShawnCZek, @viseztrance, @Paril, @LucidSigma, and @slipher. No feature is complete without good documentation, so I appreciate all the help I can get here!
Finally, I want to give a thanks to everyone who contributed with pull requests that in the end didn't end up being merged. Even if they weren't merged, they bring valuable discussion and ideas: @CreatorInDeep, @blaisemccourtney, @JailbreakPapa, @skaarj1989, and @exjam.
I am very much looking forward to seeing what you build with this, have fun! Feel free to share your results with us, either on the gitter chat or in the discussions.
The detailed changelog follows below. Projects coming from previous releases should take a look at the breaking changes, which include tips for migration. The documentation is updated to reflect all the changes in this release.
RmlUi 6.0 Changelog
Table of contents. Turns out linked headers do not work in release notes, but I leave an unlinked version here for a quick overview.
- Advanced rendering features
- New features
- Screenshots
- Major overhaul of the render interface
- Backward compatible render interface adapter
- Render manager and resources
- Limitations
- Major layout engine improvements
- Detailed layout improvements
- Layout comparisons
- General layout improvements
- CMake modernization
- New target names
- New library filenames
- New option names
- New exported definitions
- CMake presets
- Spatial navigation
- Text shaping and font engine
- Elements
- Text input widget
- Utilities
- Data bindings
- Debugger plugin
- Lua plugin
- System interface
- General improvements
- General fixes
- Build improvements
- Backends
- Breaking changes
- CMake and linking
- Layout
- Elements
- Core types
- Core functions
- RCSS
- Render interface
- Render manager
- Font engine interface
- Removed deprecated functionality
Advanced rendering features
This one has been a long time in the making, now the time has come for one of the biggest additions to the library. Advanced rendering effects are now available, including filters with blur support, box-shadow, advanced gradients, shaders, masks, and clipping of rounded borders.
The original issue is found in #307 and the pull request is #594. Thanks to everyone who provided feedback. Resolves #249, #253, #307, #597, and even addresses #1.
New features
New properties:
filter
: Apply a rendering effect to the current element (including its children).- Supported filters:
blur
,drop-shadow
,hue-rotate
,brightness
,contrast
,grayscale
,invert
,opacity
,sepia
. That is, all filters supported in CSS.
- Supported filters:
backdrop-filter
: Apply a filter to anything that is rendered below the current element.mask-image
: Can be combined with any decorator, including images and gradients, to mask out any part of the current element (and its children) by multiplying their alpha channels.box-shadow
: With full support for offset, blur, spread, and insets.
New decorators:
shader
: A generic decorator to pass a string to your renderer.linear-gradient
,repeating-linear-gradient
radial-gradient
,repeating-radial-gradient
conic-gradient
,repeating-conic-gradient
The gradients support most of the CSS features and syntax, including angle and to <direction>
syntax for direction, multiple color stops, locations in length or percentage units, and up to two locations per color. Please see the decorators documentation for details.
-
The new rendering interface includes support for shaders, which enable the above decorators. Parsing is done in the library, but the backend renderer is the one implementing the actual shader code.
-
All filters and gradient decorators have full support for interpolation, that is, they can be animated. This is not yet implemented for box shadows.
-
Decorators can now take an extra keyword
<paint-area>
which is one ofborder-box | padding-box | content-box
. The keyword indicates which area of the element the decorator should apply to. All built-in decorators are modified to support this property. For example:decorator: linear-gradient(to top right, yellow, blue) border-box
. -
Custom filters can be created by users by deriving from
Filter
andFilterInstancer
, analogous to how custom decorators are created. -
Improved element clipping behavior. Handles more complicated cases, including nested transforms with hidden overflow, and clipping to the curved edge of elements with border-radius. This requires clip mask support in the renderer.
The documentation has been updated to reflect the new features, including the new decorators and properties, with examples and screenshots. The new features are also demonstrated in the new effects
sample, so please check that out.
For now, only the OpenGL 3 renderer implements all new rendering features. All other backends have been updated to work with the updated render interface but with their old feature set. For users with custom backends, please see the updated render interface documentation in particular. Here, you will also find a table detailing exactly which functions must be implemented to support particular RCSS features.
Here are some quick RCSS examples taken from the documentation.
decorator: linear-gradient(to bottom, #0...
RmlUi 5.1
In this part of the world, the snow has almost melted by now and birds have started finding places to nest, some of them just outside our door. I'm sure they are big fans of the library, and I interpret this as the strongest desire for a new release of the library. So here it is, RmlUi 5.1!
This is a smaller release, but there should be some nice bits here for everyone. Scrolling behavior has been significantly enhanced, now with support for both autoscroll mode (scrolling with middle mouse button), and smooth scrolling. Anyone writing desktop applications with RmlUi will be happy to see that the library now supports on-demand rendering, enabling reduced CPU usage while the application is idle. There are also several improvements to form elements, including a new text selection interface. The included backends have been improved, in particular the Vulkan renderer. You will also find stability and build improvements, check out all the details below!
Large parts of this release are based on user contributions. Thanks to all the pull requests and reported issues, we keep seeing new users contributing too, which is very exciting!
As always, the documentation has been updated with all the new changes. Special thanks in particular to everyone who has contributed directly to help improve the documentation, @Thalhammer, @ShawnCZek, @barotto, @ZombieRaccoon, and @xland.
Changelog
New scrolling features
Autoscroll mode
Autoscroll mode, or scrolling with the middle mouse button, is now featured in RmlUi. #422 #423 (thanks @igorsegallafa)
This mode is automatically enabled by the context whenever a middle mouse button press is detected, and there is an element to scroll under the mouse. There is also support for holding the middle mouse button to scroll.
When autoscroll mode is active, a cursor name is submitted to clients which indicates the state of the autoscroll, so that clients can display an appropriate cursor to the user. These cursor names all start with rmlui-scroll-
, and take priority over any active cursor
property. If desired, autoscroll mode can be disabled entirely by simply not submitting middle mouse button presses, or by using another button index when submitting the button to the context.
See the new documentation section on scrolling for details.
Smooth scrolling
Smooth scrolling is now supported in RmlUi, and enabled by default. This makes certain scroll actions animate smoothly towards its destination. Smooth scrolling may become active in the following situations:
- During a call to
Context::ProcessMouseWheel()
. - When clicking a scrollbar's arrow keys or track.
- When calling any of the
Element::Scroll...()
methods with theScrollBehavior::Smooth
enum value.
Smooth scrolling can be disabled or tweaked on the context, as described below.
Context interface
Smooth scrolling can be disabled, or tweaked, by calling the following method on a given context:
void Context::SetDefaultScrollBehavior(ScrollBehavior scroll_behavior, float speed_factor);
Here, smooth scrolling can be disabled by submitting the ScrollBehavior::Instant
enum value. The scrolling speed can also be tweaked by adjusting the speed factor.
The function signature of Context::ProcessMouseWheel
has been replaced with the following, to enable scrolling in both dimensions:
bool Context::ProcessMouseWheel(Vector2f wheel_delta, int key_modifier_state);
The old single axis version is still available for backward compatibility, but considered deprecated and may be removed in the future.
Element interface
Added
void Element::ScrollTo(Vector2f offset, ScrollBehavior behavior = ScrollBehavior::Instant);
which scrolls the element to the given coordinates, with the ability to use smooth scrolling. Similarly, Element::ScrollIntoView
has been updated with the ability to perform smooth scrolling (instant by default).
Scroll events
The mousescroll
event no longer performs scrolling on an element, and no longer requires a default action. Instead, the responsibility for mouse scrolling has been moved to the context and its scroll controller. However, the mousescroll
event is still submitted during a mouse wheel action, with the option to cancel the scroll by stopping its propagation. The event is now also submitted before initiating autoscroll mode, with the possibility to cancel it.
New RCSS features
- New
overscroll-behavior
property. An element's closest scrollable ancestor is decided by scroll chaining, which can be controlled using this property. Thecontain
value can be used to ensure that mouse wheel scrolling is not propagated outside a given element, regardless of whether its scrollbars are visible. - Added animation support for decorators. #421 (thanks @0suddenly0)
- Sibling selectors will now also match hidden elements.
On-demand rendering (power saving mode)
In games, the update and render loop normally run as fast as possible. However, in some applications it is desirable to reduce CPU usage and power consumption when the application is idle. RmlUi now provides the necessary utilities to achieve this. Implemented in #436 (thanks @Thalhammer), see also #331 #417 #430.
Users of RmlUi control their own update loop, however, this feature requires some support from the library side, because the application needs to know e.g. when animations are happening or when a text cursor should blink. In short, to implement this, users can now query the context for Context::GetNextUpdateDelay()
, which returns the time until the next update loop should be run again.
See the on-demand rendering documentation for details and examples.
Text selection interface
Added the ability to set or retrieve the text selection on text fields. #419
In particular, the following methods are now available on ElementFormControlInput
(<input>
elements) and ElementFormControlTextArea
(<textarea>
elements):
// Selects all text.
void Select();
// Selects the text in the given character range.
void SetSelectionRange(int selection_start, int selection_end);
// Retrieves the selection range and text.
void GetSelection(int* selection_start, int* selection_end, String* selected_text) const;
See the form controls documentation for details.
RML and form element improvements
- Add RML support for numeric character reference (Unicode escape sequences). #401 (thanks @Dakror)
- Make the
:checked
pseudo class active on the<select>
element whenever its options list is open, for better styling capabilities. - Fix max length in text input fields not always clamping the value, such as when pasting text.
- The slider input now only responds to the primary mouse button.
- The slider input is now only draggable from the track or bar, instead of the whole element.
- Fixed input elements not always being correctly setup when changing types.
Data bindings
- Add new data-alias attribute to make templates work with outside variables. #432 (thanks @Dakror)
- Add method to retrieve the
DataTypeRegister
during model construction. #412 #413 (thanks @LoneBoco) - Add ability to provide a separate data type register to use when constructing a new data model. Can be useful to provide a distinct type register for each shared library accessing the same context. Alternatively, allows different contexts to share a single type register. #409 (thanks @eugeneko)
Lua plugin
- Make the Lua plugin compatible with Lua 5.1+ and LuaJIT. #387 (thanks @mrianura)
- Updated to include the new text selection API. #434 #435 (thanks @ShawnCZek)
Backends
- Vulkan renderer: Fix various Vulkan issues on Linux. #430 (thanks @Thalhammer)
- GL3 renderer: Unbind the vertex array after use to avoid possible crash. #411
Stability improvements
Build improvements
- Improve CMake to better support RmlUi included as a subdirectory of a parent project. #394 #395 #397 (thanks @cathaysia)
- Fix possible name clashes causing build failures during argument-dependent lookup (ADL). #418 #420 (thanks @mwl4)
Built-in containers
Breaking changes
- Scrolling behavior changed, increased default mouse wheel scroll length, and enabled smooth scrolling by default. See notes above.
- The
mousescroll
event no longer scrolls an element. Itswheel_delta
parameter has been renamed towheel_delta_y
. - The signature of
Context::ProcessMouseWheel
has been changed, the old signature is still available but deprecated.
Path to RmlUi 6.0
This is intended to be the last release in the 5.x series. I'll start merging some larger changes into the master branch soon, expect some larger breaking changes along with that. Users who want stability should prefer to stay on this release.
There are many exciting upcoming features I'm looking forward to merging into the library. In particular, expect support for advanced filters and effects, including blur, gradients, box-shadow, and custom shaders. In addition, a big rewrite of the layout engine will ensure improved CSS conformance, and much better maintainab...
RmlUi 5.0
The release of RmlUi 5.0 brings several larger changes to the library. The main one being the backends concept, which will help integration for new users in particular, and ease the development for additional renderers and platforms. We have already added several new ones, such as a more modern OpenGL renderer, a Vulkan renderer, and the GLFW windowing library.
There should also be plenty of features and important fixes for both new and existing users to enjoy with this release. Some big ones include support for sibling (+
and ~
) and attribute ([foo]
) selectors in RCSS, a large overhaul of the text input widget, and ensuring that the hover state of elements is always updated even without any mouse movement.
I want to thank all the contributors for their pull requests, which help make this library better for everyone. We also have a number of new contributors, which is very nice to see. A special thanks goes to @barotto, @hobyst, and @shubin for helping to write the documentation, with pull requests on the documentation repository. I also got a lot of feedback from several users regarding the backends concept, in particular a detailed one from @jbatnozic, thank you to everyone!
The documentation has been updated to reflect all the new changes. I've also been working for some time now to improve the documentation navigation, in particular with a search function. I'm interested to hear feedback on how well this works.
With this release comes a refreshed logo as well! I hope you like it.
Changelog
Backends
RmlUi 5.0 introduces the backends concept. This is a complete refactoring of the old sample shell, replacing most of it with a multitude of backends. A backend is a combination of a renderer and a platform, and a light interface tying them together. The shell is now only used for common functions specific to the included samples.
This change is beneficial in several aspects:
- Makes it easier to integrate RmlUi, as users can directly use the renderer and platform suited for their setup.
- Makes it a lot easier to add new backends and maintain existing ones.
- Allows all the samples to run on any backend by choosing the desired backend during CMake configuration.
All samples and tests have been updated to work with the backends interface, which is a very light abstraction over all the different backends.
The following renderers and platforms are included:
- A new OpenGL 3 renderer. #261
- Including Emscripten support so RmlUi even runs in web browsers now.
- A new Vulkan renderer. #236 #328 #360 #385 (thanks @wh1t3lord)
- A new GLFW platform.
- The OpenGL 2 and SDL native renderers ported from the old samples.
- The Win32, X11, SFML, and SDL platforms ported from the old samples.
The old macOS shell has been removed as it used a legacy API that is no longer working on modern Apple devices. Now the samples build again on macOS using one of the windowing libraries such as GLFW or SDL.
See the Backends section in the readme for all the combinations of renderers and platforms, and more details. The backend used for running the samples can be selected by setting the CMake option SAMPLES_BACKEND
to any of the supported backends.
RCSS selectors
- Implemented the next-sibling
+
and subsequent-sibling~
combinators. - Implemented attribute selectors
[foo]
,[foo=bar]
,[foo~=bar]
,[foo|=bar]
,[foo^=bar]
,[foo$=bar]
,[foo*=bar]
. #240 (thanks @aquawicket) - Implemented the negation pseudo class
:not()
, including support for selector listsE:not(s1, s2, ...)
. - Refactored structural pseudo classes for improved performance.
- Selectors will no longer match any text elements, like in CSS.
- Selectors now correctly consider all paths toward the root, not just the first greedy path.
- Structural selectors are no longer affected by the element's display property, like in CSS.
RCSS properties
max-width
andmax-height
properties now support thenone
keyword.
Text editing
The <textarea>
and <input type="text">
elements have been improved in several aspects.
- Improved cursor navigation between words (Ctrl + Left/Right).
- Selection is now expanded to highlight selected newlines.
- When word-wrap is enabled, words can now be broken to avoid overflow.
- Fixed several issues where the text cursor would be offset from the text editing operations. In particular after word wrapping, or when suppressed characters were present in the text field's value. #313
- Fixed an issue where Windows newline endings (\r\n) would produce an excessive space character.
- Fixed operation of page up/down numpad keys being swapped.
- The input method editor (IME) is now positioned at the caret during text editing on the Windows backend. #303 #305 (thanks @xland)
- Fix slow input handling especially with CJK input on the Win32 backend. #311
- Improve performance on document load and during text editing.
Elements
- Extend the functionality of
Element::ScrollIntoView
. #353 (thanks @eugeneko) <img>
element: Fix wrong dp-scaling being applied when an image is cloned through a parent element. #310<handle>
element: Fix move targets changing size when placed using thetop
/right
/bottom
/left
properties.
Data binding
- Transform functions can now be called using C-like calling conventions, in addition to the previous pipe-syntax. Thus, the data expression
3.625 | format(2)
can now be identically expressed asformat(3.625, 2)
. - Handle null pointers when trying to access data variables. #377 (thanks @Dakror)
- Enable registering a custom data variable definition. #367 (thanks @Dakror)
Context input
- The hover state of any elements under the mouse will now automatically be updated during
Context::Update()
. #220 - Added
Context::ProcessMouseLeave()
which ensures that the hovered state is removed from all elements and stops the context update from automatically hovering elements. - When
Context::ProcessMouseMove()
is called next the context update will start updating hover states again. - Added support for mouse leave events on all backends.
Layout improvements
- Scroll and slider elements now use containing block's height instead of width to calculate height-relative values. #314 #321 (thanks @nimble0)
- Generate warnings when directly nesting flexboxes and other unsupported elements in a top-level formatting context. #320
- In some situations, changing the
top
/right
/bottom
/left
properties may affect the element's size. These situations are now correctly handled so that the layout is updated when needed.
Lua plugin
- Add
QuerySelector
andQuerySelectorAll
to the Lua Element API. #329 (thanks @Dakror) - Add input-related methods and
dp_ratio
to the Lua Context API. #381 #386 (thanks @shubin) - Lua objects representing C++ pointers now compare equal if they point to the same object. #330 (thanks @Dakror)
- Add length to proxy for element children. #315 (thanks @nimble0)
- Fix a crash in the Lua plugin during garbage collection. #340 (thanks @slipher)
Debugger plugin
- Show a more descriptive name for children in the element info window.
- Fixed a crash when the debugger plugin was shutdown manually. #322 #323 (thanks @LoneBoco)
SVG plugin
- Update texture when the
src
attribute changes. #361
General improvements
- Small performance improvement when generating font effects.
- Allow empty values in decorators and font-effects.
- RCSS located within document
<style>
tags can now take comments containing xml tags. #341 - Improve in-source function documentation. #334 (thanks @hobyst)
- Invader sample: Rename event listener and instancer for clarity.
General fixes
- Font textures are no longer being regenerated when encountering new ascii characters, fixes a recent regression.
- Logging a message without an installed system interface will now be written to cout instead of crashing the application.
- Fix several static analyzer warnings and one possible case of undefined behavior.
- SDL renderer: Fix images with no alpha channel not rendering. #239
Build fixes
- Fix compilation on Emscripten CI. #335 (thanks @hobyst)
- Fix compilation with EASTL. #350 (thanks @eugeneko)
Breaking changes
- Changed the signature of the keyboard activation in the system interface, it now passes the caret position and line height:
SystemInterface::ActivateKeyboard(Rml::Vector2f caret_position, float line_height)
. - Mouse and hover behavior may change in some situations as a result of the hover state automatically being updated on
Context::Update()
, even if the mouse is not moved. See above changes to context input. - Removed the boolean result returned from
Rml::Debugger::Shutdown()
. - RCSS selectors will no longer match text elements.
- RCSS structural pseudo selectors are no longer affected by the element's display property.
- Data binding: The signature of transform functions has been changed from
Variant& first_argument_and_result, const VariantList& other_arguments -> bool success
toconst VariantList& arguments -> Variant result
.
New Contributors
RmlUi 4.4
Summer is approaching and I figured it's time for a new release! There are several improvements throughout the library, most notably to the font engine. You might also see some performance improvements when loading or interacting with a document, especially if you use a lot of RCSS style rules with class names. These are now just as fast to lookup as IDs and tags.
Much of this work has been done through contributions from users, and I'd like to thank all of you! In particular I've noticed that there are several new contributors this release, welcome and keep up the good work!
Fonts
- Support for color emojis 🎉. #267
- Support for loading fonts with multiple included font weights. #296 (thanks @MexUK)
- The
font-weight
property now supports numeric values. #296 (thanks @MexUK) - The
opacity
property is now also applied to font effects. #270
Performance and resource management
- Substantial performance improvement when looking up style rules with class names. Fixes some cases of low performance, see #293.
- Reduced memory usage, more than halved the size of
ComputedValues
. - Added
Rml::ReleaseFontResources
to release unused font textures, cached glyph data, and related resources. - Release memory pools on
Rml::Shutdown
, or manually through the core API. #263 #265 (thanks @jack9267)
Layout
- Fix offsets of relatively positioned elements with percentage positioning. #262
select
element: Fix clipping on select box.
Data binding
- Add
DataModelHandle::DirtyAllVariables()
to mark all variables in the data model as dirty. #289 (thanks @EhWhoAmI)
Cloning
- Fix classes not always copied over to a cloned element. #264
- Drag clones are now positioned correctly when their ancestors use transforms. #269
- Drag clones no longer inherit backgrounds and decoration from the cloned element's document body.
Samples and plugins
- New sample for integration with SDL2's native renderer. #252 (thanks @1bsyl)
- Add
width
andheight
attributes to the<svg>
element. #283 (thanks @EhWhoAmI)
Build improvements
- CMake: Mark RmlCore dependencies as private. #274 (thanks @jonesmz)
- CMake: Allow
lunasvg
library be found when located in builtin tree. #282 (thanks @EhWhoAmI)
Breaking changes
FontEngineInterface::GenerateString
now takes an additional argument,opacity
.- Computed values are now retrieved by function calls instead of member objects.
Path to RmlUi 5.0
There are some exciting developments toward RmlUi 5.0 happening already, please see the RmlUi 5.0 development and feedback post for more details. I'd love to hear your feedback. I intend to start merging these changes to master soon. There might be some breaking changes coming up but I don't expect anything major. Of course I'll keep documenting any breaking changes.
Screenshots
RmlUi 4.3
Time for a new release now that we are approaching the end of the year. This release comes with a widely requested feature, flexbox support! This feature has been in the works for a few months now, hope it comes handy when designing your layouts. In addition, we have many smaller improvements and bug fixes for some quality-of-life enhancements.
Again we have several contributions from the community helping out with pull requests. Special thanks to all of you, and keep up the good work!
Flexbox layout
Support for flexible box layout. #182 #257
display: flex;
See usage examples, differences from CSS, performance tips, and all the details in the flexbox documentation.
Elements
select
element:- Emit
change
event even when the value of the newly selected option is the same. - Do not wrap around when using up/down keys on options.
- Fix unintentional clipping of the scrollbar.
- Emit
tabset
element: Fix index parameter having no effect in ElementTabSet::SetPanel and ElementTabSet::SetTab. #237 #246 (thanks @nimble0)
RCSS
- Add (non-standard) property value
clip: always
to force clipping to the element, seeclip
documentation. #235 #251 (thanks @MatthiasJFM) - Escape character changed from forward slash to backslash
\
to align with CSS.
Layout improvements
- See flexbox layout support above.
- Fix an issue where some elements could end up rendered at the wrong offset after scrolling. #230
- Improve behavior for collapsing negative vertical margins.
- Pixel rounding improvements to the clip region.
- Performance improvement: Avoid unnecesssary extra layouting step in some situations when scrollbars are added.
Samples
- Add clipboard support to X11 samples. #231 (thanks @barotto)
- Windows shell: Fix OpenGL error on startup.
Tests
- Visual tests suite: Add ability to overlay the previous reference capture of the test using the shortcut Ctrl+Q.
- Add support for CSS flexbox tests to the CSS tests converter.
Lua plugin
- Make Lua plugin API consistently one-indexed instead of zero-indexed. #237 #247 (thanks @nimble0)
- Fix crash due to double delete in the Lua plugin. #216
Dependencies
- Update LunaSVG plugin for compatibility with v2.3.0. #232
- Warn when using FreeType 2.11.0 with the MSVC compiler, as this version introduced an issue leading to crashes.
Build improvements
- Fix log message format string when compiling in debug mode. #234 (thanks @barotto)
- Avoid enum name collisions with Windows header macros. #258
Breaking changes
- The
clip
property is now non-inherited. Users may need to update their RCSS selectors to achieve the same clipping behavior as previously when using this property. - Minor changes to the clipping behavior when explicitly using the
clip
property, may lead to different results in some circumstances. - RCSS escape character is now
\
instead of/
. - Lua plugin: Some scripts may need to be changed from using zero-based indexing to one-indexing.
RmlUi 4.2
It's time for a new release! This time we have collected a sizable amount of smaller quality-of-life improvements and several bugfixes. As always, thanks a lot to all the contributors to the project! This one contains quite a lot of PRs from many different users, and that makes me happy.
Improvements
- Add
Rml::Debugger::Shutdown
. This allows the debugger to be restarted on another host context. #200 #201 (thanks @Lyatus) - Improve color blending and animations. #203 #208 (thanks @jac8888)
- Improve error messages on missing font face.
- Export
Rml::Assert()
in release mode. #209 (thanks @kinbei) - Add
.clang-format
. #223
Elements
- Fix a crash in some situations where the
input.range
element could result in infinite recursion. #202 - The
input.text
element will no longer copy to clipboard when the selection is empty. - Checkboxes (
input.checkbox
) no longer require avalue
attribute to properly function. #214 (thanks @ZombieRaccoon) - Fix
handle
element resizing incorrectly when the size target hasbox-sizing: border-box
. #215 (thanks @nimble0) - Improve warnings when using unsupported positioning and floating modes on tables. #221
Samples
- Fix shortcut keys on X11 and macOS. #210.
- Fix full reloading shortcut (Ctrl+R) in visual tests suite.
Other fixes
- Fix minor layout issue in
inline-block
s. #199 (thanks @svenvvv) - Fix an issue in data bindings where text expressions initialized with an empty string would not be evaluated correctly. #213
- Fix an issue in the FreeType font engine where
.woff
files would cause a crash on shutdown. #217 - Fix inline styles not always being applied on a cloned element. #218
- Fix render interface destructor calling virtual functions in some circumstances. #222
Breaking changes
- Removed built-in conversion functions between UTF-8 and UTF-16 character encodings.
- Slightly modified the lifetime requirements for the render interface for special use cases, see requirements here. Will warn in debug mode on wrong use. #222
Special thanks to @ZombieRaccoon for creating a Conan recipe for RmlUi and keeping it up to date on ConanCenter. RmlUi has also been added to vcpkg as of RmlUi 4.1. These dependency managers should make it a lot more convenient to consume RmlUi in your projects, more details can be found in the documentation.
The documentation has also been updated with a search feature. Hopefully this will help you find the things you are looking for, let me know if there are any issues. I would also like to give a gentle reminder that documentation pull requests are very much welcome. There's a handy "edit" button on pages so you can edit and submit a PR directly on GitHub, don't be afraid to use it for even the smallest things, thanks!
A special thanks goes to @barotto and @ZombieRaccoon for general improvements to the documentation.
RmlUi 4.1
RmlUi 4.1 is a maintenance release with the following changes.
- Several CMake fixes so that clients can more easily find and import RmlUi.
- Curly brackets can now be used inside string literals in data expressions. #190 (thanks @Dakror).
- Inline events are now attached and detached when
on..
attributes change. #189 (thanks @ZombieRaccoon).
Thanks for the contributions!
Read the full changelog here.
RmlUi 4.0
RmlUi 4.0 comes densely packed with several highly requested and impactful new features, as well as many bug fixes.
Notable new features
- Data binding using a model-view-controller (MVC) approach. A built-in feature for synchronizing the user interface with the application data.
- New RCSS properties:
border-radius
,word-break
,box-sizing
,caret-color
. - RCSS table support.
- Media queries support.
- Improved high DPI support with
resolution
media feature and sprite sheet target scaling.- Samples now implement responsive high DPI support on Windows 10.
- New elements:
<label>
,<svg>
(with plugin),<lottie>
(with plugin). - Added
Element::QuerySelector
,Element::QuerySelectorAll
, andElement::Closest
. - Added
ElementDocument::ReloadStyleSheet
to reload styles without affecting the document tree. - Several layout improvements including better overflow clipping and shrink-to-fit widths.
- Many improvements to the Lua plugin, as well as detailed documentation.
Read the full changelog here, the above is just a small selection of changes.
The new features have also been thoroughly documented, so make sure to read the official documentation for details. RmlUi has been restructured to simplify its usage, resulting in larger breaking changes. Users upgrading from RmlUi 3.x are encouraged to read the upgrade guide.
Finally, it has been fun to see the community grow over the last year, and I'm very happy that you are all helpful and welcoming to members both new and old. It has been a delight to see the uptake in contributions from users. Thank you for all the contributions and let's keep it going!
Windows binaries built using Visual Studio 15 2017.
RmlUi 3.3
RmlUi 3.3 fixes several bugs and adds some quality-of-life improvements.
Feature updates
- Element
select
improvements.- Scrolling in the selection box will now always prevent scrolling in the parent window. Scrolling the window will close the selection box.
- The selection box will now limit its height to the available space within the context's window dimensions, and position itself either below or above the select element as appropriate.
Other notable improvements
- The
style
attribute no longer requires a semi-colon;
after the final property. - Improved compilation times.
- Cleaned up header files and
#include
s to only include what they use. - Support for precompiled header files with CMake.
- Cleaned up header files and
- Now builds cleanly with a higher level of warning flags.
- RmlUi is now C++20 compatible (C++14 is still the minimum requirement).
In addition, several bugs have been fixed. See the full changelog for details.
Read the full changelog here.
Windows binaries built using Visual Studio 15 2017.
RmlUi 3.2
RmlUi 3.2 is a maintenance release, mainly fixing some smaller bugs.
New feature
- Ability to animate keyword properties.
Read the full changelog here.
Windows binaries built using Visual Studio 15 2017.