Refactored to expose the ModMenu Integration to other Mods

This commit is contained in:
Frank 2021-08-20 03:05:36 +02:00
parent 5808bab08e
commit 0486b56ec3
4 changed files with 136 additions and 50 deletions

View file

@ -1,28 +0,0 @@
package ru.bclib.gui.screens.ModMenu;
import net.minecraft.client.gui.screens.Screen;
import net.minecraft.network.chat.CommonComponents;
import net.minecraft.network.chat.TranslatableComponent;
import org.jetbrains.annotations.Nullable;
import ru.bclib.gui.gridlayout.GridRow;
import ru.bclib.gui.gridlayout.GridScreen;
public class MainScreen extends GridScreen{
public MainScreen(@Nullable Screen parent) {
super(parent, new TranslatableComponent("title.bclib.modmenu.main"));
}
@Override
protected void initLayout() {
final int BUTTON_HEIGHT = 20;
grid.addSpacerRow(20);
GridRow row = grid.addRow();
row.addFiller();
row.addButton(CommonComponents.GUI_BACK, BUTTON_HEIGHT, font, (button)->{
onClose();
});
row.addFiller();
}
}