Add callback handling to MexUI Image control
This commit is contained in:
10
third-party/mexui/Core/Control/Image.js
vendored
10
third-party/mexui/Core/Control/Image.js
vendored
@@ -17,4 +17,14 @@ mexui.Control.Image.prototype.render = function()
|
||||
|
||||
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'));
|
||||
};
|
||||
|
||||
// input
|
||||
mexui.Control.Image.prototype.onMouseDown = function(e)
|
||||
{
|
||||
if(e.button == 0 && this.isCursorOverControl())
|
||||
{
|
||||
e.used = true;
|
||||
this.checkToCallCallback();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user