RmlUi - The HTML/CSS User Interface library evolved
#gamedev #gui #ui #hud #cpp #lua #html #css #web #dom #compiled #webview #htmlview #webgui #framework
|
|
4 лет назад | |
|---|---|---|
| .github | 5 лет назад | |
| CMake | 4 лет назад | |
| Dependencies | 5 лет назад | |
| Include | 4 лет назад | |
| Samples | 4 лет назад | |
| Source | 4 лет назад | |
| Tests | 4 лет назад | |
| .appveyor.yml | 4 лет назад | |
| .gitignore | 5 лет назад | |
| .travis.valgrind.supp | 6 лет назад | |
| .travis.yml | 5 лет назад | |
| CMakeLists.txt | 4 лет назад | |
| LICENSE.txt | 5 лет назад | |
| changelog.md | 4 лет назад | |
| readme.md | 4 лет назад |
RmlUi - now with added boosters taking control of the rocket, targeting your games and applications.
RmlUi is the C++ user interface package based on the HTML and CSS standards, designed as a complete solution for any project's interface needs. It is a fork of the libRocket project, introducing new features, bug fixes, and performance improvements.
RmlUi uses the time-tested open standards XHTML1 and CSS2 while borrowing features from HTML5 and CSS3, and extends them with features suited towards real-time applications. Because of this, you don't have to learn a whole new proprietary technology like other libraries in this space. Please have a look at the supported RCSS properties and RML elements.
Documentation is located at https://mikke89.github.io/RmlUiDoc/
Note: RmlUi 4.0 currently in development is a restructuring of RmlUi 3.x. This includes changes to the namespaces, plugins, and include headers. Take a look at the changelog for a summary of changes and an upgrade guide.
Here are the general steps to integrate the library into a C++ application, have a look at the documentation for details.
Several samples demonstrate everything from basic integration to more complex use of the library, feel free to have a look for inspiration.
In addition, a C++14 compatible compiler is required.
RmlUi aims to support the most common and familar features from HTML and CSS, while keeping the library light and performant. We do not aim to be fully compliant with CSS or HTML, in particular when it conflicts with lightness and performance. Users are generally expected to author documents specifically for RmlUi, but any experience and skills from web design should be transferable.
RmlUi supports most of CSS2 with some CSS3 features such as
and many of the common HTML elements including <input>, <textarea>, and <select>.
For details, see
RmlUi adds features and enhancements over CSS and HTML where it makes sense, most notably the following.
In this example a document is created using a templated window. The template is optional but can aid in achieving a consistent look by sharing it between multiple documents.
hello_world.rml
<rml>
<head>
<title>Hello world</title>
<link type="text/template" href="window.rml" />
<style>
body
{
width: 200px;
height: 100px;
margin: auto;
}
</style>
</head>
<body template="window">
Hello world!
</body>
</rml>
window.rml
<template name="window" content="content">
<head>
<link type="text/rcss" href="rml.rcss"/>
<link type="text/rcss" href="window.rcss"/>
</head>
<body>
<div id="title_header">RmlUi</div>
<div id="content"/>
</body>
</template>
No styles are defined internally, thus rml.rcss can be included for styling the standard elements.
window.rcss
body
{
font-family: Delicious;
font-weight: normal;
font-style: normal;
font-size: 15px;
color: #6f42c1;
background: #f6f8fa;
text-align: center;
padding: 2em 3em;
border: 2px #ccc;
}
#title_header
{
color: #9a42c5;
font-size: 1.5em;
font-weight: bold;
padding-bottom: 1em;
}
Game interface from the 'invader' sample
Form controls from the 'demo' sample
Sandbox from the 'demo' sample, try it yourself!

Transitions on mouse hover (entirely in RCSS)

Animated transforms (entirely in RCSS)

Vector animations with the Lottie plugin

Vector images with the SVG plugin
See the full gallery for more screenshots and videos of the library in action.
RmlUi is published under the MIT license. The library includes third-party source code and assets with their own licenses, as detailed below.
MIT License
Copyright (c) 2008-2014 CodePoint Ltd, Shift Technology Ltd, and contributors\ Copyright (c) 2019-2021 The RmlUi Team, and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
See Include/RmlUi/Core/Containers/LICENSE.txt - all MIT licensed.
See Source/Debugger/LICENSE.txt - SIL Open Font License.
See
See Tests/Dependencies/LICENSE.txt.