Class ModListScreen
- java.lang.Object
-
- net.minecraft.client.gui.AbstractGui
-
- net.minecraft.client.gui.FocusableGui
-
- net.minecraft.client.gui.screen.Screen
-
- net.minecraftforge.fml.client.gui.screen.ModListScreen
-
- All Implemented Interfaces:
IGuiEventListener
,INestedGuiEventHandler
,IRenderable
,IScreen
public class ModListScreen extends Screen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ModListScreen.InfoPanel
private static class
ModListScreen.SortType
-
Field Summary
Fields Modifier and Type Field Description private int
buttonMargin
private Button
configButton
private java.lang.String
lastFilterText
private int
listWidth
private static org.apache.logging.log4j.Logger
LOGGER
private ModListScreen.InfoPanel
modInfo
private ModListWidget
modList
private java.util.List<ModInfo>
mods
private int
numButtons
private Button
openModsFolderButton
private static int
PADDING
private Screen
parentScreen
private TextFieldWidget
search
private ModListWidget.ModEntry
selected
private boolean
sorted
private ModListScreen.SortType
sortType
private java.util.List<ModInfo>
unsortedMods
-
Fields inherited from class net.minecraft.client.gui.screen.Screen
buttons, children, font, height, itemRenderer, minecraft, passEvents, title, width
-
Fields inherited from class net.minecraft.client.gui.AbstractGui
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
-
-
Constructor Summary
Constructors Constructor Description ModListScreen(Screen parentScreen)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ExtendedList.AbstractListEntry<T>>
voidbuildModList(java.util.function.Consumer<T> modListViewConsumer, java.util.function.Function<ModInfo,T> newEntry)
private void
displayModConfig()
FontRenderer
getFontRenderer()
Minecraft
getMinecraftInstance()
void
init()
void
onClose()
private void
reloadMods()
void
render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
void
resize(Minecraft mc, int width, int height)
private void
resortMods(ModListScreen.SortType newSort)
void
setSelected(ModListWidget.ModEntry entry)
private static java.lang.String
stripControlCodes(java.lang.String value)
void
tick()
private void
updateCache()
-
Methods inherited from class net.minecraft.client.gui.screen.Screen
addButton, addWidget, children, getMinecraft, getNarrationMessage, getTitle, getTooltipFromItem, handleComponentClicked, hasAltDown, hasControlDown, hasShiftDown, init, insertText, isCopy, isCut, isMouseOver, isPaste, isPauseScreen, isSelectAll, isValidCharacterForName, keyPressed, onFilesDrop, removed, renderBackground, renderBackground, renderComponentHoverEffect, renderComponentTooltip, renderDirtBackground, renderTooltip, renderTooltip, renderTooltip, renderToolTip, renderWrappedToolTip, sendMessage, sendMessage, shouldCloseOnEsc, wrapScreenError
-
Methods inherited from class net.minecraft.client.gui.FocusableGui
getFocused, isDragging, setDragging, setFocused
-
Methods inherited from class net.minecraft.client.gui.AbstractGui
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawString, drawString, fill, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.gui.IGuiEventListener
mouseMoved
-
Methods inherited from interface net.minecraft.client.gui.INestedGuiEventHandler
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
PADDING
private static final int PADDING
- See Also:
- Constant Field Values
-
parentScreen
private Screen parentScreen
-
modList
private ModListWidget modList
-
modInfo
private ModListScreen.InfoPanel modInfo
-
selected
private ModListWidget.ModEntry selected
-
listWidth
private int listWidth
-
mods
private java.util.List<ModInfo> mods
-
unsortedMods
private final java.util.List<ModInfo> unsortedMods
-
configButton
private Button configButton
-
openModsFolderButton
private Button openModsFolderButton
-
buttonMargin
private int buttonMargin
-
numButtons
private int numButtons
-
lastFilterText
private java.lang.String lastFilterText
-
search
private TextFieldWidget search
-
sorted
private boolean sorted
-
sortType
private ModListScreen.SortType sortType
-
-
Constructor Detail
-
ModListScreen
public ModListScreen(Screen parentScreen)
- Parameters:
parentScreen
-
-
-
Method Detail
-
stripControlCodes
private static java.lang.String stripControlCodes(java.lang.String value)
-
displayModConfig
private void displayModConfig()
-
buildModList
public <T extends ExtendedList.AbstractListEntry<T>> void buildModList(java.util.function.Consumer<T> modListViewConsumer, java.util.function.Function<ModInfo,T> newEntry)
-
reloadMods
private void reloadMods()
-
resortMods
private void resortMods(ModListScreen.SortType newSort)
-
render
public void render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
- Specified by:
render
in interfaceIRenderable
- Overrides:
render
in classScreen
-
getMinecraftInstance
public Minecraft getMinecraftInstance()
-
getFontRenderer
public FontRenderer getFontRenderer()
-
setSelected
public void setSelected(ModListWidget.ModEntry entry)
-
updateCache
private void updateCache()
-
-