Initial commit
This commit is contained in:
11
third-party/mexui/Core/Control/Number.js
vendored
Normal file
11
third-party/mexui/Core/Control/Number.js
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
mexui.util.createControlConstructor('Number', false, function(window, x, y, w, h, text, styles, callback)
|
||||
{
|
||||
mexui.Control.TextInput.call(this, window, x, y, w, h, text, this.linkControlStyles('Number', styles), callback, false, false);
|
||||
});
|
||||
mexui.util.extend(mexui.Control.Number, mexui.Control.TextInput);
|
||||
|
||||
// model
|
||||
mexui.Control.Number.prototype.validateInputCallback = function(e, character)
|
||||
{
|
||||
return !isNaN(parseFloat(this.getTextWithNewCharacter(character)));
|
||||
};
|
||||
Reference in New Issue
Block a user