GithubHelp home page GithubHelp logo

buffernihility / rmlui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mikke89/rmlui

0.0 2.0 0.0 12.99 MB

RmlUi - The HTML/CSS User Interface library evolved

Home Page: https://mikke89.github.io/RmlUiDoc/

License: MIT License

CMake 2.90% Python 0.16% Shell 0.17% C 20.98% C++ 75.79%

rmlui's Introduction

RmlUi - The HTML/CSS User Interface Library Evolved

RmlUi

RmlUi - now with added boosters taking control of the rocket, targeting your games and applications.


Chat on Gitter Build Status Build status

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.0 and CSS2.0 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.

Features

  • Cross platform architecture: Windows, macOS, Linux, iOS, etc.
  • Dynamic layout system.
  • Full animation and transform support.
  • Efficient application-wide styling, with a custom-built templating engine.
  • Fully featured control set: buttons, sliders, drop-downs, etc.
  • Runtime visual debugging suite.

Extensible

  • Abstracted interfaces for plugging in to any game engine.
  • Decorator engine allowing custom application-specific effects that can be applied to any element.
  • Generic event system that binds seamlessly into existing projects.
  • Easily integrated and extensible with Lua scripting.

Controllable

  • The user controls their own update loop, calling into RmlUi as desired.
  • The library strictly runs as a result of calls to its API, never in the background.
  • Input handling and rendering is performed by the user.
  • The library generates vertices, indices, and textures for the user to render how they like.
  • File handling and the font engine can optionally be fully replaced by the user.

Integrating RmlUi

Here are the general steps to integrate the library into a C++ application, have a look at the documentation for details.

  1. Build RmlUi using CMake and your favorite compiler, or fetch the Windows library binaries.
  2. Link it up to your application.
  3. Implement the abstract system interface and render interface.
  4. Initialize RmlUi with the interfaces, create a context, provide font files, and load a document.
  5. Call into the context's update and render methods in a loop, and submit input events.
  6. Compile and run!

Several samples demonstrate everything from basic integration to more complex use of the library, feel free to have a look for inspiration.

Dependencies

In addition, a C++14 compatible compiler is required.

Example: Basic document

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.

Document

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 template

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.

Style sheet

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;
}

Rendered output

Hello world document

Gallery

Game interface Game interface from the 'invader' sample

Game menu Game menu

Form controls Form controls from the 'demo' sample

Sandbox Sandbox from the 'demo' sample, try it yourself!

Transition
Transitions on mouse hover (entirely in RCSS)

Transform
Animated transforms (entirely in RCSS)

To see more examples of animations and transitions in action, have a look at the videos in the animations documentation.

License (MIT)

Copyright (c) 2008-2014 CodePoint Ltd, Shift Technology Ltd, and contributors
Copyright (c) 2019 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.

rmlui's People

Contributors

mikke89 avatar dwimsey avatar lloydw avatar gambini avatar viciious avatar wheybags avatar barotto avatar konopka90 avatar morgul avatar mooflu avatar jhasse avatar shoemark avatar razorde avatar progranism avatar dougbinks avatar noam-c avatar czbming avatar hoshi10 avatar triang3l avatar gogoprog avatar robn avatar peterclemenko avatar hachmeister avatar julianko avatar i8degrees avatar gabomdq avatar fr00b0 avatar dawid-aurobit avatar andryblack avatar glockenmeier avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.