forked from Clones/Controlify
improve controller snapping
This commit is contained in:
@ -31,7 +31,7 @@ public abstract class AbstractContainerScreenMixin<T extends AbstractContainerMe
|
||||
@Override
|
||||
public Set<SnapPoint> getSnapPoints() {
|
||||
return getMenu().slots.stream()
|
||||
.map(slot -> new SnapPoint(new Vector2i(leftPos + slot.x + 8, topPos + slot.y + 8), 24))
|
||||
.map(slot -> new SnapPoint(new Vector2i(leftPos + slot.x + 8, topPos + slot.y + 8), 14))
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ public abstract class CreativeModeInventoryScreenMixin extends AbstractContainer
|
||||
int x = leftPos + getTabX(tab);
|
||||
int y = topPos + (topRow ? -28 : imageHeight - 4);
|
||||
|
||||
points.add(new SnapPoint(new Vector2i(x + 13, y + 16), 38));
|
||||
points.add(new SnapPoint(new Vector2i(x + 13, y + 16), 18));
|
||||
}
|
||||
|
||||
if (canScroll()) {
|
||||
|
@ -24,7 +24,7 @@ public abstract class ScreenMixin implements ISnapBehaviour {
|
||||
.map(AbstractWidget.class::cast)
|
||||
.map(widget -> new SnapPoint(
|
||||
new Vector2i(widget.getX() + widget.getWidth() / 2, widget.getY() + widget.getHeight() / 2),
|
||||
Math.min(widget.getWidth(), widget.getHeight()) + 5
|
||||
Math.min(widget.getWidth(), widget.getHeight()) / 2 + 10
|
||||
))
|
||||
.collect(Collectors.toSet());
|
||||
}
|
||||
|
Reference in New Issue
Block a user