66import net .minecraft .client .gui .components .CycleButton ;
77import net .minecraft .client .gui .components .Tooltip ;
88import net .minecraft .client .gui .components .tabs .GridLayoutTab ;
9+ import net .minecraft .client .gui .components .tabs .MenuTabBar ;
910import net .minecraft .client .gui .components .tabs .TabManager ;
1011import net .minecraft .client .gui .components .tabs .TabNavigationBar ;
1112import net .minecraft .client .gui .layouts .GridLayout ;
2122import net .minecraft .network .chat .Component ;
2223import net .minecraft .world .entity .LivingEntity ;
2324import net .minecraftcapes .config .MinecraftCapesConfig ;
24- import net .minecraftcapes .player .DownloadManager ;
2525import net .minecraftcapes .player .PlayerHandler ;
2626import org .joml .Quaternionf ;
2727import org .joml .Vector3f ;
@@ -34,15 +34,15 @@ public class MenuScreen extends Screen {
3434 private static final Component TITLE = Component .translatable ("gui.minecraftcapes.title" );
3535 private final HeaderAndFooterLayout layout = new HeaderAndFooterLayout (this );
3636 private final TabManager tabManager = new TabManager (this ::addRenderableWidget , this ::removeWidget );
37- private @ Nullable TabNavigationBar tabNavigationBar ;
37+ private @ Nullable MenuTabBar tabNavigationBar ;
3838
3939 public MenuScreen () {
4040 super (TITLE );
4141 }
4242
4343 @ Override
4444 protected void init () {
45- this .tabNavigationBar = TabNavigationBar .builder (this .tabManager , this .width )
45+ this .tabNavigationBar = MenuTabBar .builder (this .tabManager , this .width )
4646 .addTabs (new MenuScreen .GeneralTab (), new OptionsTab (), new MenuScreen .LinksTab ())
4747 .build ();
4848 this .setFocused (this .tabNavigationBar );
@@ -60,7 +60,7 @@ protected void init() {
6060 @ Override
6161 protected void repositionElements () {
6262 if (this .tabNavigationBar != null ) {
63- this .tabNavigationBar .updateWidth (this .width );
63+ this .tabNavigationBar .arrangeElements (this .width );
6464 int tabAreaTop = this .tabNavigationBar .getRectangle ().bottom ();
6565 ScreenRectangle tabArea = new ScreenRectangle (0 , tabAreaTop , this .width , this .height - this .layout .getFooterHeight () - tabAreaTop );
6666 this .tabManager .setTabArea (tabArea );
0 commit comments