Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defined Snapping Points #1

Open
Vorlias opened this issue Feb 26, 2020 · 0 comments
Open

Defined Snapping Points #1

Vorlias opened this issue Feb 26, 2020 · 0 comments
Labels
idea Ideas

Comments

@Vorlias
Copy link
Member

Vorlias commented Feb 26, 2020

The idea here is that the GUI can snap to certain predefined points defined by the user on the screen - e.g. left side, centre or right side of the screen.

Using the v2 API, it could be something like:

const controller = Snapdragon.createDragController(gui, options, {
   // ... other snap options
   SnapPoints: [
      // ... Array of snap points
   ]
});

// Also
controller.SetSnapPoints([
   // Array of snap points
]);

A snap point could be an interface like such:

interface SnapPoint {
   Position: UDim2; // The position of this snap point
   Anchor: Vector2 | undefined; // The anchor (center) of the GUI's relative snap point
}

Maybe could be other behaviours to it, like snap margins as well.

@Vorlias Vorlias added the idea Ideas label Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Ideas
Projects
None yet
Development

No branches or pull requests

1 participant