displayRegisteredPane

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

View File

@ -23,6 +23,13 @@ LuaCallbacks LuaBindings::makeInterfaceCallbacks(MainInterface* mainInterface) {
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();
});