mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-10-26 14:24:07 +00:00
Add back in removed unused public methods, which were actually used by some NEI add-ons (#162)
* Fix compatibility with add-ons by re-adding unused public methods
This commit is contained in:
1 parent
5b3a255be9
commit
b00f4d1514
1 file changed
+19
@@ -73,7 +73,9 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
{
|
||||
private static LayoutManager instance;
|
||||
|
||||
/** Note: this variable isn't actually used by this mod, but NEI add-ons might need it. */
|
||||
private static Widget inputFocused;
|
||||
|
||||
/**
|
||||
* Sorted bottom first
|
||||
*/
|
||||
@@ -626,6 +628,8 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
@Override
|
||||
public void load(GuiContainer gui) {
|
||||
if (isEnabled()) {
|
||||
setInputFocused(null);
|
||||
|
||||
if(!itemsLoaded) {
|
||||
ItemList.loadItems.restart();
|
||||
itemsLoaded = true;
|
||||
@@ -760,6 +764,21 @@ public class LayoutManager implements IContainerInputHandler, IContainerTooltipH
|
||||
return itemPanel.draggedStack == null;
|
||||
}
|
||||
|
||||
/** Note: this method isn't actually used by this mod, but NEI add-ons might need it. */
|
||||
public static Widget getInputFocused() {
|
||||
return inputFocused;
|
||||
}
|
||||
|
||||
/** Note: this method isn't actually used by this mod, but NEI add-ons might need it. */
|
||||
public static void setInputFocused(Widget widget) {
|
||||
if (inputFocused != null)
|
||||
inputFocused.loseFocus();
|
||||
|
||||
inputFocused = widget;
|
||||
if (inputFocused != null)
|
||||
inputFocused.gainFocus();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderSlotUnderlay(GuiContainer gui, Slot slot) {
|
||||
if (overlayRenderer != null)
|
||||
|
||||
Reference in new issue
Block a user