Class TabsWindowModule

java.lang.Object
com.minecolonies.core.client.gui.modules.TabsWindowModule
All Implemented Interfaces:
IWindowModule

public class TabsWindowModule extends Object implements IWindowModule
  • Constructor Details

    • TabsWindowModule

      public TabsWindowModule(AbstractWindowSkeleton parent, Random iconRandom)
      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.