MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / displayScriptPane

Method displayScriptPane

source/frontend/StarMainInterface.cpp:1609–1630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1607}
1608
1609void 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}

Callers

nothing calls this directly

Calls 13

singletonClass · 0.85
optStringMethod · 0.80
openWithInventoryMethod · 0.80
closeWithInventoryMethod · 0.80
displayPaneMethod · 0.80
dismissRegisteredPaneMethod · 0.80
displayRegisteredPaneMethod · 0.80
bringPaneAdjacentMethod · 0.80
registeredPaneMethod · 0.80
toFloatMethod · 0.80
jsonMethod · 0.80
assetsMethod · 0.80

Tested by

no test coverage detected