10 m_panel =
new wxPanel(parent, wxID_ANY);
11 m_panel->SetBackgroundColour(wxColour(45, 45, 50));
17 if (loadInCurrentScene) {
36 wxBoxSizer *sizer =
new wxBoxSizer(wxVERTICAL);
79 auto behaviorTree = std::make_shared<EmberCore::BehaviorTree>(
"Scene Tree");
81 m_treeAdapter = std::make_shared<EmberCore::DirectTreeAdapter>(behaviorTree);
82 wxLogMessage(
"Using DirectTreeAdapter with BehaviorTree wrapper: %s",
m_behaviorTreeRoot->GetName());
92 wxLogMessage(
"Behavior tree updated with shared root node: %s",
105 wxLogMessage(
"Behavior tree updated with abstracted tree: %s", tree ? tree->GetName() :
"null");
113 auto behaviorTree = std::make_shared<EmberCore::BehaviorTree>(
"Sample Tree");
115 m_treeAdapter = std::make_shared<EmberCore::DirectTreeAdapter>(behaviorTree);
116 wxLogMessage(
"Using DirectTreeAdapter with BehaviorTree wrapper for sample tree: %s",
126 wxLogMessage(
"Created sample behavior tree with %lu nodes",
134 m_panel->SetBackgroundColour(color);
NodeSelectionCallback m_nodeSelectionCallback
BehaviorTreeScene(wxWindow *parent, const wxString &title="Behavior Tree")
Construct a new BehaviorTreeScene.
std::shared_ptr< EmberCore::ITreeStructure > m_treeAdapter
void OnDeactivated() override
Called when this scene is no longer the active tab.
void CreateSampleBehaviorTree()
Create a sample behavior tree for testing/demo purposes.
std::shared_ptr< EmberCore::Node > m_behaviorTreeRoot
void Refresh() override
Called when the scene should refresh its display.
virtual ~BehaviorTreeScene()
void OnActivated() override
Called when this scene becomes the active tab.
void SetTitle(const wxString &title)
Set the title of this scene.
void SetCanvasBackgroundColor(const wxColour &color)
Set the canvas background color.
EmberCore::TreeVisualization * m_treeVisualization
void SetBehaviorTree(std::shared_ptr< EmberCore::Node > root)
Set the behavior tree for this scene using legacy Node interface.
bool Save() override
Save the scene (if applicable)
Abstract interface for tree nodes that can be visualized.
static std::unique_ptr< Node > CreateSampleTree()
Tree visualization panel that renders behavior trees in a grid-based layout.
File drop target for XML files.
Main application window for EmberForge.
void LoadXMLFile(const wxString &filePath, bool confirmOverride=false)
void LoadXMLFileInNewScene(const wxString &filePath)