Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package me.aristhena.client.module.modules.render.hud;
- import java.awt.*;
- import me.aristhena.event.events.*;
- import me.aristhena.utils.*;
- import me.aristhena.client.*;
- import me.aristhena.client.module.*;
- import me.aristhena.client.module.Module;
- import java.util.*;
- public class PlainTheme extends Theme
- {
- public PlainTheme(final String name, final boolean value, final Module module) {
- super(name, value, module);
- }
- public static Color setRainbow(final long offset, final float fade) {
- final float hue = (System.nanoTime() * -5L + offset) / 1.0E10f % 1.0f;
- final long color = Long.parseLong(Integer.toHexString(Color.HSBtoRGB(hue, 1.0f, 1.0f)), 16);
- final Color c = new Color((int)color);
- return new Color(c.getRed() / 255.0f * fade, c.getGreen() / 255.0f * fade, c.getBlue() / 255.0f * fade);
- }
- @Override
- public boolean onRender(final Render2DEvent event) {
- if (super.onRender(event)) {
- int y = 2;
- ClientUtils.clientFont().drawStringWithShadow(Client.clientName, 2.0, 2.0, setRainbow(10000000L * y, 1.0f).getRGB());
- for (final Module mod : ModuleManager.getModulesForRender()) {
- if (mod.drawDisplayName((float)(event.getWidth() - ClientUtils.clientFont().getStringWidth(String.format("6%s" + ((mod.getSuffix().length() > 0) ? " ยง9[%s]" : ""), mod.getDisplayName(), mod.getSuffix())) - 2), (float)y, setRainbow(10000000L * y, 1.0f).getRGB())) {
- y += 10;
- }
- }
- }
- return super.onRender(event);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement