From b100e714a83a2bbdbeb84dcb65cd91b81d5e9d48 Mon Sep 17 00:00:00 2001 From: echicken <> Date: Mon, 6 Jan 2014 04:55:25 +0000 Subject: [PATCH] Don't handle arrow-key input in the ship selector - it was meant to be helpful but isn't. Added text to tell people to navigate using the Tab key. Apply Herp-Ease to the affected area twice daily until symptoms subside. --- xtrn/startrek/startrek.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xtrn/startrek/startrek.js b/xtrn/startrek/startrek.js index acb933d9db..34b484bb6f 100644 --- a/xtrn/startrek/startrek.js +++ b/xtrn/startrek/startrek.js @@ -108,7 +108,7 @@ var setup = function() { var viewWidth = 13; var x = Math.floor((80 - (ships.length * viewWidth)) / 2); for(var s = 0; s < ships.length; s++) { - var view = layout.addView(ucfl(ships[s]), x, 4, viewWidth - 1, 16); + var view = layout.addView(ucfl(ships[s]), x, 5, viewWidth - 1, 16); view.show_tabs = false; var tab = view.addTab("frame", "frame"); var sprite = new Sprite.Aerial(ships[s], tab.frame, tab.frame.x, tab.frame.y, 'n'); @@ -134,15 +134,18 @@ var setup = function() { layout.open(); setupFrame.open(); setupFrame.gotoxy(1, 2); - setupFrame.center("What class of ship do you want to command, Captain " + ucfl(user.alias) + "?", WHITE); + setupFrame.center( + "What class of ship do you want to command, Captain " + ucfl(user.alias) + "?", + WHITE + ); + setupFrame.gotoxy(1, 3); + setupFrame.center("Press [TAB] to change ships, [Enter] to select.", CYAN); setupFrame.draw(); var userInput = ""; setupFrame.top(); while(ascii(userInput) != 13) { userInput = console.inkey(K_NONE, 5); - if(userInput == KEY_LEFT || userInput == KEY_RIGHT) - userInput = "\x09"; layout.getcmd(userInput); layout.cycle(); cycle(); @@ -423,4 +426,4 @@ var cleanUp = function() { init(); main(); cleanUp(); -exit(); \ No newline at end of file +exit(); -- GitLab