Making a Recalbox theme

45 pages · 8 sections
FRENESDE Show everything Create my theme

Combining several conditions

AND, OR, “not that”, and groups in parentheses.

One tag per condition

You pick a condition from the list, it becomes a tag. The little button in front says which way it counts:

On a tag already placed, that same button flips the direction; the ✕ removes it.

Groups

A group is a parenthesis. Inside, you say whether all the conditions are needed, or at least one. Between two groups, the same question arises: AND or OR.

Three spellings for the same operators

What you meanSignSpelled out
and&AND
or|OR
not!NOT

The two spellings mix, and case does not matter at all: if="crt AND !tate" equals if="crt & !tate".

⚠️ && and || do not work. Two signs in a row are a syntax error, and an expression in error is worth false: the component disappears with nothing saying so on screen.

Example: “on a CRT screen, and in arcade or in favorites” is written

crt & (arcade | favorite)

⚠️ The order of the groups matters

The machine reads left to right, with no precedence. a | b & c is worth (a | b) & c there, not a | (b & c). That is why the studio systematically adds the parentheses: what you read is exactly what the machine will understand.

Inside one group, on the other hand, the order does not matter at all: “not Full HD and arcade” says the same thing as “arcade and not Full HD”.

A condition is written in two places

The same condition, on the component itself or on a single one of its properties, does not say the same thing:

<image name="filtre" if="crt">…</image>      <!-- ① the component ONLY exists on a CRT -->

<text name="titre">                          <!-- ② the component always exists… -->
  <fontSize if="crt">0.09</fontSize>         <!--    …but its size changes on a CRT -->
  <fontSize if="!crt">0.05</fontSize>
</text>

① on the component: it appears, or it does not exist at all. ② on a property: the component is always there, only one of its values changes.

In the studio, it is the same button and the same window in both cases — what you build here serves there identically.