Improved hints
This commit is contained in:
@@ -7,16 +7,16 @@ function Method(name,params,mouse_event)
|
||||
this.params = params;
|
||||
this.mouse_event = mouse_event;
|
||||
this.example = "";
|
||||
|
||||
this.render = function()
|
||||
|
||||
this.toString = function()
|
||||
{
|
||||
var s = name+":";
|
||||
var s = "";
|
||||
for(param in this.params){
|
||||
s += this.params[param]+":"
|
||||
s += this.params[param]+","
|
||||
}
|
||||
s = s.substr(0,s.length-1);
|
||||
|
||||
return s;
|
||||
return "<span class='method'>."+this.name+"("+s+")</span>";
|
||||
}
|
||||
|
||||
this.hint = function()
|
||||
|
||||
@@ -10,4 +10,9 @@ function Mode(name,key = "")
|
||||
{
|
||||
return "?";
|
||||
}
|
||||
|
||||
this.toString = function()
|
||||
{
|
||||
return "<span class='mode'>~"+this.name+(this.key ? '['+this.key+']' : '')+"</span>"
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,11 @@ function Setting(name,value)
|
||||
return "?";
|
||||
}
|
||||
|
||||
this.toString = function()
|
||||
{
|
||||
return "<span class='setting'>:"+this.name+(this.key ? '['+this.value+']' : '')+"</span>"
|
||||
}
|
||||
|
||||
this.update = function(value)
|
||||
{
|
||||
this.value = value;
|
||||
@@ -30,4 +35,5 @@ function Setting(name,value)
|
||||
{
|
||||
return new Position(this.value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,9 +2,4 @@ function Unit()
|
||||
{
|
||||
this.example = "unknown";
|
||||
this.name = this.constructor.name;
|
||||
|
||||
this.render = function()
|
||||
{
|
||||
return "[MISSING]";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user