Naming and reusing
A component's name, and how to create several at once.
Two things not to confuse
<image name="mon-fond">
imageis the component type: it decides what the component can do and which properties it accepts. It must be picked from the list of existing types — see The components. An invented type is ignored;nameis your label. It is free… unless you reuse one of the names reserved by Recalbox, in which case the component is wired to the engine — see The views and their components.
Two components with the same name in the same view are one: the second completes or replaces the first. It is intended — it is the overlay mechanism — but it is a source of errors when you name two backdrops “fond” without thinking.
Creating several components at once
<box name="bande1, bande2, bande3, bande4">
<size>0.01 1</size>
<color>FFFFFF20</color>
</box>
Four components, same properties. You still have to give each its own position further down:
<box name="bande1"><pos>0.90 0</pos></box>
<box name="bande2"><pos>0.92 0</pos></box>
Modifying without rewriting everything
Since the last one wins, it is enough to redeclare the single property that changes:
<include>${root}/views/base.xml</include>
<view name="system">
<box name="fond"><color>7C2E44</color></box> <!-- the rest is kept -->
</view>