Initial commit
This commit is contained in:
17
third-party/mexui/Core/Control/Text.js
vendored
Normal file
17
third-party/mexui/Core/Control/Text.js
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
mexui.util.createControlConstructor('Text', false, function(window, x, y, w, h, text, styles)
|
||||
{
|
||||
mexui.Component.Control.call(this, window, x, y, w, h, this.linkControlStyles('Text', styles));
|
||||
|
||||
this.text = text;
|
||||
});
|
||||
|
||||
// default styles
|
||||
mexui.util.linkBaseControlStyles('Text', {});
|
||||
|
||||
// render
|
||||
mexui.Control.Text.prototype.render = function()
|
||||
{
|
||||
var pos = this.getScreenPosition();
|
||||
|
||||
mexui.native.drawText(pos, this.size, this.text, this.getStyles('main'));
|
||||
};
|
||||
Reference in New Issue
Block a user