mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
widget: [API] separate state changes from Draggable.Layout to Update
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -93,7 +93,7 @@ func ExampleDraggable_Layout() {
|
||||
drag.Layout(gtx, w, w)
|
||||
// drag must respond with an Offer event when requested.
|
||||
// Use the drag method for this.
|
||||
if m, ok := drag.Requested(); ok {
|
||||
if m, ok := drag.Update(gtx); ok {
|
||||
drag.Offer(gtx.Ops, m, offer{Data: "hello world"})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user