Add support for config schema.

This commit is contained in:
Dario
2025-01-19 23:33:57 -03:00
committed by Mr-Wiseguy
parent a087731f96
commit 590273c070
6 changed files with 37 additions and 18 deletions
+2 -3
View File
@@ -1,14 +1,13 @@
#include "ui_elements.h"
#include "librecomp/config.hpp"
struct RecompElementConfig {
struct RecompCustomElement {
Rml::String tag;
std::unique_ptr<Rml::ElementInstancer> instancer;
};
#define CUSTOM_ELEMENT(s, e) { s, std::make_unique< Rml::ElementInstancerGeneric< e > >() }
static RecompElementConfig custom_elements[] = {
static RecompCustomElement custom_elements[] = {
CUSTOM_ELEMENT("recomp-mod-menu", recompui::ElementModMenu),
CUSTOM_ELEMENT("recomp-config-sub-menu", recompui::ElementConfigSubMenu),
};