Class TabsWindowModule
java.lang.Object
com.minecolonies.core.client.gui.modules.TabsWindowModule
- All Implemented Interfaces:
IWindowModule
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumImage side definitions. -
Constructor Summary
ConstructorsConstructorDescriptionTabsWindowModule(AbstractWindowSkeleton parent, Random iconRandom) Constructor to initiate the tab window module. -
Method Summary
Modifier and TypeMethodDescriptionvoidrenderTabButton(int index, TabsWindowModule.TabImageSide side, net.minecraft.resources.ResourceLocation icon, @Nullable net.minecraft.network.chat.MutableComponent hoverText, com.ldtteam.blockui.controls.ButtonHandler handler) Render a tab button at the given position, with an icon and a button handler.voidsetTabXOffset(int tabXOffset) Override the tab X offset.voidsetTabYOffset(int tabYOffset) Override the tab Y offset.voidsetTabYSpacing(int tabYSpacing) Override the tab Y spacing.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.minecolonies.core.client.gui.modules.IWindowModule
onButtonClicked, onClosed, onOpened, onUpdate
-
Constructor Details
-
TabsWindowModule
Constructor to initiate the tab window module.- Parameters:
parent- the parenting window.iconRandom- the random generator for creating the icons, should use a consistent seed upon reload so it generates the same icons each time it's opened.
-
-
Method Details
-
setTabXOffset
public void setTabXOffset(int tabXOffset) Override the tab X offset. -
setTabYOffset
public void setTabYOffset(int tabYOffset) Override the tab Y offset. -
setTabYSpacing
public void setTabYSpacing(int tabYSpacing) Override the tab Y spacing. -
renderTabButton
public void renderTabButton(int index, TabsWindowModule.TabImageSide side, net.minecraft.resources.ResourceLocation icon, @Nullable @Nullable net.minecraft.network.chat.MutableComponent hoverText, com.ldtteam.blockui.controls.ButtonHandler handler) Render a tab button at the given position, with an icon and a button handler.- Parameters:
index- the numeric index on the side.side- which side to render the tab on.icon- the icon to render in the tab.handler- the button handler.
-