| 52 | } |
| 53 | |
| 54 | WidgetConstructResult GuiReader::paneFeatureHandler(String const&, Json const& config) { |
| 55 | if (m_pane) { |
| 56 | m_pane->setAnchor(PaneAnchorNames.getLeft(config.getString("anchor", "None"))); |
| 57 | if (config.contains("offset")) |
| 58 | m_pane->setAnchorOffset(jsonToVec2I(config.get("offset"))); |
| 59 | if (config.getBool("positionLocked", false)) |
| 60 | m_pane->lockPosition(); |
| 61 | } else { |
| 62 | throw StarException("Only Pane controls support the 'panefeature' command"); |
| 63 | } |
| 64 | |
| 65 | return {}; |
| 66 | } |
| 67 | |
| 68 | WidgetConstructResult GuiReader::backgroundHandler(String const&, Json const& config) { |
| 69 | if (m_pane) { |
nothing calls this directly
no test coverage detected