ugsChordBuilder.editorUi Class
Doing
Constructor
ugsChordBuilder.editorUi
()
Item Index
Methods
Attributes
Methods
Returns:
convertDots
-
startingFret
-
builderDots
Converts standard scriptasaurus Dot array to chordBuilder dot array (fret changes)
Parameters:
-
startingFret
Int -
builderDots
Array
Returns:
findMaxFret
-
dots
Loops over dots to find the largest fret value
Parameters:
-
dots
Array
Returns:
Returns:
Returns:
Returns:
init
()
Bool
Returns FALSE if canvas is not supported
Returns:
Returns:
Returns:
Needs to watch for closed chords!
Returns:
Returns:
Returns:
Yet another poor man's jQuery envying add/remove CSS class method.
Returns:
Returns:
onCancelClick
()
Cancel button's click event handler
onSaveClick
()
Save button's click event handler
reset
-
name
-
startingFret
-
dots
-
isNew
Does a complete UI reset (if no values provided in params), otherwise this is kinda a "set"
Parameters:
-
name
StringChord name
-
startingFret
Int -
dots
Array -
isNew
BoolUsed to set the button text
resetCurrentTool
()
Updates the Toolbox's current tool to be "Add Dot"; sets properties required for cursor, etc.
resetInputs
-
name
-
startingFret
-
isNew
Updates the "standard form-like inputs"
Parameters:
-
name
String -
startingFret
Int -
isNew
Bool
Returns:
setChord
-
chord
DANGER!! this is really a public method! A reference to this is passed to the scrapper during its initialization. Used to load ths Chord Builder
Parameters:
-
chord
Chord
updateFinger
()
Void
private
Successively clicking the Finger tool cycles through index to pinky, then none, and so on. This method automatically increments the "currently active finger" (odd sentence, that) and updates the toolbox UI. Note: changing the cursor is not handled here.