Package net.minecraftforge.client.gui
Class ModMismatchDisconnectedScreen.MismatchInfoPanel
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraftforge.client.gui.widget.ScrollPanel
net.minecraftforge.client.gui.ModMismatchDisconnectedScreen.MismatchInfoPanel
- All Implemented Interfaces:
- ContainerEventHandler,- GuiEventListener,- Renderable,- TabOrderedElement,- NarratableEntry,- NarrationSupplier
- Enclosing class:
- ModMismatchDisconnectedScreen
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntryNarratableEntry.NarrationPriority
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intprivate final List<org.apache.commons.lang3.tuple.Pair<FormattedCharSequence,org.apache.commons.lang3.tuple.Pair<FormattedCharSequence, FormattedCharSequence>>> private final intprivate final intprivate final intprivate final intFields inherited from class net.minecraftforge.client.gui.widget.ScrollPanelborder, bottom, captureMouse, height, left, right, scrollDistance, top, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListenerDOUBLE_CLICK_THRESHOLD_MS
- 
Constructor SummaryConstructorsConstructorDescriptionMismatchInfoPanel(Minecraft client, int width, int height, int top, int left) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voiddrawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY) Draw anything special on the screen.getComponentStyleAt(double x, double y) protected intbooleanmouseClicked(double mouseX, double mouseY, int button) voidrender(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) private List<org.apache.commons.lang3.tuple.Pair<FormattedCharSequence,org.apache.commons.lang3.tuple.Pair<FormattedCharSequence, FormattedCharSequence>>> splitLineToWidth(MutableComponent name, org.apache.commons.lang3.tuple.Pair<String, String> versions) Splits the raw name and version strings, making them use multiple lines if needed, to fit within the table dimensions.private MutableComponenttoModNameComponent(ResourceLocation id, String modName, int color) Adds a style information to the given mod name string.voidMethods inherited from class net.minecraftforge.client.gui.widget.ScrollPanelchildren, clickPanel, drawBackground, drawGradientRect, getScrollAmount, isMouseOver, mouseDragged, mouseReleased, mouseScrolledMethods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandlergetFocused, isDragging, setDragging, setFocusedMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandlercharTyped, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, nextFocusPath, setFocusedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListenergetRectangle, mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntryisActiveMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElementgetTabOrderGroup
- 
Field Details- 
lineTableprivate final List<org.apache.commons.lang3.tuple.Pair<FormattedCharSequence,org.apache.commons.lang3.tuple.Pair<FormattedCharSequence, lineTableFormattedCharSequence>>> 
- 
contentSizeprivate final int contentSize
- 
nameIndentprivate final int nameIndent- See Also:
 
- 
tableWidthprivate final int tableWidth
- 
nameWidthprivate final int nameWidth
- 
versionWidthprivate final int versionWidth
 
- 
- 
Constructor Details- 
MismatchInfoPanel
 
- 
- 
Method Details- 
splitLineToWidthprivate List<org.apache.commons.lang3.tuple.Pair<FormattedCharSequence,org.apache.commons.lang3.tuple.Pair<FormattedCharSequence, splitLineToWidthFormattedCharSequence>>> (MutableComponent name, org.apache.commons.lang3.tuple.Pair<String, String> versions) Splits the raw name and version strings, making them use multiple lines if needed, to fit within the table dimensions. The style assigned to the name element is then applied to the entire content row.- Parameters:
- name- The first element of the content row, usually representing a table section header or the name of a mod entry
- versions- The last two elements of the content row, usually representing the mod versions. If either one or both of them are not given, the first element may take up more space within the table.
- Returns:
- A list of table rows consisting of 3 elements each which consist of the same content as was given by the parameters, but split up to fit within the table dimensions.
 
- 
toModNameComponentAdds a style information to the given mod name string. The style assigned to the returned component contains the color of the mod name, a hover event containing the given id, and an optional click event, which opens the homepage of mod, if present.- Parameters:
- id- An id that gets displayed in the hover event. Depending on the origin it may only consist of a namespace (the mod id) or a namespace + path (a channel id associated with the mod).
- modName- The name of the mod. It will be rendered as the main text component.
- color- Defines the color of the returned style information. An odd number will result in a yellow, an even one in a gold color. This color variation makes it easier for users to distinguish different mod entries.
- Returns:
- A component with the mod name as the main text component, and an assigned style which will be used for the whole content row.
 
- 
getContentHeightprotected int getContentHeight()- Specified by:
- getContentHeightin class- ScrollPanel
 
- 
drawPanelprotected void drawPanel(GuiGraphics guiGraphics, int entryRight, int relativeY, Tesselator tess, int mouseX, int mouseY) Description copied from class:ScrollPanelDraw anything special on the screen. Scissor (RenderSystem.enableScissor) is enabled for anything that is rendered outside the view box. Do not mess with Scissor unless you support this.- Specified by:
- drawPanelin class- ScrollPanel
 
- 
render- Specified by:
- renderin interface- Renderable
- Overrides:
- renderin class- ScrollPanel
 
- 
getComponentStyleAt
- 
mouseClickedpublic boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
- mouseClickedin interface- ContainerEventHandler
- Specified by:
- mouseClickedin interface- GuiEventListener
- Overrides:
- mouseClickedin class- ScrollPanel
 
- 
narrationPriority
- 
updateNarration
 
-