mirror of
https://github.com/Oth3r/Sit.git
synced 2025-09-20 00:13:21 +02:00
1.21.3 port
This commit is contained in:
parent
185dd93a2e
commit
77cec2ff8c
6 changed files with 20 additions and 20 deletions
|
@ -5,8 +5,10 @@ import net.minecraft.client.gui.DrawContext;
|
|||
import net.minecraft.client.gui.screen.ConfirmLinkScreen;
|
||||
import net.minecraft.client.gui.screen.Screen;
|
||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||
import net.minecraft.client.render.RenderLayer;
|
||||
import net.minecraft.text.Text;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.ColorHelper;
|
||||
import one.oth3r.sit.file.FileData;
|
||||
import one.oth3r.sit.utl.Data;
|
||||
|
||||
|
@ -58,6 +60,7 @@ public class ConfigScreen extends Screen {
|
|||
@Override
|
||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
||||
super.render(context, mouseX, mouseY, delta);
|
||||
|
||||
// todo fade in like the title screen on first load?
|
||||
renderBanner(context,width/2 - 64,this.height / 4 -38,1);
|
||||
}
|
||||
|
@ -68,12 +71,11 @@ public class ConfigScreen extends Screen {
|
|||
}
|
||||
|
||||
private void renderBanner(DrawContext context, int x, int y, float alpha) {
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, alpha);
|
||||
RenderSystem.enableBlend();
|
||||
|
||||
context.drawTexture(Identifier.of(Data.MOD_ID, "textures/gui/banner.png"), x, y, 0.0f, 0.0f, 128, 72, 128, 72);
|
||||
context.drawTexture(RenderLayer::getGuiTextured,Identifier.of(Data.MOD_ID, "textures/gui/banner.png"),
|
||||
x, y, 0.0f, 0.0f, 128, 72, 128, 72, ColorHelper.getWhite(alpha));
|
||||
|
||||
context.setShaderColor(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue