Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarMainInterface.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2023-07-30 00:41:38 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2023-07-30 00:41:38 +1000
commitffd1507f725582bd51fe3064263b14ecd7db5edf (patch)
tree23856a19c61f8da76f53753a1a81ffcba4f804e3 /source/frontend/StarMainInterface.cpp
parent057f3727deb83a768a45ad3b91282166683e039d (diff)
ScriptPanes can specify paneLayer and interactive
Diffstat (limited to 'source/frontend/StarMainInterface.cpp')
-rw-r--r--source/frontend/StarMainInterface.cpp8
1 files changed, 6 insertions, 2 deletions
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);
}
}