mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
feat: key pressed event interception & 'owner' input.add_callback third argument
This commit is contained in:
parent
7fce735ca1
commit
b9ff1db086
17 changed files with 192 additions and 63 deletions
|
|
@ -13,11 +13,15 @@ bool Menu::has(const std::string& name) {
|
|||
pageSuppliers.find(name) != pageSuppliers.end();
|
||||
}
|
||||
|
||||
void Menu::addPage(const std::string& name, const std::shared_ptr<UINode> &panel) {
|
||||
pages[name] = Page{name, panel};
|
||||
void Menu::addPage(const std::string& name, const std::shared_ptr<UINode>& panel) {
|
||||
pages[name] = Page {name, panel};
|
||||
}
|
||||
|
||||
void Menu::addSupplier(const std::string &name, const supplier<std::shared_ptr<UINode>> &pageSupplier) {
|
||||
void Menu::removePage(const std::string& name) {
|
||||
pages.erase(name);
|
||||
}
|
||||
|
||||
void Menu::addSupplier(const std::string& name, const supplier<std::shared_ptr<UINode>>& pageSupplier) {
|
||||
pageSuppliers[name] = pageSupplier;
|
||||
}
|
||||
|
||||
|
|
@ -89,6 +93,6 @@ void Menu::reset() {
|
|||
clearHistory();
|
||||
if (current.panel) {
|
||||
Container::remove(current.panel);
|
||||
current = Page{"", nullptr};
|
||||
current = Page {"", nullptr};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue