fix kone-chan's code
This commit is contained in:
parent
ca532da0c6
commit
16cfb43fc5
22642
javascript/classes.js
22642
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.audio.SoundHandler;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
@ -344,10 +343,9 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
|
||||
if (isMouseInside(mouseX, mouseY, (x+width)-70, y+90, (x+width)-40, y+120) && mouseButton == 0) {
|
||||
playPressSound();
|
||||
switch(currentView){
|
||||
case "normalView":
|
||||
if(currentView == "normalView"){
|
||||
currentView = "gridView";
|
||||
case "gridView":
|
||||
}else if(currentView == "gridView"){
|
||||
currentView = "normalView";
|
||||
}
|
||||
}
|
||||
|
@ -358,8 +356,8 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
int numElementsX = 0;
|
||||
for (Mod m : Resent.INSTANCE.modManager.modules) {
|
||||
if (!m.isAdmin() && m.getName().toLowerCase().startsWith(searchString.toLowerCase()) && selectedMod == null) {
|
||||
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
||||
if (currentView == "normalView") {
|
||||
if (y+125+offset+scrollOffset > y+95 && y+175+offset+scrollOffset < y+height && part == "Home") {
|
||||
if (isMouseInside(mouseX, mouseY, x+width-70, y+140+offset+scrollOffset, x+width-50, y+140+offset+scrollOffset+20) && mouseButton == 0 && m.doesHaveSetting()) {
|
||||
selectedMod = m;
|
||||
playPressSound();
|
||||
|
@ -378,20 +376,30 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
playPressSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
offset += 60;
|
||||
}else if(currentView == "gridView"){
|
||||
} else if(currentView == "gridView"){
|
||||
if (y+125+offset+scrollOffset > y+95 && y+240+offset+scrollOffset < y+height) {
|
||||
if (isMouseInside(mouseX, mouseY, x+140+offsetX, (int) y+220+offset+scrollOffset, x+160+offsetX, (int) y+240+offset+scrollOffset) && mouseButton == 0 && m.doesHaveSetting()) {
|
||||
selectedMod = m;
|
||||
playPressSound();
|
||||
drawSetting();
|
||||
}
|
||||
|
||||
if (isMouseInside(mouseX, mouseY, x+92+offsetX, y+222+offset+scrollOffset, x+127+offsetX, y+237+offset+scrollOffset)) {
|
||||
if (isMouseInside(mouseX, mouseY, x+85+offsetX, y+125+offset+scrollOffset, x+175+offsetX, y+250+offset+scrollOffset)) {
|
||||
if (mouseButton == 1 && m.doesHaveSetting()) {
|
||||
selectedMod = m;
|
||||
playPressSound();
|
||||
drawSetting();
|
||||
}
|
||||
|
||||
if (mouseButton == 0 && selectedMod == null) {
|
||||
m.toggle();
|
||||
playPressSound();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
numElementsX++;
|
||||
offsetX += 100;
|
||||
if (numElementsX % numElements == 0) {
|
||||
|
@ -400,8 +408,6 @@ public class ClickGuiRewrite extends GuiScreen {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedMod != null) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user