mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 08:59:35 +01:00
Add selection for property display
This commit is contained in:
parent
600a80d529
commit
fc37a9ffa1
3 changed files with 27 additions and 4 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -21,4 +21,4 @@
|
|||
url = https://github.com/santaclose/ImGuiColorTextEdit
|
||||
[submodule "story-editor/externals/ImNodeFlow"]
|
||||
path = story-editor/externals/ImNodeFlow
|
||||
url = https://github.com/Fattorino/ImNodeFlow
|
||||
url = https://github.com/arabine/ImNodeFlow
|
||||
|
|
|
|||
2
story-editor/externals/ImNodeFlow
vendored
2
story-editor/externals/ImNodeFlow
vendored
|
|
@ -1 +1 @@
|
|||
Subproject commit 9eb4094aa9e5b2a826078b4371aa61318e4062a2
|
||||
Subproject commit 1d06616de63ab497f18e9403b128b6eccef3115d
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<BaseNodeWidget> Widget() {
|
||||
std::shared_ptr<BaseNodeWidget> GetWidget() {
|
||||
return m_widget;
|
||||
}
|
||||
|
||||
|
|
@ -114,7 +114,7 @@ struct NodeEditorPage : public ImFlow::BaseNode
|
|||
|
||||
if (delegate == nullptr)
|
||||
continue;
|
||||
nlist.push_back(delegate->Widget());
|
||||
nlist.push_back(delegate->GetWidget());
|
||||
}
|
||||
|
||||
return nlist;
|
||||
|
|
@ -211,6 +211,29 @@ struct NodeEditorPage : public ImFlow::BaseNode
|
|||
|
||||
std::shared_ptr<BaseNodeWidget> selected;
|
||||
|
||||
updatePublicStatus();
|
||||
|
||||
// if (mINF.on_selected_node())
|
||||
{
|
||||
// Loop all nodes, get first selected
|
||||
for (auto &node : mINF.getNodes())
|
||||
{
|
||||
if (node.second->isSelected())
|
||||
{
|
||||
// cast to delegate
|
||||
auto delegate = dynamic_cast<NodeDelegate*>(node.second.get());
|
||||
if (delegate)
|
||||
{
|
||||
//get widget
|
||||
selected = delegate->GetWidget();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if (ed::GetSelectedObjectCount() > 0)
|
||||
// {
|
||||
// ed::NodeId nId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue