integrate RMLUI library

This commit is contained in:
2026-01-03 12:17:19 +01:00
parent 784e054105
commit 1074a1e59a
90 changed files with 3939 additions and 4 deletions

212
src/main/assets/LICENSE.txt Normal file
View File

@@ -0,0 +1,212 @@
The RmlUi samples include fonts that are separately licensed. They are listed
below along with their licenses.
-----------------------------------------------------------
-----------------------------------------------------------
--- Lato ---
--- http://www.latofonts.com/ ---
--- ---
--- LatoLatin-Bold.ttf ---
--- LatoLatin-BoldItalic.ttf ---
--- LatoLatin-Italic.ttf ---
--- LatoLatin-Regular.ttf ---
-----------------------------------------------------------
-----------------------------------------------------------
Copyright (c) 2010-2015, Łukasz Dziedzic (dziedzic@typoland.com),
with Reserved Font Name Lato.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.
-----------------------------------------------------------
-----------------------------------------------------------
--- Noto Emoji ---
--- https://www.google.com/get/noto/ ---
--- ---
--- NotoEmoji-Regular.ttf ---
-----------------------------------------------------------
-----------------------------------------------------------
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,93 @@
Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic)
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@@ -0,0 +1,118 @@
Roboto Variable Font
====================
This download contains Roboto as both variable fonts and static fonts.
Roboto is a variable font with these axes:
wdth
wght
This means all the styles are contained in these files:
Roboto-VariableFont_wdth,wght.ttf
Roboto-Italic-VariableFont_wdth,wght.ttf
If your app fully supports variable fonts, you can now pick intermediate styles
that arent available as static fonts. Not all apps support variable fonts, and
in those cases you can use the static font files for Roboto:
static/Roboto_Condensed-Thin.ttf
static/Roboto_Condensed-ExtraLight.ttf
static/Roboto_Condensed-Light.ttf
static/Roboto_Condensed-Regular.ttf
static/Roboto_Condensed-Medium.ttf
static/Roboto_Condensed-SemiBold.ttf
static/Roboto_Condensed-Bold.ttf
static/Roboto_Condensed-ExtraBold.ttf
static/Roboto_Condensed-Black.ttf
static/Roboto_SemiCondensed-Thin.ttf
static/Roboto_SemiCondensed-ExtraLight.ttf
static/Roboto_SemiCondensed-Light.ttf
static/Roboto_SemiCondensed-Regular.ttf
static/Roboto_SemiCondensed-Medium.ttf
static/Roboto_SemiCondensed-SemiBold.ttf
static/Roboto_SemiCondensed-Bold.ttf
static/Roboto_SemiCondensed-ExtraBold.ttf
static/Roboto_SemiCondensed-Black.ttf
static/Roboto-Thin.ttf
static/Roboto-ExtraLight.ttf
static/Roboto-Light.ttf
static/Roboto-Regular.ttf
static/Roboto-Medium.ttf
static/Roboto-SemiBold.ttf
static/Roboto-Bold.ttf
static/Roboto-ExtraBold.ttf
static/Roboto-Black.ttf
static/Roboto_Condensed-ThinItalic.ttf
static/Roboto_Condensed-ExtraLightItalic.ttf
static/Roboto_Condensed-LightItalic.ttf
static/Roboto_Condensed-Italic.ttf
static/Roboto_Condensed-MediumItalic.ttf
static/Roboto_Condensed-SemiBoldItalic.ttf
static/Roboto_Condensed-BoldItalic.ttf
static/Roboto_Condensed-ExtraBoldItalic.ttf
static/Roboto_Condensed-BlackItalic.ttf
static/Roboto_SemiCondensed-ThinItalic.ttf
static/Roboto_SemiCondensed-ExtraLightItalic.ttf
static/Roboto_SemiCondensed-LightItalic.ttf
static/Roboto_SemiCondensed-Italic.ttf
static/Roboto_SemiCondensed-MediumItalic.ttf
static/Roboto_SemiCondensed-SemiBoldItalic.ttf
static/Roboto_SemiCondensed-BoldItalic.ttf
static/Roboto_SemiCondensed-ExtraBoldItalic.ttf
static/Roboto_SemiCondensed-BlackItalic.ttf
static/Roboto-ThinItalic.ttf
static/Roboto-ExtraLightItalic.ttf
static/Roboto-LightItalic.ttf
static/Roboto-Italic.ttf
static/Roboto-MediumItalic.ttf
static/Roboto-SemiBoldItalic.ttf
static/Roboto-BoldItalic.ttf
static/Roboto-ExtraBoldItalic.ttf
static/Roboto-BlackItalic.ttf
Get started
-----------
1. Install the font files you want to use
2. Use your app's font picker to view the font family and all the
available styles
Learn more about variable fonts
-------------------------------
https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts
https://variablefonts.typenetwork.com
https://medium.com/variable-fonts
In desktop apps
https://theblog.adobe.com/can-variable-fonts-illustrator-cc
https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts
Online
https://developers.google.com/fonts/docs/getting_started
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide
https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts
Installing fonts
MacOS: https://support.apple.com/en-us/HT201749
Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux
Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows
Android Apps
https://developers.google.com/fonts/docs/android
https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts
License
-------
Please read the full license text (OFL.txt) to understand the permissions,
restrictions and requirements for usage, redistribution, and modification.
You can use them in your products & projects print or digital,
commercial or otherwise.
This isn't legal advice, please consider consulting a lawyer and see the full
license for all details.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

