Skip to content

Commit

Permalink
Update readme gallery and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
mikke89 committed Apr 6, 2023
1 parent 34d8162 commit 4f35ce2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 12 deletions.
26 changes: 20 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,20 @@
#### 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. This can effectively be disabled by simply not submitting middle mouse button presses, or by using another button index when submitting the button to the context.
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-cursor-`, and take priority over any active `cursor` property. See the new [documentation section on scrolling](https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/contexts.html#scrolling) for details.
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](https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/contexts.html#scrolling) for details.

#### Smooth scrolling
Smooth scrolling is now supported in RmlUi, and enabled by default. This makes a given scroll action animate smoothly towards its destination. Smooth scrolling can be activated in several situations, including:
Smooth scrolling is now supported in RmlUi, and enabled by default. This makes a some 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 the `ScrollBehavior::Smooth` enum value.

The default smooth scroll behavior is enabled by default. This can be disabled or tweaked on the context as described below.
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:
Expand Down Expand Up @@ -57,6 +59,15 @@ The `mousescroll` event no longer performs scrolling on an element, and no longe
- New [`overscroll-behavior` property](https://mikke89.github.io/RmlUiDoc/pages/rcss/user_interface.html#overscroll-behavior). An element's closest scrollable ancestor is decided by scroll chaining, which can be controlled using this property. The `contain` 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](https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/contexts.html#on-demand-rendering) for details and examples.
### Text selection interface
Expand All @@ -81,13 +92,16 @@ See the [form controls documentation](https://mikke89.github.io/RmlUiDoc/pages/c
- 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.

### Bug fixes
### Stability improvements

- Fix a potential crash during plugin shutdown. #415 (thanks @LoneBoco)

### Data bindings

- Add new [data-alias attribute](https://mikke89.github.io/RmlUiDoc/pages/data_bindings/views_and_controllers.html#data-alias) 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)

Expand All @@ -112,7 +126,7 @@ See the [form controls documentation](https://mikke89.github.io/RmlUiDoc/pages/c

### Breaking changes

- The `mousewheel` event no longer scrolls an element, see scrolling changes above.
- The `mousescroll` event no longer scrolls an element, see scrolling changes above. Its `wheel_delta` parameter has been renamed to `wheel_delta_y`.
- The signature of `Context::ProcessMouseWheel` has been changed, the old signature is still available but deprecated.


Expand Down
40 changes: 34 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -351,27 +351,55 @@ Users can now edit the text field to change the animal. The data bindings ensure
**Game interface from the 'invader' sample**\
![Game interface](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/invader.png)
**Game menu**
**Game menu**\
![Game menu](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/menu_screen.png)
**Simple game from the 'databinding' sample**\
![Databinding sample](https://raw.githubusercontent.com/mikke89/RmlUiDoc/df1651db94e69f2977bc0344864ec061b56b104e/assets/gallery/data_binding.png)
**[alt:V](https://altv.mp/) installer - a multiplayer client for GTA:V**\
![alt:V installer collage](https://user-images.githubusercontent.com/5490330/230487770-275fe98f-753f-4b35-b2e1-1e20a798f5e8.png)
**[Unvanquished](https://unvanquished.net/) - a first-person shooter game with real-time strategy elements**\
![Unvanquished 0.54 collage](https://user-images.githubusercontent.com/5490330/230487771-5108a273-8b76-4216-8324-d9e5af102622.jpg)
**Installer software by [@xland](https://github.com/xland)**\
![xland installer collage](https://user-images.githubusercontent.com/5490330/230487763-ec4d28e7-7ec6-44af-89f2-d2cbad8f44c1.png)
**Form controls from the 'demo' sample**\
![Form controls](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/forms.png)
**Sandbox from the 'demo' sample, try it yourself!**\
![Sandbox](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/sandbox.png)
**Visual testing framework**\
![Sandbox](https://github.com/mikke89/RmlUiDoc/blob/c7253748d1bcf6dd33d97ab4fe8b6731a7ee3dac/assets/gallery/visual_tests_flex.png)
**Visual testing framework - for built-in automated layout tests**\
![Visual testing framework](https://github.com/mikke89/RmlUiDoc/blob/c7253748d1bcf6dd33d97ab4fe8b6731a7ee3dac/assets/gallery/visual_tests_flex.png)
**Flexbox layout**\
![Flexbox](https://github.com/mikke89/RmlUiDoc/blob/4cf0c6ac23b822174e69e5f1413b71254230c619/assets/images/flexbox-example.png)
**Animations and transitions from the 'animation' sample**
[Animation sample](https://user-images.githubusercontent.com/5490330/230486839-de3ca062-6641-48e0-aa6a-ef2b26c3aad5.webm)
\
**Transitions and transforms on a game menu**
[Game main menu](https://user-images.githubusercontent.com/5490330/230487193-cd07b565-2e9b-4570-aa37-7dd7746dd9c9.webm)
\
**Camera movement in a game menu**
[Transforms applied to game menu](https://user-images.githubusercontent.com/5490330/230487217-f499dfca-5304-4b99-896d-07791926da2b.webm)
\
**Transitions on mouse hover (entirely in RCSS)**\
![Transition](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/transition.gif)
**Animated transforms (entirely in RCSS)**\
![Transform](https://github.com/mikke89/RmlUiDoc/blob/3f319d8464e73b821179ff8d20537013af5b9810/assets/gallery/transform.gif)
**Flexbox layout**\
![Flexbox](https://github.com/mikke89/RmlUiDoc/blob/4cf0c6ac23b822174e69e5f1413b71254230c619/assets/images/flexbox-example.png)
**Vector animations with the [Lottie plugin](https://mikke89.github.io/RmlUiDoc/pages/cpp_manual/lottie.html)**\
![Lottie animation](https://github.com/mikke89/RmlUiDoc/blob/086385e119f0fc6e196229b785e91ee0252fe4b4/assets/gallery/lottie.gif)
Expand Down

0 comments on commit 4f35ce2

Please sign in to comment.