NEW:Add buried points at panel buttons

Change-Id: Idfdcd964b03ea06e832e9e7c2cfaac232212f518
This commit is contained in:
Kunlong Ma 2023-07-21 17:41:07 +08:00 committed by Lane.Wei
parent a321121acc
commit b3f519a0d4
5 changed files with 108 additions and 5 deletions

View file

@ -191,6 +191,9 @@ public:
virtual std::string get_tooltip() const { return ""; }
int get_count() { return ++count; }
std::string get_gizmo_name() { return on_get_name(); }
protected:
float last_input_window_width = 0;
virtual bool on_init() = 0;
@ -229,6 +232,7 @@ private:
// Flag for dirty visible state of Gizmo
// When True then need new rendering
bool m_dirty;
int count = 0;
};

View file

@ -983,6 +983,15 @@ bool GLGizmosManager::on_mouse(wxMouseEvent& evt)
update_data();
m_parent.set_as_dirty();
}
try {
std::string name = m_gizmos[m_hover]->get_gizmo_name();
int count = m_gizmos[m_hover]->get_count();
NetworkAgent* agent = GUI::wxGetApp().getAgent();
if (agent) {
agent->track_update_property(name, std::to_string(count));
}
}
catch (...) {}
}
else if (evt.MiddleDown()) {
m_mouse_capture.middle = true;