diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-30 00:41:38 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-30 00:41:38 +1000 |
commit | ffd1507f725582bd51fe3064263b14ecd7db5edf (patch) | |
tree | 23856a19c61f8da76f53753a1a81ffcba4f804e3 /source/frontend/StarBaseScriptPane.cpp | |
parent | 057f3727deb83a768a45ad3b91282166683e039d (diff) |
ScriptPanes can specify paneLayer and interactive
Diffstat (limited to 'source/frontend/StarBaseScriptPane.cpp')
-rw-r--r-- | source/frontend/StarBaseScriptPane.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/frontend/StarBaseScriptPane.cpp b/source/frontend/StarBaseScriptPane.cpp index 4164d9e..ca9a89c 100644 --- a/source/frontend/StarBaseScriptPane.cpp +++ b/source/frontend/StarBaseScriptPane.cpp @@ -24,7 +24,8 @@ BaseScriptPane::BaseScriptPane(Json config) : Pane(), m_rawConfig(config) { } else { m_config = assets->fetchJson(config); } - + + m_interactive = config.getBool("interactive", true); m_reader = make_shared<GuiReader>(); m_reader->registerCallback("close", [this](Widget*) { dismiss(); }); @@ -100,6 +101,8 @@ bool BaseScriptPane::sendEvent(InputEvent const& event) { Json const& BaseScriptPane::config() const { return m_config; } Json const& BaseScriptPane::rawConfig() const { return m_rawConfig; } +bool BaseScriptPane::interactive() const { return m_interactive; } + PanePtr BaseScriptPane::createTooltip(Vec2I const& screenPosition) { auto result = m_script.invoke<Json>("createTooltip", screenPosition); if (result && !result.value().isNull()) { |