displayRegisteredPane

This commit is contained in:
Zithia Satazaki 2023-10-31 00:31:53 -04:00
parent 8122cc3e7f
commit 00eeb4a809

View File

@ -22,6 +22,13 @@ LuaCallbacks LuaBindings::makeInterfaceCallbacks(MainInterface* mainInterface) {
return pane->makePaneCallbacks();
return {};
});
callbacks.registerCallback("displayRegisteredPane", [mainInterface](String const& registeredPaneName) {
auto pane = MainInterfacePanesNames.getLeft(registeredPaneName);
auto paneManager = mainInterface->paneManager();
if (paneManager->maybeRegisteredPane(pane))
paneManager->displayRegisteredPane(pane);
});
callbacks.registerCallback("scale", [mainInterface]() -> int {
return GuiContext::singleton().interfaceScale();