Many improvements.

This commit is contained in:
Vortrex
2020-12-04 02:48:16 -06:00
parent a7cc0bce7c
commit 33f8c4615a
110 changed files with 3680 additions and 923 deletions

View File

@@ -0,0 +1,16 @@
mexui.util.createControlConstructor('PositiveInteger', false, function(window, x, y, w, h, text, styles, callback)
{
mexui.Control.TextInput.call(this, window, x, y, w, h, text, this.linkControlStyles('PositiveInteger', styles), callback, false, false);
});
mexui.util.extend(mexui.Control.PositiveInteger, mexui.Control.TextInput);
// model
mexui.Control.PositiveInteger.prototype.validateInputCallback = function(e, character)
{
return mexui.util.isPositiveIntChar(character);
};
mexui.Control.PositiveInteger.prototype.validateValueCallback = function(e)
{
return mexui.util.isPositiveInt(this.getText());
};