Centralize retained message dialog close callbacks

This commit is contained in:
2026-06-12 15:32:28 +02:00
parent d60f4d30e2
commit 14ccf67acd
5 changed files with 17 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
#include "pch.h"
#include "log.h"
#include "legacy_ui_overlay_services.h"
#include "node_input_box.h"
#include "layout.h"
@@ -24,7 +25,7 @@ void NodeInputBox::init()
on_submit(this, m_field_text->m_text);
};
btn_cancel = find<NodeButton>("btn-cancel");
btn_cancel->on_click = [&](Node*) { destroy(); };
pp::panopainter::bind_legacy_click_destroys_node(*btn_cancel, *this);
m_capture_children = false; // don't capture children events on mouse_capture
}