Skip to content

fix: Update framed methods to return InnerResponse<R>#45

Merged
mitchmindtree merged 2 commits intonannou-org:mainfrom
mitchmindtree:node-response
Jan 19, 2026
Merged

fix: Update framed methods to return InnerResponse<R>#45
mitchmindtree merged 2 commits intonannou-org:mainfrom
mitchmindtree:node-response

Conversation

@mitchmindtree
Copy link
Member

Changes NodeCtx::framed() and framed_with() to return egui::InnerResponse<R> instead of egui::Response, allowing content closures to return values that can be accessed by callers.

Updates NodeResponse to be generic over the content's return type R and wraps InnerResponse<R> internally. Adds inner() and inner_mut() methods for accessing the returned value.

This enables node implementations to return responses from UI widgets (e.g., button clicks, text edits) while still maintaining proper framing and interaction handling.

@mitchmindtree mitchmindtree self-assigned this Jan 19, 2026
Changes `NodeCtx::framed()` and `framed_with()` to return
`egui::InnerResponse<R>` instead of `egui::Response`, allowing content
closures to return values that can be accessed by callers.

Updates `NodeResponse` to be generic over the content's return type `R`
and wraps `InnerResponse<R>` internally. Adds `inner()` and
`inner_mut()` methods for accessing the returned value.

This enables node implementations to return responses from UI widgets
(e.g., button clicks, text edits) while still maintaining proper framing
and interaction handling.
@mitchmindtree mitchmindtree merged commit a5f4a15 into nannou-org:main Jan 19, 2026
7 checks passed
@mitchmindtree mitchmindtree deleted the node-response branch January 19, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants