From ffd1507f725582bd51fe3064263b14ecd7db5edf Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Sun, 30 Jul 2023 00:41:38 +1000 Subject: ScriptPanes can specify paneLayer and interactive --- source/frontend/StarMainInterface.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/frontend/StarMainInterface.cpp') diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp index 1497b8b..591f43f 100644 --- a/source/frontend/StarMainInterface.cpp +++ b/source/frontend/StarMainInterface.cpp @@ -1565,8 +1565,12 @@ void MainInterface::displayScriptPane(ScriptPanePtr& scriptPane, EntityId source if (sourceEntity != NullEntityId) m_interactionScriptPanes[sourceEntity] = scriptPane; + PaneLayer layer = PaneLayer::Window; + if (auto layerName = scriptPane->config().optString("paneLayer")) + layer = PaneLayerNames.getLeft(*layerName); + if (scriptPane->openWithInventory()) { - m_paneManager.displayPane(PaneLayer::Window, scriptPane, [this](PanePtr const&) { + m_paneManager.displayPane(layer, scriptPane, [this](PanePtr const&) { if (auto player = m_client->mainPlayer()) player->clearSwap(); m_paneManager.dismissRegisteredPane(MainInterfacePanes::Inventory); @@ -1575,7 +1579,7 @@ void MainInterface::displayScriptPane(ScriptPanePtr& scriptPane, EntityId source m_paneManager.bringPaneAdjacent(m_paneManager.registeredPane(MainInterfacePanes::Inventory), scriptPane, Root::singleton().assets()->json("/interface.config:bringAdjacentWindowGap").toFloat()); } else { - m_paneManager.displayPane(PaneLayer::Window, scriptPane); + m_paneManager.displayPane(layer, scriptPane); } } -- cgit v1.2.3