Add global access for selected game object on 24-08-24

This commit is contained in:
2024-08-28 11:56:30 -04:00
parent 8db3a552d6
commit 915397b28f
4 changed files with 9 additions and 0 deletions

View File

@@ -5,6 +5,10 @@ games::Game::Game(std::string name) {
this->name = name;
}
const char *games::Game::title() {
return this->name.c_str();
}
void games::Game::attach() {
log_info("game", "attach: {}", name);
}

View File

@@ -15,6 +15,7 @@ namespace games {
// where the main magic will happen
virtual void attach();
virtual const char *title();
// optional
virtual void pre_attach();