diff --git a/scripts/modules/brush.js b/scripts/modules/brush.js index 9d83514..b45eb2f 100644 --- a/scripts/modules/brush.js +++ b/scripts/modules/brush.js @@ -64,6 +64,14 @@ function Brush(rune) this.widget_cursor = function() { + + var s = "> "+this.size+"
"; + + for (i = 0; i < ronin.brush.pointers.length; i++) { + s += ronin.brush.pointers[i].widget(); + } + return s; + return this.pointers.length > 0 ? "Brush "+this.size+", "+this.pointers.length+" pointers" : "No Pointers"; } diff --git a/scripts/modules/brush.pointer.js b/scripts/modules/brush.pointer.js index 9f030a4..f48f6de 100644 --- a/scripts/modules/brush.pointer.js +++ b/scripts/modules/brush.pointer.js @@ -90,4 +90,9 @@ function Pointer(offset = new Position(), color = new Color('000000')) { this.position_prev = null; } + + this.widget = function() + { + return this.offset.render()+"
"; + } } \ No newline at end of file diff --git a/scripts/modules/surface.js b/scripts/modules/surface.js index c75d614..06623cb 100644 --- a/scripts/modules/surface.js +++ b/scripts/modules/surface.js @@ -83,12 +83,12 @@ function Surface(rune) { if(!this.active_layer){ return ""; } - var s = ""; + var s = "# "+this.size.render()+"
"; Object.keys(ronin.surface.layers).forEach(function (key) { s += ronin.surface.layers[key].widget(); }); - return s; // "# "+this.active_layer.name; + return s; } this.widget_cursor = function() diff --git a/scripts/modules/surface.layer.js b/scripts/modules/surface.layer.js index 16c528e..97a771b 100644 --- a/scripts/modules/surface.layer.js +++ b/scripts/modules/surface.layer.js @@ -55,7 +55,7 @@ function Layer(name,host = "user") this.widget = function() { - return "# "+this.name+"
"; + return (ronin.surface.active_layer.name == this.name) ? "- ("+this.name+")
" : "- "+this.name+"
"; } this.move_from = null;