Fix parent datamodel issues, update callbacks

This commit is contained in:
Vulpovile
2025-04-08 08:04:32 -07:00
parent d854ddfdd4
commit a064697561
7 changed files with 48 additions and 13 deletions

View File

@@ -32,15 +32,16 @@ void BaseButtonInstance::onMouseClick()
{
if(callback != NULL)
{
callback(this->getParentDataModel(), this, NULL, NULL);
ActionParam param = {
this->getParentDataModel(),
this,
this->actionCode
};
callback(param);
}
// if(listener != NULL)
// {
// listener->onButton1MouseClick(this);
// }
}
void BaseButtonInstance::setCallback(void (*callback)(DataModelInstance * theDatamodel, BaseButtonInstance * theCaller, WPARAM wParam, LPARAM lParam))
void BaseButtonInstance::setCallback(void (*callback)(const ActionParam &actionParam))
{
this->callback = callback;
}