mirror of
https://github.com/lospec/pixel-editor.git
synced 2023-08-10 21:12:51 +03:00
Finished tooltorials
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
/** TODO
|
||||
* - Increase the sensibility of the tool depending on the width / height ratio to avoid holes
|
||||
*/
|
||||
class EllipseTool extends ResizableTool {
|
||||
// Saving the empty rect svg
|
||||
emptyEllipseSVG = document.getElementById("ellipse-empty-button-svg");
|
||||
|
@ -6,6 +6,15 @@ class EyeDropperTool extends Tool {
|
||||
super(name, options);
|
||||
|
||||
Events.on('click', this.mainButton, switchFunction, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Eyedropper tool");
|
||||
this.addTutorialKey("E", " to select the lasso selection tool");
|
||||
this.addTutorialKey("Left drag", " to preview the picked colour");
|
||||
this.addTutorialKey("Aòt + left drag", " to preview the picked colour");
|
||||
this.addTutorialKey("Left click", " to select a colour");
|
||||
this.addTutorialKey("Alt + click", " to select a colour");
|
||||
this.addTutorialImg("eyedropper-tutorial.gif");
|
||||
}
|
||||
|
||||
onStart(mousePos, target) {
|
||||
|
@ -3,6 +3,12 @@ class FillTool extends DrawingTool {
|
||||
super(name, options);
|
||||
|
||||
Events.on('click', this.mainButton, switchFunction, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Fill tool");
|
||||
this.addTutorialKey("F", " to select the fill tool");
|
||||
this.addTutorialKey("Left click", " to fill a contiguous area");
|
||||
this.addTutorialImg("fill-tutorial.gif");
|
||||
}
|
||||
|
||||
onStart(mousePos, target) {
|
||||
|
@ -1,9 +1,24 @@
|
||||
/** TODO
|
||||
* - Move the selection only if the user started dragging inside of it
|
||||
*/
|
||||
class LassoSelectionTool extends SelectionTool {
|
||||
currentPixels = [];
|
||||
|
||||
constructor (name, options, switchFunc, moveTool) {
|
||||
super(name, options, switchFunc, moveTool);
|
||||
Events.on('click', this.mainButton, switchFunc, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Lasso selection tool");
|
||||
this.addTutorialKey("Q", " to select the lasso selection tool");
|
||||
this.addTutorialKey("Left drag", " to select an area");
|
||||
this.addTutorialKey("Left drag", " to move a selection");
|
||||
this.addTutorialKey("Esc", " to cancel a selection")
|
||||
this.addTutorialKey("Click", " outside the selection to cancel it")
|
||||
this.addTutorialKey("CTRL+C", " to copy a selection")
|
||||
this.addTutorialKey("CTRL+V", " to paste a selection")
|
||||
this.addTutorialKey("CTRL+X", " to cut a selection")
|
||||
this.addTutorialImg("lassoselect-tutorial.gif");
|
||||
}
|
||||
|
||||
onStart(mousePos, mouseTarget) {
|
||||
|
@ -3,6 +3,17 @@ class MagicWandTool extends SelectionTool {
|
||||
constructor (name, options, switchFunc, moveTool) {
|
||||
super(name, options, switchFunc, moveTool);
|
||||
Events.on('click', this.mainButton, switchFunc, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Magic wand tool");
|
||||
this.addTutorialKey("W", " to select the magic wand tool");
|
||||
this.addTutorialKey("Left click", " to select a contiguous area");
|
||||
this.addTutorialKey("Esc", " to cancel a selection");
|
||||
this.addTutorialKey("Click", " outside the selection to cancel it");
|
||||
this.addTutorialKey("CTRL+C", " to copy a selection");
|
||||
this.addTutorialKey("CTRL+V", " to paste a selection");
|
||||
this.addTutorialKey("CTRL+X", " to cut a selection");
|
||||
this.addTutorialImg("magicwand-tutorial.gif");
|
||||
}
|
||||
|
||||
onEnd(mousePos, mouseTarget) {
|
||||
|
@ -4,6 +4,13 @@ class PanTool extends Tool {
|
||||
super(name, options);
|
||||
|
||||
Events.on('click', this.mainButton, switchFunction, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Pan tool");
|
||||
this.addTutorialKey("P", " to select the lasso selection tool");
|
||||
this.addTutorialKey("Left drag", " to move the viewport");
|
||||
this.addTutorialKey("Space + drag", " to move the viewport");
|
||||
this.addTutorialImg("pan-tutorial.gif");
|
||||
}
|
||||
|
||||
onStart(mousePos, target) {
|
||||
|
@ -3,6 +3,18 @@ class RectangularSelectionTool extends SelectionTool {
|
||||
constructor (name, options, switchFunc, moveTool) {
|
||||
super(name, options, switchFunc, moveTool);
|
||||
Events.on('click', this.mainButton, switchFunc, this);
|
||||
|
||||
this.resetTutorial();
|
||||
this.addTutorialTitle("Rectangular selection tool");
|
||||
this.addTutorialKey("M", " to select the rectangular selection tool");
|
||||
this.addTutorialKey("Left drag", " to select a rectangular area");
|
||||
this.addTutorialKey("Left drag", " to move a selection");
|
||||
this.addTutorialKey("Esc", " to cancel a selection");
|
||||
this.addTutorialKey("Click", " outside the selection to cancel it");
|
||||
this.addTutorialKey("CTRL+C", " to copy a selection");
|
||||
this.addTutorialKey("CTRL+V", " to paste a selection");
|
||||
this.addTutorialKey("CTRL+X", " to cut a selection");
|
||||
this.addTutorialImg("rectselect-tutorial.gif");
|
||||
}
|
||||
|
||||
onStart(mousePos, mouseTarget) {
|
||||
|
Reference in New Issue
Block a user