mirror of
https://github.com/zDevelopers/ImageOnMap.git
synced 2024-11-13 05:44:04 +01:00
Fixed explorer GUI to be able to use getSize() in onUpdate().
* BUG: getSize() always returns 0 in the onUpdate method of explorer GUIs.
This commit is contained in:
parent
a403efcd4e
commit
1ddc923b73
@ -79,6 +79,13 @@ abstract public class ExplorerGui<T> extends ActionGui
|
||||
|
||||
private Mode mode = Mode.CREATIVE;
|
||||
|
||||
|
||||
public ExplorerGui()
|
||||
{
|
||||
// Defined early to be able to use getSize() in the onUpdate method.
|
||||
setSize(MAX_INVENTORY_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the displayed data.
|
||||
*
|
||||
@ -343,8 +350,6 @@ abstract public class ExplorerGui<T> extends ActionGui
|
||||
pageCountY = (int)Math.ceil((double)dataHeight / (double)viewHeight);
|
||||
}
|
||||
|
||||
setSize(MAX_INVENTORY_SIZE);
|
||||
|
||||
if(pageCountX > 1)
|
||||
{
|
||||
action("previous", MAX_INVENTORY_SIZE - INVENTORY_ROW_SIZE);
|
||||
|
Loading…
Reference in New Issue
Block a user