scaledresolution cancer
This commit is contained in:
parent
19316b7711
commit
f4535f9028
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
122425
javascript/classes.js
122425
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -16,12 +16,14 @@ import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
import net.minecraft.client.gui.Gui;
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
|
||||||
public class ClickGUI extends GuiScreen {
|
public class ClickGUI extends GuiScreen {
|
||||||
|
|
||||||
public Mod modWatching = null;
|
public Mod modWatching = null;
|
||||||
public ModManager modManager;
|
public ModManager modManager;
|
||||||
|
public ScaledResolution sr;
|
||||||
public int x, y, width, height;
|
public int x, y, width, height;
|
||||||
public int offset = 0;
|
public int offset = 0;
|
||||||
public float offsety = 20;
|
public float offsety = 20;
|
||||||
|
@ -29,16 +31,16 @@ public class ClickGUI extends GuiScreen {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
modManager = new ModManager();
|
|
||||||
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
||||||
int xo = 0;
|
int xo = 0;
|
||||||
int xy = -30;
|
int xy = -30;
|
||||||
|
|
||||||
|
sr = new ScaledResolution(mc);
|
||||||
fr = Minecraft.getMinecraft().fontRendererObj;
|
fr = Minecraft.getMinecraft().fontRendererObj;
|
||||||
width = GuiScreen.width - x;
|
width = GuiScreen.width - x;
|
||||||
height = GuiScreen.height - y;
|
height = GuiScreen.height - y;
|
||||||
x = mc.displayWidth / 8 + xo;
|
x = sr.getScaledWidth() / 8 + xo;
|
||||||
y = mc.displayHeight / (int) 1.1 - 10 + xy;
|
y = sr.getScaledHeight() / (int) 1.1 - 10 + xy;
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
for (int i = 0; i < modManager.modules.size(); i++) {
|
for (int i = 0; i < modManager.modules.size(); i++) {
|
||||||
|
@ -101,6 +103,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mouseX, int mouseY, float par3) {
|
public void drawScreen(int mouseX, int mouseY, float par3) {
|
||||||
modManager = new ModManager();
|
modManager = new ModManager();
|
||||||
|
sr = new ScaledResolution(mc);
|
||||||
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
offset = MathHelper.clamp_int(MathHelper.clamp_int(offset, 0, getListMaxScroll()), 0, getListMaxScroll());
|
||||||
int xo = 0;
|
int xo = 0;
|
||||||
int xy = -30;
|
int xy = -30;
|
||||||
|
@ -108,8 +111,8 @@ public class ClickGUI extends GuiScreen {
|
||||||
fr = Minecraft.getMinecraft().fontRendererObj;
|
fr = Minecraft.getMinecraft().fontRendererObj;
|
||||||
width = GuiScreen.width - x;
|
width = GuiScreen.width - x;
|
||||||
height = GuiScreen.height - y;
|
height = GuiScreen.height - y;
|
||||||
x = mc.displayWidth / 8 + xo;
|
x = sr.getScaledWidth() / 8 + xo;
|
||||||
y = mc.displayHeight / (int) 1.1 - 10 + xy;
|
y = sr.getScaledHeight() / (int) 1.1 - 10 + xy;
|
||||||
int off = 0;
|
int off = 0;
|
||||||
|
|
||||||
// background
|
// background
|
||||||
|
|
Loading…
Reference in New Issue
Block a user