forge
Explore
Log in

Don't you dare go Hollow

A palette row can land on a lane

Browse files at this commit

a650264de5f7af8e420ef2b7131ac3f6f6f0d691Ahmet Kaan GümüşParent: 45b9182
  • feat
    • a palette row can land on a lane
Show full message
✨ feat(bench): a palette row can land on a lane

The drop-ghost work left this half undone: a caption dragged from the palette
previewed a landing and had nothing to land in. Wire place_sub on the bed so
the preview leads somewhere.
crates/app/src/ui/bench_stance.rsmodified+3 -0
@@ -723,6 +723,9 @@ fn lane_row(
723 },723 },
724 ))724 ))
725 .drag_over::<SubPick>(|d, _, _, _| d.bg(rgb(DARK_RAISED())))725 .drag_over::<SubPick>(|d, _, _, _| d.bg(rgb(DARK_RAISED())))
726+ .on_drop(cx.listener(move |this, drag: &SubPick, window, cx| {
727+ this.place_sub(drag.0, lane, window.mouse_position().x, cx);
728+ }))
726 .on_drag_move(cx.listener(729 .on_drag_move(cx.listener(
727 move |this, event: &DragMoveEvent<SubPick>, _, cx| {730 move |this, event: &DragMoveEvent<SubPick>, _, cx| {
728 if !event.bounds.contains(&event.event.position) {731 if !event.bounds.contains(&event.event.position) {