-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CSGOWatermark module added and version rename
- Loading branch information
1 parent
7e68ff0
commit 9963d12
Showing
6 changed files
with
55 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
org.gradle.jvmargs=-Xmx3G | ||
modGroup=me.earth | ||
modVersion=2.0.2 | ||
modVersion=2.0.3 | ||
modBaseName=NsmPhobos | ||
forgeVersion=1.12.2-14.23.5.2768 | ||
mcpVersion=stable_39 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/me/earth/phobos/features/modules/client/CSGOWatermark.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package me.earth.phobos.features.modules.client; | ||
|
||
import me.earth.phobos.Phobos; | ||
import me.earth.phobos.event.events.Render2DEvent; | ||
import me.earth.phobos.features.modules.Module; | ||
import me.earth.phobos.features.setting.Setting; | ||
import me.earth.phobos.util.ColorUtil; | ||
import me.earth.phobos.util.ColorUtil1; | ||
import me.earth.phobos.util.RenderUtil; | ||
import me.earth.phobos.util.Timer; | ||
|
||
public class CSGOWatermark extends Module { | ||
Timer delayTimer = new Timer(); | ||
public Setting<Integer> X = this.register(new Setting("WatermarkX", 0, 0, 300)); | ||
public Setting<Integer> Y = this.register(new Setting("WatermarkY", 0, 0, 300)); | ||
public Setting<Integer> delay = this.register(new Setting<Object>("Delay", 240, 0, 600)); | ||
public Setting<Integer> saturation = this.register(new Setting<Object>("Saturation", 127, 1, 255)); | ||
public Setting<Integer> brightness = this.register(new Setting<Object>("Brightness", 100, 0, 255)); | ||
public float hue; | ||
public int red = 1; | ||
public int green = 1; | ||
public int blue = 1; | ||
|
||
private String message = ""; | ||
|
||
public CSGOWatermark() { | ||
super("CSGOWatermark", "noat em cee actually makes something", Module.Category.CLIENT, true, false, false); | ||
} | ||
|
||
@Override | ||
public void onRender2D(Render2DEvent event) { | ||
drawCsgoWatermark(); | ||
} | ||
|
||
public void drawCsgoWatermark() { | ||
int padding = 5; | ||
message = "Nsm Phobos v" + Phobos.MODVER + " | " + mc.player.getName() + " | " + Phobos.serverManager.getPing() + "ms"; | ||
Integer textWidth = mc.fontRenderer.getStringWidth(message); // taken from wurst+ 3 | ||
Integer textHeight = mc.fontRenderer.FONT_HEIGHT; // taken from wurst+ 3 | ||
RenderUtil.drawRectangleCorrectly(X.getValue() - 4, Y.getValue() - 4, textWidth + 16, textHeight + 12, ColorUtil.toRGBA(22, 22, 22, 255)); | ||
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 4, textHeight + 4, ColorUtil.toRGBA(0, 0, 0, 255)); | ||
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 8, textHeight + 4, ColorUtil.toRGBA(0, 0, 0, 255)); | ||
RenderUtil.drawRectangleCorrectly(X.getValue(), Y.getValue(), textWidth + 8, 1, ColorUtil1.rainbow(this.delay.getValue()).hashCode()); | ||
mc.fontRenderer.drawString(message, X.getValue() + 3, Y.getValue() + 3, ColorUtil.toRGBA(255, 255, 255, 255), false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters