Gui centering
This commit is contained in:
parent
eeb8e19ed1
commit
06b76c070d
12763
javascript/classes.js
12763
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -7,10 +7,13 @@ import dev.resent.module.base.Mod.Category;
|
||||||
@Module(name = "FullBright", category = Category.MISC)
|
@Module(name = "FullBright", category = Category.MISC)
|
||||||
public class Fullbright extends Mod {
|
public class Fullbright extends Mod {
|
||||||
|
|
||||||
|
public float previousGamma;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
||||||
//Resent.INSTANCE.soundManager.playAvasDedication();
|
//Resent.INSTANCE.soundManager.playAva();
|
||||||
|
previousGamma = mc.gameSettings.gammaSetting;
|
||||||
mc.gameSettings.gammaSetting = 100;
|
mc.gameSettings.gammaSetting = 100;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +22,7 @@ public class Fullbright extends Mod {
|
||||||
public void onDisable() {
|
public void onDisable() {
|
||||||
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
if (mc.thePlayer != null && mc.theWorld != null && mc.gameSettings != null) {
|
||||||
//Resent.INSTANCE.soundManager.stopMusic();
|
//Resent.INSTANCE.soundManager.stopMusic();
|
||||||
mc.gameSettings.gammaSetting = 1;
|
mc.gameSettings.gammaSetting = previousGamma;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class SoundManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
// <3
|
// <3
|
||||||
public void playAv(){
|
public void playAva(){
|
||||||
ISound sound = PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1);
|
ISound sound = PositionedSoundRecord.create(new ResourceLocation("minecraft:music.res"), 1);
|
||||||
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
Minecraft.getMinecraft().getSoundHandler().stopSounds();
|
||||||
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
|
Minecraft.getMinecraft().getSoundHandler().playSound(sound);
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class ClickGUI extends GuiScreen {
|
||||||
if(s instanceof CustomRectSettingDraw){
|
if(s instanceof CustomRectSettingDraw){
|
||||||
Gui.drawRect(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, isMouseInside(mouseX, mouseY, x+21, height+39+var, x+26+fr.getStringWidth(s.name), height+var+51) ? new Color(20, 20, 100, 70).getRGB() : new Color(20, 50, 170).getRGB());
|
Gui.drawRect(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, isMouseInside(mouseX, mouseY, x+21, height+39+var, x+26+fr.getStringWidth(s.name), height+var+51) ? new Color(20, 20, 100, 70).getRGB() : new Color(20, 50, 170).getRGB());
|
||||||
RenderUtils.drawRectOutline(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, -1);
|
RenderUtils.drawRectOutline(x+21, height+41+var, x+27+fr.getStringWidth(s.name), height+var+53, -1);
|
||||||
fr.drawStringWithShadow(s.name, this.x + 24, height +41 + var, -1);
|
fr.drawStringWithShadow(s.name, this.x + 24, height +43 + var, -1);
|
||||||
var += 3;
|
var += 3;
|
||||||
}
|
}
|
||||||
if (s instanceof BooleanSetting) {
|
if (s instanceof BooleanSetting) {
|
||||||
|
|
|
@ -2,7 +2,6 @@ package dev.resent.ui;
|
||||||
|
|
||||||
import dev.resent.client.Resent;
|
import dev.resent.client.Resent;
|
||||||
import dev.resent.module.base.RenderMod;
|
import dev.resent.module.base.RenderMod;
|
||||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
import net.minecraft.client.gui.GuiButton;
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
|
||||||
|
@ -13,7 +12,6 @@ public class HUDConfigScreen extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onGuiClosed() {
|
public void onGuiClosed() {
|
||||||
Keyboard.enableRepeatEvents(false);
|
|
||||||
mc.gameSettings.saveOptions();
|
mc.gameSettings.saveOptions();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user