| 1607 | } |
| 1608 | |
| 1609 | void MainInterface::displayScriptPane(ScriptPanePtr& scriptPane, EntityId sourceEntity) { |
| 1610 | // keep any number of script panes open with null source entities |
| 1611 | if (sourceEntity != NullEntityId) |
| 1612 | m_interactionScriptPanes[sourceEntity] = scriptPane; |
| 1613 | |
| 1614 | PaneLayer layer = PaneLayer::Window; |
| 1615 | if (auto layerName = scriptPane->config().optString("paneLayer")) |
| 1616 | layer = PaneLayerNames.getLeft(*layerName); |
| 1617 | |
| 1618 | if (scriptPane->openWithInventory()) { |
| 1619 | bool closeWithInventory = scriptPane->closeWithInventory(); |
| 1620 | m_paneManager.displayPane(layer, scriptPane, [this, closeWithInventory](PanePtr const&) { |
| 1621 | if (closeWithInventory) |
| 1622 | m_paneManager.dismissRegisteredPane(MainInterfacePanes::Inventory); |
| 1623 | }); |
| 1624 | m_paneManager.displayRegisteredPane(MainInterfacePanes::Inventory); |
| 1625 | m_paneManager.bringPaneAdjacent(m_paneManager.registeredPane(MainInterfacePanes::Inventory), |
| 1626 | scriptPane, Root::singleton().assets()->json("/interface.config:bringAdjacentWindowGap").toFloat()); |
| 1627 | } else { |
| 1628 | m_paneManager.displayPane(layer, scriptPane); |
| 1629 | } |
| 1630 | } |
| 1631 | |
| 1632 | } |
nothing calls this directly
no test coverage detected