ronin/sources/scripts/module.js
Devine Lu Linvega 5ca4979c38 Added grid
2017-09-26 14:09:26 +13:00

26 lines
551 B
JavaScript

function Module(name)
{
this.name = name;
this.settings = {};
this.routes = {};
this.ports = {};
this.hint = function()
{
var html = "";
for(setting_id in this.settings){
var setting_value = this.settings[setting_id];
html += setting_id+"="+setting_value+" ";
}
for(route_id in this.routes){
var route_val = this.routes[route_id];
html += route_val+"->"+route_id+" ";
}
console.log(this.name,this.settings);
return html.trim() != "" ? "<b>"+this.name+"</b> "+html.trim() : "";
}
}