Support for control bindings with user-defined values (eg, for Keyboard "test" button)

This commit is contained in:
Jeff Parsons 2016-02-02 10:21:45 -08:00
commit 4ab2c21043
32 changed files with 2374 additions and 2253 deletions

View file

@ -2947,15 +2947,16 @@ X86CPU.prototype.checkIOPM = function(port, nPorts, fInput)
};
/**
* setBinding(sHTMLType, sBinding, control)
* setBinding(sHTMLType, sBinding, control, sValue)
*
* @this {X86CPU}
* @param {string|null} sHTMLType is the type of the HTML control (eg, "button", "list", "text", "submit", "textarea", "canvas")
* @param {string} sBinding is the value of the 'binding' parameter stored in the HTML control's "data-value" attribute (eg, "AX")
* @param {Object} control is the HTML control DOM object (eg, HTMLButtonElement)
* @param {string} [sValue] optional data value
* @return {boolean} true if binding was successful, false if unrecognized binding request
*/
X86CPU.prototype.setBinding = function(sHTMLType, sBinding, control)
X86CPU.prototype.setBinding = function(sHTMLType, sBinding, control, sValue)
{
var fBound = false;
switch (sBinding) {