JavaScript
function load()
{
//Initializing the library below by calling this initializeEngine()
initializeEngine();
//Once the library has been loaded you can use the simple features to create simple buttons and progress bars!
button("button0","Reset",155,0,50,100,function() {progressBars[0].value = 0;});
button("button1","Start",260,0,50,100,function() {if(buttons[1].text == "Start"){buttons[1].text = "Stop";myVar = setInterval(function() {progressBars[0].value += 1;if(progressBars[0].value>=100){clearInterval(myVar);buttons[1].text = "Start";}}, 50)}else{clearInterval(myVar);buttons[1].text = "Start";}});
button("button2","Enable Text",50,55,50,100,function() {if(buttons[2].text == "Enable Text"){progressBars[0].enableTxt = true;buttons[2].text = "Disable Text"}else{progressBars[0].enableTxt = false;buttons[2].text = "Enable Text"}});
button("button3","Square",155,55,50,100,function() {if(buttons[3].text == "Square"){progressBars[0].rounded = true;buttons[3].text = "Rounded"}else{progressBars[0].rounded = false;buttons[3].text = "Square"}});
button("button4","Info",260,55,50,100,function() {alert("Basic canvas library with simple buttons and progress bars should this project be continued?");});
progressBar("prog1",100,100,20,10,100,25,false,false);
button("button5","<",50,125,20,20,function() {prog1.height -= 1;label1.text = prog1.height;});
button("button5",">",110,125,20,20,function() {prog1.height += 1;label1.text = prog1.height;});
label("label1","Progress bar height", 50, 120, "10px arial", "black");
label("label1",prog1.height, 84, 140, "10px arial", "black");
}
//########################################//
//########################################//
//LIBRARY STUFF DON'T EDIT BELOW THIS LINE//
//########################################//
//########################################//
var canvas;
var ctx;
var buttons = [];
var progressBars = [];
var Labels = [];
//FPS counter
var fps = 30;
var now;
var then = Date.now();
var interval = 1000/fps;
var...