Revert "Update xml"

This reverts commit 9b8d1f2257.
This commit is contained in:
Vortrex
2021-01-26 04:16:05 -06:00
parent 9b8d1f2257
commit caa6b3986f
190 changed files with 5046 additions and 83 deletions

View File

@@ -0,0 +1,24 @@
mexui.util.createControlConstructor('RangedInteger', false, function(window, x, y, w, h, min, max, text, styles, callback)
{
mexui.Control.TextInput.call(this, window, x, y, w, h, text, this.linkControlStyles('RangedInteger', styles), callback, false, false);
this.min = min === undefined ? 0 : min;
this.max = max === undefined ? 100 : max;
});
mexui.util.extend(mexui.Control.RangedInteger, mexui.Control.TextInput);
// model
mexui.Control.RangedInteger.prototype.validateInputCallback = function(e, character)
{
return mexui.util.isIntChar(character);
};
mexui.Control.RangedInteger.prototype.validateValueCallback = function(e)
{
var text = this.getText();
if(!mexui.util.isInt(text))
return false;
var _int = parseInt(text);
return _int >= this.min && _int <= this.max;
};