高级功能
建议在编写主题时使用--debug和--windowed开关启动EmulationStation。这样您就可以读取错误消息,而不必检查日志文件。如果指定了--debug,也可以使用Ctrl-R重新加载当前的游戏列表视图和系统视图。
<include>标记
您可以在主题文件中包含主题文件,类似于C中的include(尽管内部机制不同,但效果相同)。例子:
~/.emulationstation/all_themes.xml:
<theme>
<formatVersion>3</formatVersion>
<view name="detailed">
<text name="description">
<fontPath>./all_themes/myfont.ttf</fontPath>
<color>00FF00</color>
</text>
</view>
</theme>
~/.emulationstation/snes/theme.xml:
<theme>
<formatVersion>3</formatVersion>
<include>./../all_themes.xml</include>
<view name="detailed">
<text name="description">
<color>FF0000</color>
</text>
</view>
</theme>
Is equivalent to this snes/theme.xml:
<theme>
<formatVersion>3</formatVersion>
<view name="detailed">
<text name="description">
<fontPath>./all_themes/myfont.ttf</fontPath>
<color>FF0000</color>
</text>
</view>
</theme>
请注意,未指定的属性已合并(<fontPath>),snes/theme.xml可能会覆盖包含文件的值(<color>)。还要注意,包含的文件仍然需要<formatVersion>标记。
建议在编写主题时使用--debug和--windowed开关启动EmulationStation。这样您就可以读取错误消息,而不必检查日志文件。如果指定了--debug,也可以使用Ctrl-R重新加载当前的游戏列表视图和系统视图。
<include>标记
您可以在主题文件中包含主题文件,类似于C中的include(尽管内部机制不同,但效果相同)。例子:
~/.emulationstation/all_themes.xml:
<theme>
<formatVersion>3</formatVersion>
<view name="detailed">
<text name="description">
<fontPath>./all_themes/myfont.ttf</fontPath>
<color>00FF00</color>
</text>
</view>
</theme>
~/.emulationstation/snes/theme.xml:
<theme>
<formatVersion>3</formatVersion>
<include>./../all_themes.xml</include>
<view name="detailed">
<text name="description">
<color>FF0000</color>
</text>
</view>
</theme>
Is equivalent to this snes/theme.xml:
<theme>
<formatVersion>3</formatVersion>
<view name="detailed">
<text name="description">
<fontPath>./all_themes/myfont.ttf</fontPath>
<color>FF0000</color>
</text>
</view>
</theme>
请注意,未指定的属性已合并(<fontPath>),snes/theme.xml可能会覆盖包含文件的值(<color>)。还要注意,包含的文件仍然需要<formatVersion>标记。