Can now add scoped rcss files
This commit is contained in:
@@ -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");
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user