Added arrows to indicate when there are multiple pages to look through.
This commit is contained in:
parent
e8a43df0bc
commit
3d90f9639d
|
@ -147,6 +147,11 @@ function drawTradeGUI() {
|
|||
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);
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
@ -241,6 +246,11 @@ function drawTradeGUI() {
|
|||
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);
|
||||
|
||||
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));
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 159 B |
Binary file not shown.
|
@ -29,12 +29,17 @@ var guiControl = {
|
|||
},
|
||||
drawCursor: function (xPosition, yPosition) {
|
||||
OS.context.drawImage(guiControl.cursor, xPosition, yPosition);
|
||||
},
|
||||
drawPageArrow: function (direction, xPosition, yPosition) {
|
||||
OS.context.drawImage(guiControl.arrows, (direction == "left") ? 0 : pixel(4), 0, pixel(4), pixel(7), xPosition, yPosition, pixel(4), pixel(7));
|
||||
}
|
||||
}
|
||||
guiControl.background = new Image();
|
||||
guiControl.background.src = "images/guiBackground.png";
|
||||
guiControl.cursor = new Image();
|
||||
guiControl.cursor.src = "images/guiCursor.png";
|
||||
guiControl.arrows = new Image();
|
||||
guiControl.arrows.src = "images/arrows.png";
|
||||
|
||||
guiControl.itemSheet = new Image();
|
||||
guiControl.itemSheet.src = "images/items_sheet.png";
|
||||
|
|
Loading…
Reference in New Issue