MexUI stuff
This commit is contained in:
6
third-party/mexui/Core/Control/Text.js
vendored
6
third-party/mexui/Core/Control/Text.js
vendored
@@ -1,7 +1,7 @@
|
||||
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;
|
||||
});
|
||||
|
||||
@@ -12,9 +12,9 @@ mexui.util.linkBaseControlStyles('Text', {});
|
||||
mexui.Control.Text.prototype.render = function()
|
||||
{
|
||||
var pos = this.getScreenPosition();
|
||||
|
||||
|
||||
mexui.native.drawText(pos, this.size, this.text, this.getStyles('main'));
|
||||
|
||||
|
||||
if(this.isFocused())
|
||||
mexui.native.drawRectangleBorder(mexui.util.subtractVec2(pos,new Vec2(2,2)), mexui.util.addVec2(this.size,new Vec2(3,3)), this.getStyles('focused'));
|
||||
};
|
||||
Reference in New Issue
Block a user