28 wxBoxSizer *mainSizer =
new wxBoxSizer(wxVERTICAL);
32 new wxAuiNotebook(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_TOP | wxAUI_NB_TAB_FIXED_WIDTH);
33 m_notebook->SetBackgroundColour(wxColour(70, 70, 70));
40 m_nodePanel->SetBackgroundColour(wxColour(70, 70, 70));
44 wxPG_SPLITTER_AUTO_CENTER | wxPG_DEFAULT_STYLE);
53 wxBoxSizer *nodeSizer =
new wxBoxSizer(wxVERTICAL);
65 new wxListCtrl(
m_blackboardPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxLC_SINGLE_SEL);
76 wxBoxSizer *blackboardSizer =
new wxBoxSizer(wxVERTICAL);
79 wxStaticText *bbLabel =
80 new wxStaticText(
m_blackboardPanel, wxID_ANY,
"Blackboard entries available to selected node:");
81 bbLabel->SetForegroundColour(wxColour(200, 200, 200));
82 blackboardSizer->Add(bbLabel, 0, wxALL, 5);
90 mainSizer->Add(
m_notebook, 1, wxEXPAND | wxALL, 5);
93 wxStaticText *statusText =
new wxStaticText(
this, wxID_ANY,
"Select a node to view its properties");
94 statusText->SetForegroundColour(wxColour(150, 150, 150));
95 mainSizer->Add(statusText, 0, wxALIGN_CENTER | wxALL, 10);
182 auto nameProp =
new wxStringProperty(
"Name",
"name",
m_selectedNode->GetName());
183 nameProp->SetClientData(
reinterpret_cast<void *
>(
PROP_NODE_NAME));
187 auto idProp =
new wxUIntProperty(
"ID",
"id",
static_cast<unsigned int>(
m_selectedNode->GetId()));
188 idProp->SetClientData(
reinterpret_cast<void *
>(
PROP_NODE_ID));
189 idProp->ChangeFlag(wxPGPropertyFlags::ReadOnly,
true);
194 typeProp->SetClientData(
reinterpret_cast<void *
>(
PROP_NODE_TYPE));
195 typeProp->ChangeFlag(wxPGPropertyFlags::ReadOnly,
true);
199 wxArrayString statusChoices;
200 statusChoices.Add(
"Idle");
201 statusChoices.Add(
"Running");
202 statusChoices.Add(
"Success");
203 statusChoices.Add(
"Failure");
205 wxPGChoices statusPGChoices(statusChoices);
207 new wxEnumProperty(
"Status",
"status", statusPGChoices,
static_cast<int>(
m_selectedNode->GetStatus()));
215 auto childrenVisibleProp =
216 new wxBoolProperty(
"Children Visible",
"children_visible",
m_selectedNode->AreChildrenVisible());
301 wxPGProperty *prop =
event.GetProperty();
305 int propId =
reinterpret_cast<intptr_t
>(prop->GetClientData());
306 wxVariant value = prop->GetValue();
309 wxString::Format(
"Property changed: %s = %s", prop->GetName(), value.GetString()).ToStdString());
328 wxString attrName = prop->GetName();
329 m_selectedNode->SetAttribute(attrName.ToStdString(), value.GetString().ToStdString());
Represents a single entry in a behavior tree blackboard.
const EmberCore::String & GetValue() const
EmberCore::String GetTypeString() const
const EmberCore::String & GetKey() const
Main application window for EmberForge.