Improved widgets
This commit is contained in:
parent
0f2a6cdcd9
commit
882d339407
@ -64,6 +64,14 @@ function Brush(rune)
|
|||||||
|
|
||||||
this.widget_cursor = function()
|
this.widget_cursor = function()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var s = "> "+this.size+"<br />";
|
||||||
|
|
||||||
|
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";
|
return this.pointers.length > 0 ? "Brush "+this.size+", "+this.pointers.length+" pointers" : "No Pointers";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,4 +90,9 @@ function Pointer(offset = new Position(), color = new Color('000000'))
|
|||||||
{
|
{
|
||||||
this.position_prev = null;
|
this.position_prev = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.widget = function()
|
||||||
|
{
|
||||||
|
return this.offset.render()+"<br />";
|
||||||
|
}
|
||||||
}
|
}
|
@ -83,12 +83,12 @@ function Surface(rune)
|
|||||||
{
|
{
|
||||||
if(!this.active_layer){ return ""; }
|
if(!this.active_layer){ return ""; }
|
||||||
|
|
||||||
var s = "";
|
var s = "# "+this.size.render()+"<br />";
|
||||||
|
|
||||||
Object.keys(ronin.surface.layers).forEach(function (key) {
|
Object.keys(ronin.surface.layers).forEach(function (key) {
|
||||||
s += ronin.surface.layers[key].widget();
|
s += ronin.surface.layers[key].widget();
|
||||||
});
|
});
|
||||||
return s; // "# "+this.active_layer.name;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.widget_cursor = function()
|
this.widget_cursor = function()
|
||||||
|
@ -55,7 +55,7 @@ function Layer(name,host = "user")
|
|||||||
|
|
||||||
this.widget = function()
|
this.widget = function()
|
||||||
{
|
{
|
||||||
return "# "+this.name+"<br />";
|
return (ronin.surface.active_layer.name == this.name) ? "<span class='highlight'>- ("+this.name+")</span><br />" : "- "+this.name+"<br />";
|
||||||
}
|
}
|
||||||
|
|
||||||
this.move_from = null;
|
this.move_from = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user