Improved hints

This commit is contained in:
Devine Lu Linvega
2017-05-24 10:12:16 -10:00
parent 6b7a10686f
commit bd0ea1d46b
7 changed files with 36 additions and 17 deletions

View File

@@ -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()

View File

@@ -10,4 +10,9 @@ function Mode(name,key = "")
{
return "?";
}
this.toString = function()
{
return "<span class='mode'>~"+this.name+(this.key ? '['+this.key+']' : '')+"</span>"
}
}

View File

@@ -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);
}
}

View File

@@ -2,9 +2,4 @@ function Unit()
{
this.example = "unknown";
this.name = this.constructor.name;
this.render = function()
{
return "[MISSING]";
}
}