Merge branch 'tambry-blueprintlibrarypagebuttons' into 6.0.x

This commit is contained in:
SpaceToad 2014-05-08 15:30:01 +02:00
commit 6d4ac68dce
2 changed files with 18 additions and 3 deletions

View file

@ -51,7 +51,7 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
public EntityPlayer uploadingPlayer = null;
public EntityPlayer downloadingPlayer = null;
private int pageId = 0;
public int pageId = 0;
public TileBlueprintLibrary() {

View file

@ -61,6 +61,7 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
buttonList.add(deleteButton);
checkDelete();
checkPages();
}
@Override
@ -145,14 +146,28 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
}
checkDelete();
checkPages();
}
protected void checkDelete() {
if (library.selected != -1) {
deleteButton.enabled = true;
}
else {
} else {
deleteButton.enabled = false;
}
}
protected void checkPages() {
if (library.pageId != 0) {
prevPageButton.enabled = true;
} else {
prevPageButton.enabled = false;
}
if (library.pageId < BuildCraftBuilders.clientDB.getPageNumber() - 1) {
nextPageButton.enabled = true;
} else {
nextPageButton.enabled = false;
}
}
}