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

@@ -28,10 +28,13 @@ mexui.util.linkBaseControlStyles('Tree', {
// input
mexui.Control.Tree.prototype.onMouseDown = function(e)
{
var pos = this.getScreenPosition();
pos.y -= this.axis.y.getScrolledOffset();
this.testRowClick(e, this.axis.y.entries, pos);
if(e.button == 0)
{
var pos = this.getScreenPosition();
pos.y -= this.axis.y.getScrolledOffset();
this.testRowClick(e, this.axis.y.entries, pos);
}
if(!e.used)
mexui.Entity.ControlWithEntries.prototype.onMouseDown.call(this, e);
@@ -44,6 +47,9 @@ mexui.Control.Tree.prototype.render = function()
pos.y -= this.axis.y.getScrolledOffset();
this.renderRows(this.axis.y.entries, 0, pos);
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'));
};
mexui.Control.Tree.prototype.renderRows = function(rows, level, pos)