Merge branch 'tambry-blueprintlibrarypagebuttons' into 6.0.x
This commit is contained in:
commit
6d4ac68dce
2 changed files with 18 additions and 3 deletions
|
@ -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() {
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue