Mercurial > hg > rlgwebd
diff rlgterm.js @ 92:a4d3ecf188b7
RLG-Web client: replace setTitle() with message().
Remove the title line, and make setTitle() add a message instead.
Also remove setTitle() from termemu.js, because shterm.js duplicates
the code.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Tue, 10 Jul 2012 18:39:36 -0700 |
parents | e07f98799120 |
children | 104409bf5f03 |
line wrap: on
line diff
--- a/rlgterm.js Tue Jul 10 16:32:49 2012 -0700 +++ b/rlgterm.js Tue Jul 10 18:39:36 2012 -0700 @@ -385,7 +385,6 @@ function setup() { keyHexCodes.init(); termemu.init("termwrap", 24, 80); - setTitle("Not connected."); setmode("login"); /* Set up the text size. */ var cssSize = termemu.view.style.fontSize; @@ -445,7 +444,6 @@ /* Success */ session.lcred = reply.k; session.lname = reply.u; - setTitle("Logged in as " + reply.u); debug(0, "Logged in as " + reply.u + " with id " + reply.k); message("You are now logged in as " + reply.u + "."); setmode("choose"); @@ -623,7 +621,6 @@ session.id = reply.id; session.playing = true; termemu.resize(reply.h, reply.w); - setTitle("Playing as " + session.lname); debug(1, "Playing with id " + session.id); message("You are now playing " + game.name + "."); setmode("play"); @@ -659,7 +656,6 @@ termemu.resize(reply.h, reply.w); termemu.reset(); termemu.toAltBuf(); - setTitle("Watching"); debug(1, "Watching with id " + session.id); var pname = reply.p; var gname = games[reply.g].name; @@ -705,7 +701,6 @@ message("Welcome " + reply.u + ", you are now registered."); session.lcred = reply.k; session.lname = reply.u; - setTitle("Logged in as " + session.lname); debug(1, "Logged in as " + session.lname + " with id " + session.lcred); message("You are now logged in as " + reply.u + "."); setmode("choose"); @@ -734,7 +729,6 @@ session.id = null; session.playing = false; ajaxstate.clear(); - setTitle("Game over."); termemu.toNormBuf(); nsend = 0; nrecv = 0; @@ -843,6 +837,10 @@ return; } +function setTitle(tstr) { + message(tstr); +} + function textsize(larger) { var cssSize = termemu.view.style.fontSize; if (!cssSize) {