1
0
Fork 0

add crosshair customization

This commit is contained in:
Sen 2025-07-03 12:45:26 +02:00
parent 9cefe7602b
commit e78bd9cce6
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
5 changed files with 32 additions and 8 deletions

View file

@ -481,6 +481,12 @@ public class Client implements IThreadListener {
public int downfallRange = 4;
@Variable(name = "draw_rain_particle_range", category = CVarCategory.RENDER, min = 0, max = 25, display = "Regen-Partikel-Radius")
public int rainParticleRange = 10;
@Variable(name = "crosshair_size", category = CVarCategory.GUI, min = 0, max = 32, display = "Größe des Fadenkreuzes")
public int crosshairSize = 10;
@Variable(name = "crosshair_color_notarget", type = IntType.COLOR, category = CVarCategory.GUI, display = "Fadenkreuz-Farbe (ohne Ziel)")
public int crosshairColorBase = 0xffcfcfcf;
@Variable(name = "crosshair_color_target", type = IntType.COLOR, category = CVarCategory.GUI, display = "Fadenkreuz-Farbe (mit Ziel)")
public int crosshairColorTarget = 0xffffffff;
@Variable(name = "tic_target", category = CVarCategory.SYSTEM, min = 1.0f, max = 1200.0f, callback = TickFunction.class, display = "Tickrate")
public float tpsTarget = 20.0f;
@ -942,9 +948,9 @@ public class Client implements IThreadListener {
if(this.drawDebug) {
this.renderWorldDirections((float)this.tick_fraction);
}
else {
Drawing.drawRect(this.fb_x / 2 - 1, this.fb_y / 2 - 16, 2, 32, this.pointed != null && this.pointed.type != ObjectType.MISS ? 0xffffffff : 0xffcfcfcf);
Drawing.drawRect(this.fb_x / 2 - 16, this.fb_y / 2 - 1, 32, 2, this.pointed != null && this.pointed.type != ObjectType.MISS ? 0xffffffff : 0xffcfcfcf);
else if(this.crosshairSize > 0) {
Drawing.drawRect(this.fb_x / 2 - 1, this.fb_y / 2 - this.crosshairSize, 2, this.crosshairSize * 2, this.pointed != null && this.pointed.type != ObjectType.MISS ? this.crosshairColorTarget : this.crosshairColorBase);
Drawing.drawRect(this.fb_x / 2 - this.crosshairSize, this.fb_y / 2 - 1, this.crosshairSize * 2, 2, this.pointed != null && this.pointed.type != ObjectType.MISS ? this.crosshairColorTarget : this.crosshairColorBase);
}
}
if(this.world != null && this.open == null) {