mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 06:51:32 +01:00
Version Watermark
This commit is contained in:
parent
317ea3ff1b
commit
cee7749279
@ -6,6 +6,7 @@ import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||
import net.silentclient.client.mods.settings.GeneralMod;
|
||||
|
||||
public class Watermark {
|
||||
@ -34,6 +35,35 @@ public class Watermark {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation("silentclient/logos/logo.png"));
|
||||
Gui.drawModalRectWithCustomSizedTexture(x, y, 0.0F, 0.0F, 110, 21, 110.0F, 21.0F);
|
||||
|
||||
versionRender();
|
||||
}
|
||||
|
||||
public void versionRender() {
|
||||
ScaledResolution scaledResolution = new ScaledResolution(Minecraft.getMinecraft());
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int width = Client.getInstance().getSilentFontRenderer().getStringWidth(Client.getInstance().getFullVersion(), 10, SilentFontRenderer.FontType.TITLE) + 5;
|
||||
switch (Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Silent Logo Location").getValString()) {
|
||||
case "Bottom Right Corner":
|
||||
x = 5;
|
||||
y = scaledResolution.getScaledHeight() - 23;
|
||||
break;
|
||||
case "Bottom Left Corner":
|
||||
x = scaledResolution.getScaledWidth() - width;
|
||||
y = scaledResolution.getScaledHeight() - 23;
|
||||
break;
|
||||
case "Top Right Corner":
|
||||
x = 5;
|
||||
y = 3;
|
||||
break;
|
||||
case "Top Left Corner":
|
||||
x = scaledResolution.getScaledWidth() - width;
|
||||
y = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
Client.getInstance().getSilentFontRenderer().drawString(Client.getInstance().getFullVersion(), x, y + (21 / 2) - 5 + 3, 10, SilentFontRenderer.FontType.TITLE);
|
||||
}
|
||||
|
||||
public void render(int x, int y) {
|
||||
|
Loading…
Reference in New Issue
Block a user