Making a Recalbox theme

49 pages · 8 sections
⌕
FRENESDE Show everything Create my theme

image and video

Displaying an image or a video, and tinting them.

image (21 properties)

<image name="jaquette">
  <pos>0.75 0.4</pos>
  <origin>0.5 0.5</origin>
  <maxSize>0.35 0.4</maxSize>
  <path>${game.media.imagepath}</path>
  <zIndex>30</zIndex>
</image>
PropertyTypeRole
pos size origin rotation rotationOriginpairplacement
maxSizepairmaximum size without distortion — see Position, size
keepratioyes/nokeep the proportions (⚠️ all lowercase)
pathpaththe image file
tileyes/norepeat the image as tiles instead of stretching it
colorcolortints the image (multiplication)
colorTop colorBottom colorLeft colorRightcolorgradient tint
colorTopLeft colorTopRight colorBottomLeft colorBottomRightcolorfour-corner tint
reflectionpaira reflection under the image: start and end opacity
zIndex disableddepth, switching off

Formats

PNG, JPG and SVG. SVG is recommended for logos: it stays sharp at every size.

Image size

An image larger than the screen does not look better: the machine loads it whole into memory, then shrinks it to draw it. On a Raspberry Pi, a handful of 4000-pixel backgrounds is enough to slow the theme down.

The right measure is that of the largest screen you target: 1920 pixels across in high definition, 640 on a cathode-ray screen or a handheld console.

The studio takes care of it by itself: an image you drop is brought down to 1920 pixels if it exceeds that, vector drawings are cleaned up, and a theme that covers a cathode-ray screen also receives a reduced copy of its images, filed under assets/images-480/. The view files of those screens point to it.

tile — the repeated texture

<image name="grille">
  <size>1 1</size>
  <path>${root}/data/arts/motif.png</path>
  <tile>true</tile>
</image>

The image keeps its original size and repeats to cover the box.

reflection

<reflection>0.5 0.0</reflection>

Adds a flipped reflection under the image, from 50% opacity at the top to 0% at the bottom.


video (15 properties)

<video name="md_video">
  <pos>0.75 0.4</pos>
  <origin>0.5 0.5</origin>
  <maxSize>0.35 0.3</maxSize>
  <delay>1500</delay>
  <loops>0</loops>
</video>

Same placement properties as image, plus:

PropertyTypeRole
delaynumbermilliseconds before the video starts (1000 = one second); without delay, 2000
loopsnumbernumber of plays; 0 = loop
animationstextthe appearance effect
linktexttie the playback to another component
reflectionpairreflection, as on image

video accepts neither tile nor the tint colors.

A delay of 1000 to 2000 (one to two seconds) prevents the video from firing on every game merely passed through while scrolling the list.