Changed sound effects for moving up and canceling in menus.

This commit is contained in:
Robbie Antenesse 2016-04-17 15:53:31 -06:00
parent 6b2302d52a
commit f63788a6c5
5 changed files with 27 additions and 24 deletions

View File

@ -18,7 +18,7 @@ function drawInventoryGUI() {
guiControl.inventory.cursorPosition++; guiControl.inventory.cursorPosition++;
} }
if (ct_up().down) { if (ct_up().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.inventory.cursorPosition--; guiControl.inventory.cursorPosition--;
} }
@ -58,29 +58,32 @@ function drawInventoryGUI() {
if (ct_confirm().down) { if (ct_confirm().down) {
switch (guiControl.inventory.cursorPosition) { switch (guiControl.inventory.cursorPosition) {
case 0: case 0:
snd_select.Play();
guiControl.inventory.screen = "money"; guiControl.inventory.screen = "money";
break; break;
case 1: case 1:
snd_select.Play();
guiControl.inventory.screen = "cargo"; guiControl.inventory.screen = "cargo";
break; break;
case 2: case 2:
snd_select.Play();
guiControl.inventory.screen = "status"; guiControl.inventory.screen = "status";
break; break;
default: default:
snd_cursorup.Play();
guiControl.inventory.show = false; guiControl.inventory.show = false;
break; break;
} }
snd_select.Play();
guiControl.inventory.cursorPosition = 0; guiControl.inventory.cursorPosition = 0;
guiControl.inventory.activateDelay = 5; guiControl.inventory.activateDelay = 5;
} }
if (ct_cancel().down) { if (ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.inventory.show = false; guiControl.inventory.show = false;
} }
if (ct_left().down) { if (ct_left().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.inventory.show = false; guiControl.inventory.show = false;
guiControl.map.activateDelay = 5; guiControl.map.activateDelay = 5;
guiControl.map.show = true; guiControl.map.show = true;
@ -119,7 +122,7 @@ function drawInventoryGUI() {
// Button Action // Button Action
if (guiControl.inventory.activateDelay <= 0) { if (guiControl.inventory.activateDelay <= 0) {
if (ct_confirm().down || ct_cancel().down) { if (ct_confirm().down || ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.inventory.screen = "main"; guiControl.inventory.screen = "main";
guiControl.inventory.activateDelay = 5; guiControl.inventory.activateDelay = 5;
guiControl.inventory.cursorPosition = 0; guiControl.inventory.cursorPosition = 0;
@ -154,7 +157,7 @@ function drawInventoryGUI() {
// Button Action // Button Action
if (guiControl.inventory.activateDelay <= 0) { if (guiControl.inventory.activateDelay <= 0) {
if (ct_confirm().down || ct_cancel().down) { if (ct_confirm().down || ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.inventory.screen = "main"; guiControl.inventory.screen = "main";
guiControl.inventory.activateDelay = 5; guiControl.inventory.activateDelay = 5;
guiControl.inventory.cursorPosition = 1; guiControl.inventory.cursorPosition = 1;
@ -201,7 +204,7 @@ function drawInventoryGUI() {
// Button Action // Button Action
if (guiControl.inventory.activateDelay <= 0) { if (guiControl.inventory.activateDelay <= 0) {
if (ct_confirm().down || ct_cancel().down) { if (ct_confirm().down || ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.inventory.screen = "main"; guiControl.inventory.screen = "main";
guiControl.inventory.activateDelay = 5; guiControl.inventory.activateDelay = 5;
guiControl.inventory.cursorPosition = 2; // The position where "Supplies" is on main screen. guiControl.inventory.cursorPosition = 2; // The position where "Supplies" is on main screen.

View File

@ -39,12 +39,12 @@ function drawMapGUI() {
// Button Action // Button Action
if (guiControl.map.activateDelay <= 0) { if (guiControl.map.activateDelay <= 0) {
if (ct_cancel().down) { if (ct_confirm().down || ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.map.show = false; guiControl.map.show = false;
} }
if (ct_left().down) { if (ct_left().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.map.show = false; guiControl.map.show = false;
guiControl.inventory.activateDelay = 5; guiControl.inventory.activateDelay = 5;
guiControl.inventory.show = true; guiControl.inventory.show = true;

View File

@ -22,7 +22,7 @@ function drawTitleScreen() {
guiControl.title.cursorPosition++; guiControl.title.cursorPosition++;
} }
if (ct_up().down) { if (ct_up().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.title.cursorPosition--; guiControl.title.cursorPosition--;
} }

View File

@ -33,7 +33,7 @@ function drawTradeGUI() {
guiControl.trade.cursorPosition++; guiControl.trade.cursorPosition++;
} }
if (ct_up().down) { if (ct_up().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.trade.cursorPosition--; guiControl.trade.cursorPosition--;
} }
if (ct_right().down) { if (ct_right().down) {
@ -41,7 +41,7 @@ function drawTradeGUI() {
guiControl.trade.page++; guiControl.trade.page++;
} }
if (ct_left().down) { if (ct_left().down) {
snd_cursorup.Play(); snd_cursordown.Play();
guiControl.trade.page--; guiControl.trade.page--;
} }
@ -109,7 +109,7 @@ function drawTradeGUI() {
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
break; break;
default: default:
snd_select.Play(); snd_cursorup.Play();
mus_trade.Stop(); mus_trade.Stop();
mus_sail.Play(); mus_sail.Play();
guiControl.trade.show = false; guiControl.trade.show = false;
@ -122,7 +122,7 @@ function drawTradeGUI() {
// console.log(guiControl.trade.screen); // console.log(guiControl.trade.screen);
} }
if (ct_cancel().down) { if (ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
mus_trade.Stop(); mus_trade.Stop();
mus_sail.Play(); mus_sail.Play();
guiControl.trade.show = false; guiControl.trade.show = false;
@ -216,7 +216,7 @@ function drawTradeGUI() {
} }
break; break;
default: default:
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen. guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen.
@ -225,7 +225,7 @@ function drawTradeGUI() {
// console.log(guiControl.trade.screen); // console.log(guiControl.trade.screen);
} }
if (ct_cancel().down) { if (ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen. guiControl.trade.cursorPosition = 0; // The position where "Buy" is on main screen.
@ -322,7 +322,7 @@ function drawTradeGUI() {
} }
break; break;
default: default:
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen. guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen.
@ -331,7 +331,7 @@ function drawTradeGUI() {
// console.log(guiControl.trade.screen); // console.log(guiControl.trade.screen);
} }
if (ct_cancel().down) { if (ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen. guiControl.trade.cursorPosition = 1; // The position where "Sell" is on main screen.
@ -390,7 +390,7 @@ function drawTradeGUI() {
} }
break; break;
default: default:
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen. guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen.
@ -402,7 +402,7 @@ function drawTradeGUI() {
} }
if (ct_cancel().down) { if (ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "main"; guiControl.trade.screen = "main";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen. guiControl.trade.cursorPosition = 2; // The position where "Supplies" is on main screen.
@ -433,7 +433,7 @@ function drawTradeGUI() {
// Button Action // Button Action
if (guiControl.trade.activateDelay <= 0) { if (guiControl.trade.activateDelay <= 0) {
if (ct_confirm().down || ct_cancel().down) { if (ct_confirm().down || ct_cancel().down) {
snd_select.Play(); snd_cursorup.Play();
guiControl.trade.screen = "tavern"; guiControl.trade.screen = "tavern";
guiControl.trade.activateDelay = 5; guiControl.trade.activateDelay = 5;
guiControl.trade.cursorPosition = 0; guiControl.trade.cursorPosition = 0;

View File

@ -178,7 +178,7 @@ rm_Ocean.GenerateMap = function () {
} }
for (var i = 0; i < this.numberOfIslands; i++) { for (var i = 0; i < this.numberOfIslands; i++) {
G.map.push({ G.map[i] = {
island: rm_Ocean.AddObject(OS.P["Island"], { island: rm_Ocean.AddObject(OS.P["Island"], {
x: this.squareSize * xSquares[i], x: this.squareSize * xSquares[i],
y: this.squareSize * ySquares[i] y: this.squareSize * ySquares[i]
@ -187,6 +187,6 @@ rm_Ocean.GenerateMap = function () {
drawY: ySquares[i], drawY: ySquares[i],
drawWidth: 1, drawWidth: 1,
drawHeight: 1 drawHeight: 1
}); };
} }
} }