Can now add scoped rcss files

This commit is contained in:
2026-07-12 21:45:57 -05:00
parent 017776a7f3
commit f5e1557261
10 changed files with 48 additions and 15 deletions

View File

@@ -96,18 +96,18 @@ int main() {
std::cout << "Loading UI...\n";
app->RegisterPage<TestPagePage>("testPage");
app->RegisterPage<TestPagePage>("test-page");
app->SetupListeners([](Rml::ElementDocument *doc) {
if (auto *btn = doc->GetElementById("nav-test")) {
app->RegisterListener(btn, std::make_unique<ButtonClickListener>([](Rml::Event&){
app->NavigateTo("testPage");
app->NavigateTo("test-page");
}));
}
if (auto *btn = doc->GetElementById("nav-about")) {
if (auto *btn = doc->GetElementById("nav-home")) {
app->RegisterListener(btn, std::make_unique<ButtonClickListener>([](Rml::Event&){
app->NavigateTo("about");
app->NavigateTo("home");
}));
}
});