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

View File

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

View File

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

View File

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

View File

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