2016-04-12 02:06:06 +02:00
function tradeGUI ( ) {
guiControl . trade = {
screen : "main" , // "main", "buy", "sell", "gossip"
cursorPosition : 0 ,
2016-04-14 00:49:32 +02:00
page : 0 , // horizontal page on item lists. Base 1 to match number of pages var "pages" within the gui.
itemsPerPage : 3 ,
2016-04-12 06:47:01 +02:00
show : false ,
2016-04-12 18:02:27 +02:00
activateDelay : 0 ,
2016-04-12 06:47:01 +02:00
island : null ,
2016-04-14 00:49:32 +02:00
haggleAmount : 0 ,
2016-04-12 02:06:06 +02:00
2016-04-13 02:14:09 +02:00
padding : pixel ( 2 ) ,
leftBorder : pixel ( 12 ) ,
2016-04-12 02:06:06 +02:00
rowTop : function ( rowNumber ) {
2016-04-13 02:14:09 +02:00
return ( guiControl . trade . padding + pixel ( 6 ) + ( guiControl . trade . padding * 3 ) ) + pixel ( ( guiControl . iconSize + 3 ) * rowNumber ) ;
2016-04-12 02:06:06 +02:00
}
}
}
function drawTradeGUI ( ) {
if ( guiControl . trade . show ) {
2016-04-13 02:14:09 +02:00
guiControl . trade . activateDelay -= ( guiControl . trade . activateDelay > 0 ) ? 1 : 0 ;
2016-04-12 06:47:01 +02:00
var tmp = Oversimplified . context . fillStyle ;
Oversimplified . context . fillStyle = "#D9BEA5" ;
Oversimplified . context . fillRect ( 0 , 0 , Oversimplified . camera . width , Oversimplified . camera . height ) ;
Oversimplified . context . fillStyle = tmp ;
2016-04-12 02:06:06 +02:00
if ( ct _down ( ) . down ) {
2016-04-13 02:14:09 +02:00
// Play Move_Cursor sound.
2016-04-12 02:06:06 +02:00
guiControl . trade . cursorPosition ++ ;
}
if ( ct _up ( ) . down ) {
2016-04-13 02:14:09 +02:00
// Play Move_Cursor_Up sound.
2016-04-12 02:06:06 +02:00
guiControl . trade . cursorPosition -- ;
}
2016-04-14 00:49:32 +02:00
if ( ct _right ( ) . down ) {
// Play Move_Cursor sound.
guiControl . trade . page ++ ;
}
if ( ct _left ( ) . down ) {
// Play Move_Cursor_Up sound.
guiControl . trade . page -- ;
}
2016-04-12 02:06:06 +02:00
if ( guiControl . trade . screen == "main" ) {
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
// Limit Cursor
if ( guiControl . trade . cursorPosition < 0 ) {
2016-04-12 18:02:27 +02:00
guiControl . trade . cursorPosition = 3 ;
2016-04-12 02:06:06 +02:00
}
if ( guiControl . trade . cursorPosition > 3 ) {
2016-04-12 18:02:27 +02:00
guiControl . trade . cursorPosition = 0 ;
2016-04-12 02:06:06 +02:00
}
2016-04-14 00:49:32 +02:00
// Limit page
if ( guiControl . trade . page < 0 ) {
guiControl . trade . page = 0 ;
}
if ( guiControl . trade . page > 0 ) {
guiControl . trade . page = 0 ;
}
2016-04-12 02:06:06 +02:00
// Title
guiControl . drawPixelText ( "On Island" , ( guiControl . trade . padding * 2 ) , guiControl . trade . padding , 10 , "black" , 6 ) ;
// Money icon
// guiControl.drawIcon(7, 2, guiControl.trade.leftBorder, guiControl.trade.rowTop(0));
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( ( guiControl . trade . island . CheckInventory ( ) . length > 0 ) ? "Buy" : "Sold Out!" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 0 ) + pixel ( ) , 10 , ( guiControl . trade . island . CheckInventory ( ) . length > 0 ) ? "black" : "white" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Supplies icon
// guiControl.drawIcon(9, 2, guiControl.trade.leftBorder, guiControl.trade.rowTop(1));
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( ( G . inventory . CheckCargo ( ) . length > 0 ) ? "Sell" : "No Cargo!" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 1 ) + pixel ( ) , 10 , ( G . inventory . CheckCargo ( ) . length > 0 ) ? "black" : "white" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Cargo icon
// guiControl.drawIcon(1, 0, guiControl.trade.leftBorder, guiControl.trade.rowTop(2));
2016-04-13 02:14:09 +02:00
guiControl . drawPixelText ( "Gossip" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 2 ) + pixel ( ) , 8 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Close Text
2016-04-13 02:14:09 +02:00
guiControl . drawPixelText ( "Leave" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 3 ) + pixel ( ) , 8 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Draw cursor
OS . context . drawImage ( guiControl . cursor , guiControl . trade . leftBorder - ( guiControl . iconScaled ) , guiControl . trade . rowTop ( guiControl . trade . cursorPosition ) ) ;
// Button Action
2016-04-12 18:02:27 +02:00
if ( guiControl . trade . activateDelay <= 0 && ct _confirm ( ) . down ) {
2016-04-12 02:06:06 +02:00
switch ( guiControl . trade . cursorPosition ) {
case 0 :
2016-04-14 00:49:32 +02:00
if ( guiControl . trade . island . CheckInventory ( ) . length > 0 ) {
guiControl . trade . screen = "buy" ;
}
else {
// Play Cannot_Buy sound.
}
2016-04-12 02:06:06 +02:00
break ;
case 1 :
2016-04-14 00:49:32 +02:00
if ( G . inventory . CheckCargo ( ) . length > 0 ) {
guiControl . trade . screen = "sell" ;
} else {
// Play Cannot_Buy sound.
}
2016-04-12 02:06:06 +02:00
break ;
case 2 :
guiControl . trade . screen = "gossip" ;
break ;
default :
2016-04-13 02:14:09 +02:00
// Change music to Sail.
2016-04-12 06:47:01 +02:00
guiControl . trade . show = false ;
2016-04-12 02:06:06 +02:00
break ;
}
2016-04-13 02:14:09 +02:00
// Play Select sound.
2016-04-12 02:06:06 +02:00
guiControl . trade . cursorPosition = 0 ;
2016-04-13 02:14:09 +02:00
guiControl . trade . page = 0 ;
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
}
}
else if ( guiControl . trade . screen == "buy" ) {
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
// Limit Cursor
if ( guiControl . trade . cursorPosition < 0 ) {
2016-04-14 00:49:32 +02:00
guiControl . trade . cursorPosition = 2 ;
2016-04-12 02:06:06 +02:00
}
2016-04-14 00:49:32 +02:00
if ( guiControl . trade . cursorPosition > 2 ) {
2016-04-12 02:06:06 +02:00
guiControl . trade . cursorPosition = 0 ;
}
// Title
2016-04-13 02:14:09 +02:00
guiControl . drawPixelText ( "Buy" , guiControl . trade . leftBorder - pixel ( 2 ) , guiControl . topOfBackground , 10 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Money icon
2016-04-14 00:49:32 +02:00
guiControl . drawIcon ( 7 , 2 , guiControl . trade . padding , guiControl . trade . rowTop ( 0 ) - pixel ( 3 ) ) ;
guiControl . drawPixelText ( G . inventory . moneyDisplay ( ) , guiControl . trade . padding + pixel ( guiControl . iconSize + 2 ) , guiControl . trade . rowTop ( 0 ) + pixel ( 2 ) - pixel ( 3 ) , 10 , "black" , 4 ) ;
2016-04-12 02:06:06 +02:00
2016-04-12 18:02:27 +02:00
// Cargo icons
2016-04-14 00:49:32 +02:00
var items = guiControl . trade . island . CheckInventory ( ) ; // Contains the item ids that have more than 1 item
// Limit page
if ( guiControl . trade . page < 0 ) {
guiControl . trade . page = items . length - 1 ;
}
if ( guiControl . trade . page > items . length - 1 ) {
guiControl . trade . page = 0 ;
}
if ( items . length > 0 ) {
var itemPrice = G . economy . cargoItemWorth [ items [ guiControl . trade . page ] ] + guiControl . trade . island . priceDifferences [ items [ guiControl . trade . page ] ] - guiControl . trade . haggleAmount ;
if ( itemPrice < 1 ) itemPrice = 1 ;
2016-04-12 18:02:27 +02:00
var itemPriceDisplay = itemPrice . toString ( ) + " c" ;
2016-04-14 00:49:32 +02:00
guiControl . drawItem ( items [ guiControl . trade . page ] , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
guiControl . drawPixelText ( itemPriceDisplay , guiControl . trade . leftBorder + pixel ( guiControl . iconSize + 4 ) , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) + pixel ( ) , 8 , "black" , 6 ) ;
2016-04-14 01:32:56 +02:00
if ( items . length > 1 ) {
guiControl . drawPageArrow ( "left" , guiControl . trade . padding , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
guiControl . drawPageArrow ( "right" , OS . camera . width - pixel ( 4 ) - guiControl . trade . padding , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
}
2016-04-14 00:49:32 +02:00
// Amounts
guiControl . drawPixelText ( "Shop" + guiControl . trade . island . inventory [ items [ guiControl . trade . page ] ] . toString ( ) , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 2 ) - pixel ( 6 ) + pixel ( ) , 4 , "black" , 4 ) ;
guiControl . drawPixelText ( "Own " + G . inventory . cargo [ items [ guiControl . trade . page ] ] . toString ( ) , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 3 ) - pixel ( 6 ) + pixel ( ) , 4 , ( G . inventory . cargo [ items [ guiControl . trade . page ] ] < G . stats . hold ) ? "black" : "yellow" , 4 ) ;
} else {
guiControl . drawPixelText ( "Sold Out!" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) + pixel ( ) , 10 , "black" , 6 ) ;
2016-04-12 18:02:27 +02:00
}
2016-04-14 00:49:32 +02:00
// Draw Amount of Cargo
guiControl . drawIcon ( 1 , 1 , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 4 ) - pixel ( 5 ) ) ;
guiControl . drawPixelText ( G . inventory . CheckCargo ( ) . length . toString ( ) , OS . camera . width - pixel ( 20 ) + ( guiControl . iconScaled + pixel ( ) ) , guiControl . trade . rowTop ( 4 ) - pixel ( 4 ) , 4 , ( G . inventory . CheckCargo ( ) . length < G . stats . inventory ) ? "black" : "yellow" , 6 ) ;
// Yes/No Options
guiControl . drawPixelText ( "Hagl?" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 2 ) - pixel ( 2 ) , 8 , ( items . length > 0 && guiControl . trade . haggleAmount == 0 ) ? "black" : "white" , 6 ) ;
guiControl . drawPixelText ( "Yes" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 3 ) - pixel ( 2 ) , 8 , ( items . length > 0 && G . inventory . CanBuy ( items [ guiControl . trade . page ] , itemPrice ) ) ? "black" : "white" , 6 ) ;
2016-04-12 18:02:27 +02:00
2016-04-12 02:06:06 +02:00
// Back Text
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Back" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 4 ) - pixel ( 2 ) , 8 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Draw cursor
2016-04-14 00:49:32 +02:00
OS . context . drawImage ( guiControl . cursor , guiControl . trade . leftBorder - ( guiControl . iconScaled ) , guiControl . trade . rowTop ( guiControl . trade . cursorPosition + 2 ) - pixel ( 3 ) ) ;
2016-04-12 02:06:06 +02:00
// Button Action
2016-04-14 00:49:32 +02:00
if ( ct _confirm ( ) . down ) {
switch ( guiControl . trade . cursorPosition ) {
case 0 : // Haggle
if ( items . length > 0 &&
guiControl . trade . haggleAmount == 0 && Math . floor ( Math . randomRange ( 0 , 100 ) ) < G . stats . popularity ) // If you haven't haggled yet and get a random number less than your popularity, haggle successfully.
{
guiControl . trade . haggleAmount = G . stats . haggling ;
// Play Sell sound.
} else {
// Play Cannot_Buy sound.
}
break ;
case 1 : // Buy
if ( items . length > 0 &&
G . inventory . CanBuy ( items [ guiControl . trade . page ] , itemPrice ) ) { //If cursor is over yes and you can buy, buy it.
guiControl . trade . island . BuyFrom ( items [ guiControl . trade . page ] , itemPrice ) ;
} else {
// Play Cannot_Buy sound.
}
break ;
default :
guiControl . trade . screen = "main" ;
guiControl . trade . cursorPosition = 0 ; // The position where "Buy" is on main screen.
break ;
}
2016-04-13 02:14:09 +02:00
// Play Select sound.
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
}
if ( ct _cancel ( ) . down ) {
2016-04-12 02:06:06 +02:00
guiControl . trade . screen = "main" ;
2016-04-14 00:49:32 +02:00
guiControl . trade . cursorPosition = 0 ; // The position where "Buy" is on main screen.
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
}
}
else if ( guiControl . trade . screen == "sell" ) {
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
// Limit Cursor
if ( guiControl . trade . cursorPosition < 0 ) {
2016-04-12 18:02:27 +02:00
guiControl . trade . cursorPosition = 2 ;
2016-04-12 02:06:06 +02:00
}
if ( guiControl . trade . cursorPosition > 2 ) {
2016-04-12 18:02:27 +02:00
guiControl . trade . cursorPosition = 0 ;
2016-04-12 02:06:06 +02:00
}
// Title
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Sell" , guiControl . trade . leftBorder - pixel ( 2 ) , guiControl . topOfBackground , 10 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
2016-04-14 00:49:32 +02:00
// Money icon
guiControl . drawIcon ( 7 , 2 , guiControl . trade . padding , guiControl . trade . rowTop ( 0 ) - pixel ( 3 ) ) ;
guiControl . drawPixelText ( G . inventory . moneyDisplay ( ) , guiControl . trade . padding + pixel ( guiControl . iconSize + 2 ) , guiControl . trade . rowTop ( 0 ) + pixel ( 2 ) - pixel ( 3 ) , 10 , "black" , 4 ) ;
2016-04-12 02:06:06 +02:00
2016-04-14 00:49:32 +02:00
// Cargo icons
var items = G . inventory . CheckCargo ( ) ; // Contains the item ids that have more than 1 item
// Limit page
if ( guiControl . trade . page < 0 ) {
guiControl . trade . page = items . length - 1 ;
}
if ( guiControl . trade . page > items . length - 1 ) {
guiControl . trade . page = 0 ;
}
if ( items . length > 0 ) {
var itemPrice = G . economy . cargoItemWorth [ items [ guiControl . trade . page ] ] + guiControl . trade . island . priceDifferences [ items [ guiControl . trade . page ] ] ;
var priceCut = 0.5 + ( ( guiControl . trade . haggleAmount == 0 ) ? 0 : ( G . stats . popularity * 0.01 * 0.5 ) ) ; // If haggled successfully, lessen the price cut by half of your popularity's percent worth.
itemPrice = Math . round ( itemPrice * priceCut ) ;
if ( itemPrice < 1 ) itemPrice = 1 ;
var itemPriceDisplay = itemPrice . toString ( ) + " c" ;
guiControl . drawItem ( items [ guiControl . trade . page ] , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
guiControl . drawPixelText ( itemPriceDisplay , guiControl . trade . leftBorder + pixel ( guiControl . iconSize + 4 ) , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) + pixel ( ) , 8 , "black" , 6 ) ;
2016-04-14 01:32:56 +02:00
if ( items . length > 1 ) {
guiControl . drawPageArrow ( "left" , guiControl . trade . padding , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
guiControl . drawPageArrow ( "right" , OS . camera . width - pixel ( 4 ) - guiControl . trade . padding , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) ) ;
}
2016-04-14 00:49:32 +02:00
// Amounts
guiControl . drawPixelText ( "Shop" + guiControl . trade . island . inventory [ items [ guiControl . trade . page ] ] . toString ( ) , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 2 ) - pixel ( 6 ) + pixel ( ) , 4 , "black" , 4 ) ;
guiControl . drawPixelText ( "Own " + G . inventory . cargo [ items [ guiControl . trade . page ] ] . toString ( ) , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 3 ) - pixel ( 6 ) + pixel ( ) , 4 , ( G . inventory . cargo [ items [ guiControl . trade . page ] ] > 0 ) ? "black" : "yellow" , 4 ) ;
} else {
guiControl . drawPixelText ( "No Cargo!" , guiControl . trade . padding , guiControl . trade . rowTop ( 1 ) - pixel ( 5 ) + pixel ( ) , 10 , "black" , 6 ) ;
}
// Draw Amount of Cargo
guiControl . drawIcon ( 1 , 1 , OS . camera . width - pixel ( 20 ) , guiControl . trade . rowTop ( 4 ) - pixel ( 5 ) ) ;
guiControl . drawPixelText ( G . inventory . CheckCargo ( ) . length . toString ( ) , OS . camera . width - pixel ( 20 ) + ( guiControl . iconScaled + pixel ( ) ) , guiControl . trade . rowTop ( 4 ) - pixel ( 4 ) , 4 , ( G . inventory . CheckCargo ( ) . length > 0 ) ? "black" : "yellow" , 6 ) ;
// Yes/No Options
guiControl . drawPixelText ( "Hagl?" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 2 ) - pixel ( 2 ) , 8 , ( items . length > 0 && guiControl . trade . haggleAmount == 0 ) ? "black" : "white" , 6 ) ;
guiControl . drawPixelText ( "Yes" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 3 ) - pixel ( 2 ) , 8 , ( items . length > 0 && G . inventory . CanSell ( items [ guiControl . trade . page ] ) ) ? "black" : "white" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Back Text
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Back" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 4 ) - pixel ( 2 ) , 8 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Draw cursor
2016-04-14 00:49:32 +02:00
OS . context . drawImage ( guiControl . cursor , guiControl . trade . leftBorder - ( guiControl . iconScaled ) , guiControl . trade . rowTop ( guiControl . trade . cursorPosition + 2 ) - pixel ( 3 ) ) ;
2016-04-12 02:06:06 +02:00
// Button Action
if ( ct _confirm ( ) . down ) {
switch ( guiControl . trade . cursorPosition ) {
2016-04-14 00:49:32 +02:00
case 0 : // Haggle
if ( items . length > 0 &&
guiControl . trade . haggleAmount == 0 && Math . floor ( Math . randomRange ( 0 , 100 ) ) < G . stats . popularity ) // If you haven't haggled yet and get a random number less than your popularity, haggle successfully.
{
guiControl . trade . haggleAmount = G . stats . haggling ;
// Play Sell sound.
} else {
// Play Cannot_Buy sound.
}
break ;
case 1 : // Sell
if ( items . length > 0 &&
G . inventory . CanSell ( items [ guiControl . trade . page ] ) ) //If cursor is over yes and you can buy, buy it.
{
guiControl . trade . island . SellTo ( items [ guiControl . trade . page ] , itemPrice ) ;
} else {
// Play Cannot_Buy sound.
2016-04-12 02:06:06 +02:00
}
break ;
default :
guiControl . trade . screen = "main" ;
2016-04-14 00:49:32 +02:00
guiControl . trade . cursorPosition = 1 ; // The position where "Sell" is on main screen.
2016-04-12 02:06:06 +02:00
break ;
}
2016-04-13 02:14:09 +02:00
// Play Select sound.
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
}
if ( ct _cancel ( ) . down ) {
guiControl . trade . screen = "main" ;
2016-04-14 00:49:32 +02:00
guiControl . trade . cursorPosition = 1 ; // The position where "Sell" is on main screen.
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
}
}
else if ( guiControl . trade . screen == "gossip" ) {
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
// Limit Cursor
if ( guiControl . trade . cursorPosition < 0 ) {
guiControl . trade . cursorPosition = 0 ;
}
if ( guiControl . trade . cursorPosition > 0 ) {
guiControl . trade . cursorPosition = 0 ;
}
// Title
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Gossip" , guiControl . trade . padding , guiControl . topOfBackground , 10 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Nothing interesting to report! / / / / / -Actually, this isnt in the game yet-" , guiControl . trade . padding , guiControl . trade . rowTop ( 0 ) - pixel ( 2 ) , 0 , "black" , 4 ) ;
2016-04-12 02:06:06 +02:00
// Back Text
2016-04-14 00:49:32 +02:00
guiControl . drawPixelText ( "Back" , guiControl . trade . leftBorder , guiControl . trade . rowTop ( 4 ) - pixel ( 2 ) , 8 , "black" , 6 ) ;
2016-04-12 02:06:06 +02:00
// Draw cursor
2016-04-14 00:49:32 +02:00
OS . context . drawImage ( guiControl . cursor , guiControl . trade . leftBorder - ( guiControl . iconScaled ) , guiControl . trade . rowTop ( 4 ) - pixel ( 3 ) ) ;
2016-04-12 02:06:06 +02:00
// Button Action
if ( ct _confirm ( ) . down || ct _cancel ( ) . down ) {
guiControl . trade . screen = "main" ;
guiControl . trade . cursorPosition = 2 ;
2016-04-13 02:14:09 +02:00
// Play Select sound.
2016-04-14 00:49:32 +02:00
// console.log(guiControl.trade.screen);
2016-04-12 02:06:06 +02:00
}
}
}
}