Making a Recalbox theme

45 pages · 8 sections
FRENESDE Show everything Create my theme

text, scrolltext, markdown

The three ways to display text.

text — regular text (18 properties)

<text name="titre">
  <pos>0.06 0.08</pos>
  <size>0.5 0.1</size>
  <text>${system}</text>
  <fontPath>${root}/data/fonts/Exo2.otf</fontPath>
  <fontSize>0.05</fontSize>
  <color>FFFFFF</color>
  <alignment>left</alignment>
  <forceUppercase>true</forceUppercase>
</text>
PropertyTypeRole
pos size origin rotation rotationOriginpairplacement — see Position, size, origin
texttextthe content, variables included
pathpathreads the content from a file, instead of text
fontPathpaththe font
fontSizenumber< 1 = screen-height ratio, >= 1 = pixels
fontStyletextnormal, bold, italic, bolditalic
colorcolorthe text color
backgroundColorcolora background behind the text
alignmenttextsee below
forceUppercaseyes/noall capitals
lineSpacingnumberline spacing, 1.2 by default
multilineyes/noallow line breaks
zIndexnumberdepth
disabledyes/noswitch the component off

alignment acts on two axes

The value combines the horizontal and the vertical.

Nine positions, thirteen ways to write them — four values are synonyms:

PositionTo writeSynonym
top-lefttopleft
top-centertopcentertop
top-righttopright
center-leftcenterleftleft
centercenter
center-rightcenterrightright
bottom-leftbottomleft
bottom-centerbottomcenterbottom
bottom-rightbottomright

⚠️ An unknown value does not keep the previous alignment: it falls back to center-left, the default value.

toplefttopcenter= toptoprightcenterleft= leftcentercenterright= rightbottomleftbottomcenter= bottombottomrightthe text sits inside its `size` box — without size, alignment has nothing to act on

The text is aligned within its size box: without size, the alignment has nothing to act on.


scrolltext — scrolling text (16 properties)

Same properties as text, without multiline and lineSpacing. The text scrolls horizontally when it overflows its box.

<scrolltext name="titre-long">
  <size>0.4 0.06</size>
  <text>${game.name}</text>
  <fontSize>0.04</fontSize>
</scrolltext>

To be reserved for values whose length you do not control — a game name, a developer.


markdown — formatted text (15 properties)

<markdown name="synopsis">
  <pos>0.06 0.5</pos>
  <size>0.4 0.35</size>
  <text>${game.synopsis}</text>
  <fontSize>0.028</fontSize>
  <color>C6CBD8</color>
</markdown>

Same properties as text, without fontStyle, backgroundColor or multiline.

It understands simple formatting in the text: **bold**, *italic*, # heading, dashed lists. Useful for a synopsis or an “about” page.

⚠️ markdown does not scroll: a text longer than its box is cut off.