Documentation ButtonMenu.js

This commit is contained in:
Erik Tiekstra
2017-06-12 12:35:52 +02:00
parent 46222e2726
commit 4c16bac5a4
+9
View File
@@ -47,6 +47,7 @@ function ButtonMenu(canvas, settings) {
}; };
/** /**
* Brings the buttons to the front inside the canvas
* @return {ButtonMenu} * @return {ButtonMenu}
*/ */
this.bringToFront = function() { this.bringToFront = function() {
@@ -57,6 +58,7 @@ function ButtonMenu(canvas, settings) {
}; };
/** /**
* Gets all buttons inside the menu.
* @return {Array} * @return {Array}
*/ */
this.getItems = function() { this.getItems = function() {
@@ -64,12 +66,16 @@ function ButtonMenu(canvas, settings) {
}; };
/** /**
* Gets the full width of the buttonMenu.
* @return {Number} * @return {Number}
*/ */
this.getWidth = function() { this.getWidth = function() {
return _width; return _width;
}; };
/**
* Hides the buttons
*/
this.hide = function() { this.hide = function() {
_textButtons.forEach(function(textButton) { _textButtons.forEach(function(textButton) {
textButton.set({ textButton.set({
@@ -79,6 +85,9 @@ function ButtonMenu(canvas, settings) {
}); });
} }
/**
* Shows all the buttons
*/
this.show = function() { this.show = function() {
_textButtons.forEach(function(textButton) { _textButtons.forEach(function(textButton) {
textButton.set({ textButton.set({