Renamed setEnabled() method in GuiElementInterface to setElementEnabled() to workaround this Forge Bug: http://www.minecraftforge.net/forum/index.php/topic,32063

This commit is contained in:
CrushedPixel
2015-07-14 00:25:17 +02:00
parent a58e06703c
commit 9cf3f426aa
15 changed files with 26 additions and 28 deletions

View File

@@ -99,13 +99,13 @@ public class GuiAssetManager extends GuiScreen {
inputElements = new ComposedElement(assetNameInput, fileChooser);
composedElement = new ComposedElement(assetGuiEntryList, addButton, removeButton, inputElements);
inputElements.setEnabled(false);
inputElements.setElementEnabled(false);
assetGuiEntryList.addSelectionListener(new SelectionListener() {
@Override
public void onSelectionChanged(int selectionIndex) {
currentAsset = assetGuiEntryList.getElement(selectionIndex);
inputElements.setEnabled(currentAsset != null);
inputElements.setElementEnabled(currentAsset != null);
assetNameInput.setText(currentAsset != null ? currentAsset.getDisplayString() : "");
fileChooser.setAllowedExtensions(currentAsset != null ? AssetFileUtils.fileExtensionsForAssetClass(currentAsset.getClass()) : new String[0]);