28
src/main/assets/demo.rml Normal file
View File

@@ -0,0 +1,28 @@
<rml>
<head>
<title>Demo</title>
<link type="text/template" href="window.rml" />
<style>
body
{
width: 300dp;
height: 225dp;
margin: auto;
}
div#title_bar div#icon
{
display: none;
}
div#content
{
text-align: left;
}
</style>
</head>
<body template="window">
This is a sample.
</body>
</rml>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -0,0 +1,13 @@
<rml>
<head>
<title>Hello world</title>
<link type="text/rcss" href="rml.rcss"/>
<link type="text/rcss" href="window.rcss"/>
</head>
<body data-model="animals">
<h1>RmlUi</h1>
<p>Hello <span id="world">world</span>!</p>
<p data-if="show_text">The quick brown fox jumps over the lazy {{animal}}.</p>
<input type="text" data-value="animal"/>
</body>
</rml>

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -0,0 +1,765 @@
@spritesheet theme
{
src: invader.tga;
/* For high dpi screens, designates the scaling it is intended to be shown at. */
resolution: 1x;
/**
The following specifies a list of sprite names and associated rectangles into the image given above.
Any sprite given here can be specified in a decorator. Their names must be globally unique.
Rectangles are specified as: x y width height. With the origin assumed to be at the top left corner.
*/
title-bar-l: 147px 0px 82px 85px;
title-bar-c: 229px 0px 1px 85px;
title-bar-r: 231px 0px 15px 85px;
/* huditems are vertically flipped titlebars */
huditem-l: 147px 55px 82px -55px;
huditem-c: 229px 55px 1px -55px;
huditem-r: 231px 55px 15px -55px;
icon-help: 128px 152px 51px 39px;
icon-invader: 179px 152px 51px 39px;
icon-game: 230px 152px 51px 39px;
icon-hiscore: 281px 152px 51px 39px;
icon-waves: 332px 152px 51px 39px;
icon-flag: 336px 191px 51px 39px;
icon-lives: 383px 152px 51px 39px;
icon-score: 434px 152px 51px 39px;
window-tl: 0px 0px 133px 140px;
window-t: 134px 0px 1px 140px;
window-tr: 136px 0px 10px 140px;
window-l: 0px 139px 10px 1px;
window-c: 11px 139px 1px 1px;
window-r: 10px 139px -10px 1px; /* mirrored left */
window-bl: 0px 140px 11px 11px;
window-b: 11px 140px 1px 11px;
window-br: 136px 140px 10px 11px;
button: 247px 0px 159px 45px;
button-hover: 247px 45px 159px 45px;
button-active: 247px 90px 159px 45px;
button-inner: 259px 19px 135px 1px;
button-inner-hover: 259px 64px 135px 1px;
button-inner-active: 259px 109px 135px 1px;
text-l: 162px 192px 14px 31px;
text-c: 176px 192px 1px 31px;
text-focus-l: 162px 230px 14px 31px;
text-focus-c: 176px 230px 1px 31px;
textarea: 162px 193px 145px 31px;
textarea-inner: 173px 206px 127px 10px;
textarea-focus: 162px 231px 145px 31px;
textarea-focus-inner: 173px 244px 127px 10px;
selectbox-tl: 281px 275px 11px 9px;
selectbox-t: 292px 275px 1px 9px;
selectbox-tr: 294px 275px 11px 9px;
selectbox-l: 281px 283px 11px 1px;
selectbox-c: 292px 283px 1px 1px;
selectbox-bl: 281px 285px 11px 11px;
selectbox-b: 292px 285px 1px 11px;
selectbox-br: 294px 285px 11px 11px;
selectvalue: 162px 192px 145px 37px;
selectvalue-hover: 162px 230px 145px 37px;
selectarrow: 307px 192px 30px 37px;
selectarrow-hover: 307px 230px 30px 37px;
selectarrow-active: 307px 268px 30px 37px;
radio: 407px 0px 30px 30px;
radio-hover: 437px 0px 30px 30px;
radio-active: 467px 0px 30px 30px;
radio-checked: 407px 30px 30px 30px;
radio-checked-hover: 437px 30px 30px 30px;
radio-checked-active: 467px 30px 30px 30px;
checkbox: 407px 60px 30px 30px;
checkbox-hover: 437px 60px 30px 30px;
checkbox-active: 467px 60px 30px 30px;
checkbox-checked: 407px 90px 30px 30px;
checkbox-checked-hover: 437px 90px 30px 30px;
checkbox-checked-active: 467px 90px 30px 30px;
tableheader-l: 127px 192px 16px 31px;
tableheader-c: 143px 192px 2px 31px;
tableheader-r: 145px 192px 15px 31px;
expand: 3px 232px 17px 17px;
expand-hover: 21px 232px 17px 17px;
expand-active: 39px 232px 17px 17px;
expand-collapsed: 3px 250px 17px 17px;
expand-collapsed-hover: 21px 250px 17px 17px;
expand-collapsed-active: 39px 250px 17px 17px;
slidertrack-t: 70px 199px 27px 2px;
slidertrack-c: 70px 201px 27px 1px;
slidertrack-b: 70px 202px 27px 2px;
sliderbar-t: 56px 152px 23px 23px;
sliderbar-c: 56px 175px 23px 1px;
sliderbar-b: 56px 176px 23px 22px;
sliderbar-hover-t: 80px 152px 23px 23px;
sliderbar-hover-c: 80px 175px 23px 1px;
sliderbar-hover-b: 80px 176px 23px 22px;
sliderbar-active-t: 104px 152px 23px 23px;
sliderbar-active-c: 104px 175px 23px 1px;
sliderbar-active-b: 104px 176px 23px 22px;
sliderarrowdec: 0px 152px 27px 24px;
sliderarrowdec-hover: 0px 177px 27px 24px;
sliderarrowdec-active: 0px 202px 27px 24px;
sliderarrowinc: 28px 152px 27px 24px;
sliderarrowinc-hover: 28px 177px 27px 24px;
sliderarrowinc-active: 28px 202px 27px 24px;
range-track: 219px 194px 3px 32px;
range-track-inner: 220px 204px 1px 14px;
range-track-focus: 219px 232px 3px 32px;
range-track-focus-inner: 220px 242px 1px 14px;
range-bar: 127px 191px 34px 32px;
range-dec: 3px 232px 17px 17px;
range-dec-hover: 21px 232px 17px 17px;
range-dec-active: 39px 232px 17px 17px;
range-inc: 3px 250px 17px 17px;
range-inc-hover: 21px 250px 17px 17px;
range-inc-active: 39px 250px 17px 17px;
progress-l: 103px 267px 13px 34px;
progress-c: 116px 267px 54px 34px;
progress-r: 170px 267px 13px 34px;
progress-fill-l: 110px 302px 6px 34px;
progress-fill-c: 140px 302px 6px 34px;
progress-fill-r: 170px 302px 6px 34px;
gauge: 0px 271px 100px 86px;
gauge-fill: 0px 356px 100px 86px;
}
body
{
font-family: LatoLatin;
font-weight: normal;
font-style: normal;
font-size: 15dp;
color: white;
nav: auto;
}
body.window
{
padding-top: 43dp;
padding-bottom: 20dp;
min-width: 250dp;
max-width: 800dp;
min-height: 135dp;
max-height: 700dp;
}
div#title_bar
{
z-index: 1;
position: absolute;
top: 7dp;
left: 0;
text-align: left;
vertical-align: bottom;
}
div#title_bar div#icon
{
position: absolute;
left: 15dp;
top: -4dp;
width: 51dp;
height: 39dp;
}
div#title_bar span
{
padding-left: 85dp;
padding-right: 25dp;
padding-top: 18dp;
padding-bottom: 43dp;
vertical-align: top;
line-height: 24dp;
font-size: 20dp;
font-weight: bold;
font-effect: glow(1dp black);
decorator: tiled-horizontal( title-bar-l, title-bar-c, title-bar-r );
}
div#window
{
width: auto;
height: 100%;
padding: 10dp 15dp;
decorator: tiled-box(
window-tl, window-t, window-tr,
window-l, window-c, window-r,
window-bl, window-b, window-br
);
}
div#content
{
z-index: 2;
width: auto;
height: 100%;
overflow: hidden auto;
text-align: center;
}
p
{
text-align: left;
margin-bottom: 1em;
}
h1
{
margin-left: 0.4em;
margin-bottom: 0.4em;
text-align: left;
font-size: 16dp;
font-weight: bold;
font-effect: glow(1dp 1dp 1dp 1dp #1117);
}
input,
select
{
margin-left: 20dp;
}
input.submit
{
margin-left: 0;
}
input, button, select {
nav: auto;
}
button,
input.submit
{
display: inline-block;
width: 159dp;
height: 33dp;
padding-top: 12dp;
font-size: 16dp;
text-align: center;
tab-index: auto;
decorator: image(button);
}
button:focus,
input.submit:focus
{
font-effect: blur(3dp #fff);
}
button:hover, button:focus-visible,
input.submit:hover, input.submit:focus-visible
{
decorator: image(button-hover);
}
button:active,
input.submit:active
{
decorator: image(button-active);
}
input.submit:disabled
{
decorator: image(button);
image-color: rgba(50, 150, 150, 120);
cursor: unavailable;
}
input.text, input.password
{
box-sizing: border-box;
height: 31dp;
padding: 11dp 10dp 0;
decorator: tiled-horizontal( text-l, text-c, auto ); /* Right becomes mirrored left */
cursor: text;
text-align: left;
}
input.text:focus-visible, input.password:focus-visible
{
decorator: tiled-horizontal( text-focus-l, text-focus-c, auto );
}
textarea
{
padding: 5dp 8dp;
decorator: ninepatch(textarea, textarea-inner, 1.0) border-box;
cursor: text;
text-align: left;
line-height: 1.3;
border-width: 14dp 12dp 10dp;
border-color: transparent;
}
textarea:focus-visible
{
decorator: ninepatch(textarea-focus, textarea-focus-inner, 1.0) border-box;
}
input.text,
input.password,
select,
textarea
{
color: #333;
font-size: 13dp;
}
table input.text
{
box-sizing: border-box;
width: 100%;
margin: 0;
padding: 1dp 5dp;
height: auto;
line-height: 16dp;
text-align: center;
border-width: 1dp;
border-color: black;
background-color: white;
font-size: 15dp;
}
table input.text, table input.text:focus-visible
{
decorator: none;
}
select
{
width: 175dp;
height: 37dp;
}
select selectvalue
{
width: auto;
margin-right: 30dp;
height: 25dp;
padding: 12dp 10dp 0dp 10dp;
decorator: image( selectvalue );
}
select:focus-visible selectvalue {
decorator: image( selectvalue-hover );
}
select selectarrow
{
width: 30dp;
height: 37dp;
decorator: image( selectarrow );
}
select:hover selectarrow, select:focus-visible selectarrow
{
decorator: image( selectarrow-hover );
}
select:active selectarrow,
select selectarrow:checked
{
decorator: image( selectarrow-active );
}
select selectbox
{
margin-left: 1dp;
margin-top: -7dp;
margin-bottom: -10dp;
width: 162dp;
padding: 1dp 4dp 4dp 4dp;
}
select selectbox,
tbody
{
decorator: tiled-box(
selectbox-tl, selectbox-t, selectbox-tr,
selectbox-l, selectbox-c, auto, /* auto mirrors left */
selectbox-bl, selectbox-b, selectbox-br
);
}
select selectbox option
{
width: auto;
padding: 3dp 0 3dp 6dp;
background: #DDDD;
}
select selectbox option:nth-child(even),
tr:nth-child(even)
{
background: #FFFFFFA0;
}
select selectbox option:checked
{
font-weight: bold;
}
select selectbox option:hover
{
background: #FF5D5D;
}
input.radio,
input.checkbox
{
width: 30dp;
height: 30dp;
vertical-align: -11dp;
}
input.radio
{
decorator: image(radio);
}
input.radio:hover, input.radio:focus-visible
{
decorator: image(radio-hover);
}
input.radio:active
{
decorator: image(radio-active);
}
input.radio:checked
{
decorator: image(radio-checked);
}
input.radio:checked:hover, input.radio:checked:focus-visible
{
decorator: image(radio-checked-hover);
}
input.radio:checked:active
{
decorator: image(radio-checked-active);
}
input.checkbox
{
decorator: image(checkbox);
}
input.checkbox:hover, input.checkbox:focus-visible
{
decorator: image(checkbox-hover);
}
input.checkbox:active
{
decorator: image(checkbox-active);
}
input.checkbox:checked
{
decorator: image(checkbox-checked);
}
input.checkbox:checked:hover, input.checkbox:checked:focus-visible
{
decorator: image(checkbox-checked-hover);
}
input.checkbox:checked:active
{
decorator: image(checkbox-checked-active);
}
input.range {
width: 200dp;
height: 32dp;
vertical-align: -12dp;
}
input.range slidertrack {
margin-top: 3dp;
height: 22dp;
image-color: #ecc;
decorator: ninepatch( range-track, range-track-inner, 1.0 );
}
input.range:focus-visible slidertrack {
decorator: ninepatch( range-track-focus, range-track-focus-inner, 1.0 );
}
input.range sliderprogress {
background: rgba(100, 0, 0, 80);
margin-top: 8dp;
height: 7dp;
}
input.range sliderbar {
margin-left: -8dp;
margin-right: -7dp;
margin-top: -3dp;
width: 34dp;
height: 23dp;
decorator: image( range-bar );
}
input.range sliderbar:hover, input.range slidertrack:hover + sliderbar {
image-color: #cc0;
}
input.range sliderbar:active, input.range slidertrack:active + sliderbar {
image-color: #c80;
}
input.range sliderarrowdec, input.range sliderarrowinc {
width: 17dp;
height: 17dp;
margin-top: 6dp;
}
input.range sliderarrowdec { decorator: image( range-dec ); }
input.range sliderarrowinc { decorator: image( range-inc ); }
input.range sliderarrowdec:hover { decorator: image( range-dec-hover ); }
input.range sliderarrowinc:hover { decorator: image( range-inc-hover ); }
input.range sliderarrowdec:active { decorator: image( range-dec-active ); }
input.range sliderarrowinc:active { decorator: image( range-inc-active ); }
thead tr {
height: 35dp;
decorator: tiled-horizontal( tableheader-l, tableheader-c, tableheader-r );
}
thead td {
padding-top: 11dp;
}
tbody {
/* Margin left/right only affects the background positioning for the decorator, not the cell placement */
margin-left: 5dp;
margin-right: 4dp;
/* Padding top/bottom adds extra spacing between the header row and the body, and between the body and table bottom */
padding-top: 4dp;
padding-bottom: 4dp;
}
tbody tr {
margin-left: 9dp;
margin-right: 8dp;
color: black;
}
expand
{
display: block;
margin: 1dp 0 1dp 5dp;
height: 17dp;
width: 17dp;
decorator: image( expand );
}
expand:hover
{
decorator: image( expand-hover );
}
expand:active
{
decorator: image( expand-active );
}
expand.collapsed
{
decorator: image( expand-collapsed );
}
expand.collapsed:hover
{
decorator: image( expand-collapsed-hover );
}
expand.collapsed:active
{
decorator: image( expand-collapsed-active );
}
scrollbarvertical
{
margin-top: -6dp;
margin-bottom: -6dp;
margin-right: -11dp;
width: 27dp;
}
scrollbarvertical slidertrack
{
decorator: tiled-vertical( slidertrack-t, slidertrack-c, slidertrack-b );
}
scrollbarvertical slidertrack:active
{
image-color: #aaa;
}
scrollbarvertical sliderbar
{
margin-left: 4dp;
width: 23dp;
min-height: 46dp;
decorator: tiled-vertical( sliderbar-t, sliderbar-c, sliderbar-b );
}
scrollbarvertical sliderbar:hover
{
decorator: tiled-vertical( sliderbar-hover-t, sliderbar-hover-c, sliderbar-hover-b );
}
scrollbarvertical sliderbar:active
{
decorator: tiled-vertical( sliderbar-active-t, sliderbar-active-c, sliderbar-active-b );
}
scrollbarvertical sliderarrowdec,
scrollbarvertical sliderarrowinc
{
width: 27dp;
height: 24dp;
}
scrollbarvertical sliderarrowdec
{
decorator: image( sliderarrowdec );
}
scrollbarvertical sliderarrowdec:hover
{
decorator: image( sliderarrowdec-hover );
}
scrollbarvertical sliderarrowdec:active
{
decorator: image( sliderarrowdec-active );
}
scrollbarvertical sliderarrowinc
{
decorator: image( sliderarrowinc );
}
scrollbarvertical sliderarrowinc:hover
{
decorator: image( sliderarrowinc-hover );
}
scrollbarvertical sliderarrowinc:active
{
decorator: image( sliderarrowinc-active );
}
scrollbarhorizontal
{
width: 0;
height: 0;
}
textarea scrollbarvertical
{
cursor: arrow;
width: 12dp;
margin: -3dp -7dp -3dp 7dp;
}
textarea scrollbarvertical slidertrack
{
decorator: none;
background-color: #eee;
}
textarea scrollbarvertical sliderbar
{
decorator: none;
background-color: #bc0000;
border-left: 5dp #cc7272;
width: 7dp;
min-height: 16dp;
margin: 0;
}
textarea scrollbarvertical sliderbar:hover
{
decorator: none;
background-color: #ca3535;
}
textarea scrollbarvertical sliderbar:active
{
decorator: none;
background-color: #880000;
}
textarea scrollbarvertical sliderarrowdec,
textarea scrollbarvertical sliderarrowinc
{
width: 0;
height: 0;
}
textarea scrollbarhorizontal
{
cursor: arrow;
height: 10dp;
margin: 3dp -7dp -3dp -3dp;
}
textarea scrollbarhorizontal sliderbar
{
background-color: #bc0000;
border-top: 4dp #cc7272;
height: 6dp;
min-width: 10dp;
}
textarea scrollbarhorizontal sliderbar:hover
{
background-color: #ca3535;
}
textarea scrollbarhorizontal sliderbar:active
{
background-color: #880000;
}
textarea scrollbarhorizontal slidertrack
{
background-color: #eee;
}
textarea scrollbarcorner
{
cursor: arrow;
background-color: #ccc;
margin-top: 3dp;
margin-left: 7dp;
}

BIN
src/main/assets/invader.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
src/main/assets/present.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

61
src/main/assets/rml.rcss Normal file
View File

@@ -0,0 +1,61 @@
/*
* Default styles for all the basic elements.
*/
div
{
display: block;
}
p
{
display: block;
}
h1
{
display: block;
}
em
{
font-style: italic;
}
strong
{
font-weight: bold;
}
select
{
text-align: left;
}
tabset tabs
{
display: block;
}
table {
box-sizing: border-box;
display: table;
}
tr {
box-sizing: border-box;
display: table-row;
}
td {
box-sizing: border-box;
display: table-cell;
}
col {
box-sizing: border-box;
display: table-column;
}
colgroup {
display: table-column-group;
}
thead, tbody, tfoot {
display: table-row-group;
}

View File

@@ -0,0 +1,36 @@
body {
font-family: LatoLatin;
font-size: 18px;
color: #02475e;
background: #fefecc;
text-align: center;
padding: 2em 1em;
position: absolute;
border: 2px #ccc;
width: 500px;
height: 200px;
margin: auto;
}
h1 {
color: #f6470a;
font-size: 1.5em;
font-weight: bold;
margin-bottom: 0.7em;
}
p {
margin: 0.7em 0;
}
input.text {
background-color: #fff;
color: #555;
border: 2px #999;
padding: 5px;
tab-index: auto;
cursor: text;
box-sizing: border-box;
width: 200px;
font-size: 0.9em;
}

View File

@@ -0,0 +1,19 @@
<template name="window" content="content">
<head>
<link type="text/rcss" href="rml.rcss"/>
<link type="text/rcss" href="invader.rcss"/>
</head>
<body class="window">
<div id="title_bar">
<handle move_target="#document">
<div id="icon"></div>
<span id="title">Title</span>
</handle>
</div>
<div id="window">
<div id="content">
</div>
</div>
<handle size_target="#document" style="position: absolute; width: 16dp; height: 16dp; bottom: 0px; right: 0px; cursor: resize;"></handle>
</body>
</template>