11 m_panel =
new wxPanel(parent, wxID_ANY);
12 m_panel->SetBackgroundColour(wxColour(45, 45, 50));
18 if (loadInCurrentScene) {
40 wxBoxSizer *sizer =
new wxBoxSizer(wxVERTICAL);
83 auto behaviorTree = std::make_shared<EmberCore::BehaviorTree>(
"Scene Tree");
85 m_treeAdapter = std::make_shared<EmberCore::DirectTreeAdapter>(behaviorTree);
87 "Using DirectTreeAdapter with BehaviorTree wrapper: " + std::string(
m_behaviorTreeRoot->GetName()));
97 LOG_INFO(
"Scene",
"Behavior tree updated with shared root node: " +
110 LOG_INFO(
"Scene",
"Behavior tree updated with abstracted tree: " + std::string(tree ? tree->GetName() :
"null"));
118 auto behaviorTree = std::make_shared<EmberCore::BehaviorTree>(
"Sample Tree");
120 m_treeAdapter = std::make_shared<EmberCore::DirectTreeAdapter>(behaviorTree);
121 LOG_INFO(
"Scene",
"Using DirectTreeAdapter with BehaviorTree wrapper for sample tree: " +
131 LOG_INFO(
"Scene",
"Created sample behavior tree with " +
140 m_panel->SetBackgroundColour(color);
#define LOG_INFO(category, message)
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 the scene becomes inactive.
void CreateSampleBehaviorTree()
Create a sample behavior tree for testing/demo purposes.
std::shared_ptr< EmberCore::Node > m_behaviorTreeRoot
void Refresh() override
Refreshes the scene content.
virtual ~BehaviorTreeScene()
void OnActivated() override
Called when the scene becomes active.
void SetTitle(const wxString &title)
Set the title of this scene.
void SetCanvasBackgroundColor(const wxColour &color)
Set the canvas background color.
void SetBehaviorTree(std::shared_ptr< EmberCore::Node > root)
Set the behavior tree for this scene using legacy Node interface.
EmberForge::ForgeTreeCanvas * m_treeVisualization
bool Save() override
Saves the scene content; returns true on success.
Abstract interface for tree nodes that can be visualized.
static std::unique_ptr< Node > CreateSampleTree()
File drop target for XML files.
Main application window for EmberForge.
void LoadXMLFile(const wxString &filePath, bool confirmOverride=false)
void LoadXMLFileInNewScene(const wxString &filePath)