Improved layer display
This commit is contained in:
@@ -7,6 +7,14 @@ function FileSave(rune)
|
||||
|
||||
this.docs = "Creates a new window with a image of the resulting canvas in the specified format.";
|
||||
|
||||
this.layer = null;
|
||||
|
||||
this.install = function()
|
||||
{
|
||||
this.layer = new Layer("Export",this);
|
||||
ronin.surface.add_layer(this.layer);
|
||||
}
|
||||
|
||||
this.active = function(cmd)
|
||||
{
|
||||
var d = null;
|
||||
|
||||
@@ -9,7 +9,8 @@ function Overlay(rune)
|
||||
|
||||
this.install = function()
|
||||
{
|
||||
this.layer = new Layer("Test",this);
|
||||
this.layer = new Layer("Guide",this);
|
||||
this.layer.element.setAttribute("style","z-index:9000");
|
||||
ronin.surface.add_layer(this.layer);
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,16 @@ function Layer(name,manager = null)
|
||||
|
||||
this.widget = function()
|
||||
{
|
||||
return (ronin.surface.active_layer.name == this.name) ? "<span class='highlight'>- "+(this.manager != null ? this.manager.constructor.name+"." : '')+this.name+"</span><br />" : "- "+(this.manager != null ? this.manager.constructor.name+"." : '')+this.name+"<br />";
|
||||
var e_name = "";
|
||||
if(this.manager != null){ e_name += this.manager.constructor.name+"."; }
|
||||
e_name += this.name;
|
||||
|
||||
var e_class = "";
|
||||
e_class += "layer ";
|
||||
if(ronin.surface.active_layer.name == this.name){ e_class += "highlight "; }
|
||||
if(this.manager != null){ e_class += "managed "; }
|
||||
|
||||
return "<span class='"+e_class+"'>- "+e_name+"</span><br />";
|
||||
}
|
||||
|
||||
this.move_from = null;
|
||||
|
||||
Reference in New Issue
Block a user