Centralize retained dialog close bindings
This commit is contained in:
@@ -74,4 +74,12 @@ void bind_legacy_popup_close_destroys_overlay(
|
||||
};
|
||||
}
|
||||
|
||||
template <class ButtonT>
|
||||
void bind_legacy_click_destroys_node(ButtonT& button, Node& target) noexcept
|
||||
{
|
||||
button.on_click = [&target](Node*) {
|
||||
target.destroy();
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace pp::panopainter
|
||||
|
||||
Reference in New Issue
Block a user