Balls animations
This commit is contained in:
parent
d94ffce9c9
commit
90e65754e0
|
@ -36,16 +36,16 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
public float x, y, width, height;
|
public float x, y, width, height;
|
||||||
public Animation introAnimation;
|
public Animation introAnimation;
|
||||||
public ScaledResolution sr;
|
public ScaledResolution sr;
|
||||||
public boolean closing, isSearchFocused;
|
public boolean closing, isSearchFocused, iforgor, iforgor2 = true;
|
||||||
public Mod selectedMod;
|
public Mod selectedMod;
|
||||||
public String searchString = "";
|
public String searchString = "";
|
||||||
public SimpleAnimation partAnimation = new SimpleAnimation(0);
|
public SimpleAnimation partAnimation;
|
||||||
public int backgroundColor = new Color(18, 18, 18).getRGB(),
|
public int backgroundColor = new Color(18, 18, 18).getRGB(),
|
||||||
primaryColor = 0xFF000000,
|
primaryColor = 0xFF000000,
|
||||||
secondaryColor = new Color(33, 33, 33).getRGB(),
|
secondaryColor = new Color(33, 33, 33).getRGB(),
|
||||||
onSurfaceColor = new Color(3, 218, 197).getRGB(),
|
onSurfaceColor = new Color(3, 218, 197).getRGB(),
|
||||||
secondaryFontColor = new Color(187, 134, 252).getRGB();
|
secondaryFontColor = new Color(187, 134, 252).getRGB();
|
||||||
public int partOffset = 0, scrollOffset = 0;
|
public int scrollOffset = 0;
|
||||||
public String part = "Home";
|
public String part = "Home";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -73,8 +73,14 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
fr.drawString("Resent", x + 80, y + 36, -1, false);
|
fr.drawString("Resent", x + 80, y + 36, -1, false);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
|
|
||||||
|
if (iforgor) {
|
||||||
|
partAnimation.setAnimation(50, 9);
|
||||||
|
} else if (iforgor2) {
|
||||||
|
partAnimation.setAnimation(0, 9);
|
||||||
|
}
|
||||||
|
|
||||||
//Navigation selection
|
//Navigation selection
|
||||||
RenderUtils.drawRoundedRect(x + 15, (int) y + 115 + partAnimation.getValue(), x + 45, y + 145 + partAnimation.getValue(), 8, secondaryFontColor);
|
RenderUtils.drawRoundedRect(x + 15, y + 115 + partAnimation.getValue(), x + 45, y + 145 + partAnimation.getValue(), 8, secondaryFontColor);
|
||||||
|
|
||||||
//Navigation icons
|
//Navigation icons
|
||||||
GlStateManager.color(1, 1, 1);
|
GlStateManager.color(1, 1, 1);
|
||||||
|
@ -162,9 +168,11 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
|
|
||||||
if (isMouseInside(mouseX, mouseY, x + 20, (int) y + 170, x + 40, (int) y + 190)) {
|
if (isMouseInside(mouseX, mouseY, x + 20, (int) y + 170, x + 40, (int) y + 190)) {
|
||||||
partAnimation.setAnimation(50 - partOffset, 10);
|
iforgor2 = false;
|
||||||
|
iforgor = true;
|
||||||
} else if (isMouseInside(mouseX, mouseY, x + 20, (int) y + 120, x + 40, (int) y + 140)) {
|
} else if (isMouseInside(mouseX, mouseY, x + 20, (int) y + 120, x + 40, (int) y + 140)) {
|
||||||
partAnimation.setAnimation(0 - partOffset, 10);
|
iforgor = false;
|
||||||
|
iforgor2 = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMouseInside(mouseX, mouseY, x + width - 300, y + 25, x + width - 50, y + 65)) {
|
if (isMouseInside(mouseX, mouseY, x + width - 300, y + 25, x + width - 50, y + 65)) {
|
||||||
|
@ -206,6 +214,7 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
height = sr.getScaledHeight() / 1.25F;
|
height = sr.getScaledHeight() / 1.25F;
|
||||||
introAnimation = Theme.getAnimation(500, 1, 3, 3.8F, 1.35F, false);
|
introAnimation = Theme.getAnimation(500, 1, 3, 3.8F, 1.35F, false);
|
||||||
fr = mc.fontRendererObj;
|
fr = mc.fontRendererObj;
|
||||||
|
partAnimation = new SimpleAnimation(0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -254,6 +263,6 @@ public class ClickGuiRewrite extends GuiScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxScroll() {
|
public int getMaxScroll() {
|
||||||
return Resent.INSTANCE.modManager.modules.size() * -69;
|
return Resent.INSTANCE.modManager.modules.size() * -70;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user