This commit is contained in:
Devine Lu Linvega
2017-04-21 10:08:28 -10:00
parent a2ec49f3aa
commit d9677f0fea
8 changed files with 38 additions and 21 deletions

View File

@@ -31,6 +31,9 @@ starting_canvas.height = window.innerHeight - 300;
starting_canvas.width = parseInt(starting_canvas.width/40) * 40;
starting_canvas.height = parseInt(starting_canvas.height/40) * 40;
// ronin.terminal.load("default.rin");
ronin.terminal.load("blank.rin");
var target_file = window.location.hash ? window.location.hash : "default";
target_file = target_file.substr(1,target_file.length-1);
ronin.terminal.load(window.location.hash ? target_file+".rin" : "default.rin");
ronin.widget.update();

View File

@@ -63,7 +63,7 @@ function Terminal(rune)
this.hint_element.innerHTML = "";
var queue = ronin.terminal.textarea.value.split("\n")
for(id in queue){
this.hint_element.innerHTML += "<line><text class='input'>"+this.syntax_highlight(queue[id])+"</text><text class='status'>"+this.run_line(queue.length - id,queue[id])+"</text></line><br />";
this.hint_element.innerHTML += "<line><text class='input'>"+this.syntax_highlight(queue[id])+"</text><text class='status'>"+this.run_line(queue.length - id,queue[id])+"</text></line>\n";
}
}
@@ -120,8 +120,6 @@ function Terminal(rune)
{
var line = line;
console.log(line[0])
// Comment
if(line[0] == "~"){ line = "<span class='comment'>"+line+"</span>"; }
@@ -177,8 +175,11 @@ function Terminal(rune)
}
this.filename = "default.rin";
this.load = function readTextFile(name)
{
this.filename = name;
var file = "presets/"+name+'?'+new Date().getTime();
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
@@ -194,6 +195,7 @@ function Terminal(rune)
}
}
rawFile.send(null);
ronin.widget.update();
}
this.cmd = function()

View File

@@ -13,12 +13,9 @@ function Widget(rune)
this.update = function()
{
var s = "";
s += ronin.cursor.widget();
// for (var key in ronin.modules){
// s += ronin.modules[key].widget() ? "<span class='"+key+"'><name>"+key+"</name>"+ronin.modules[key].widget()+"</span> " : "";
// }
s += ronin.terminal.file_name+" ";
s += "Cursor: "+ronin.cursor.widget();
this.element.innerHTML = s;
}