diff --git a/client/src/main/java/client/Client.java b/client/src/main/java/client/Client.java index ed606813..ba9232ff 100755 --- a/client/src/main/java/client/Client.java +++ b/client/src/main/java/client/Client.java @@ -618,6 +618,8 @@ public class Client implements IThreadListener { private int crosshairColorBase = 0xffcfcfcf; @Variable(name = "crosshair_color_target", type = IntType.COLOR, category = CVarCategory.GUI, display = "Fadenkreuz-Farbe (mit Ziel)") private int crosshairColorTarget = 0xffffffff; + @Variable(name = "crosshair_simple", category = CVarCategory.GUI, display = "Einfaches Fadenkreuz") + private boolean crosshairSimple = false; @Variable(name = "info_overlay", category = CVarCategory.GUI, display = "Informations-Overlay") private boolean infoOverlay = true; @@ -1110,8 +1112,15 @@ public class Client implements IThreadListener { this.renderWorldDirections((float)this.tickFraction); } else if(this.crosshairSize > 0) { - Drawing.drawRect(this.fbX / 2 - 1, this.fbY / 2 - this.crosshairSize, 2, this.crosshairSize * 2, this.pointed != null && this.pointed.type != ObjectType.MISS ? this.crosshairColorTarget : this.crosshairColorBase); - Drawing.drawRect(this.fbX / 2 - this.crosshairSize, this.fbY / 2 - 1, this.crosshairSize * 2, 2, this.pointed != null && this.pointed.type != ObjectType.MISS ? this.crosshairColorTarget : this.crosshairColorBase); + final int color = this.pointed != null && this.pointed.type != ObjectType.MISS ? this.crosshairColorTarget : this.crosshairColorBase; + if(this.crosshairSimple) { + Drawing.drawRect(this.fbX / 2 - 1, this.fbY / 2 - this.crosshairSize, 2, this.crosshairSize * 2, color); + Drawing.drawRect(this.fbX / 2 - this.crosshairSize, this.fbY / 2 - 1, this.crosshairSize * 2, 2, color); + } + else { + GlState.color(color); + Drawing.drawTexturedRect(this, "textures/crosshair.png", 32, 32, this.fbX / 2 - 16, this.fbY / 2 - 16, 0, 0, 32, 32); + } } } diff --git a/client/src/main/java/client/gui/options/GuiGraphics.java b/client/src/main/java/client/gui/options/GuiGraphics.java index 9a4939b4..25b0b450 100644 --- a/client/src/main/java/client/gui/options/GuiGraphics.java +++ b/client/src/main/java/client/gui/options/GuiGraphics.java @@ -12,12 +12,14 @@ public class GuiGraphics extends GuiOptions { this.addSelector("draw_void_fog", 242, 20, 240, 0); this.addSelector("draw_player_firstperson", 0, 40, 240, 0); - this.addSelector("crosshair_size", 242, 40, 240, 0); + + this.addSelector("crosshair_simple", 0, 60, 240, 0); + this.addSelector("crosshair_size", 242, 60, 240, 0); - this.addSelector("crosshair_color_notarget", 0, 80, 240, 0); - this.addSelector("crosshair_color_target", 242, 80, 240, 0); + this.addSelector("crosshair_color_notarget", 0, 100, 240, 0); + this.addSelector("crosshair_color_target", 242, 100, 240, 0); - this.addSelector("hud_margin", 0, 120, 240, 0); + this.addSelector("hud_margin", 0, 140, 240, 0); super.init(width, height); } diff --git a/client/src/main/resources/textures/crosshair.png b/client/src/main/resources/textures/crosshair.png new file mode 100644 index 00000000..24cb6c8c Binary files /dev/null and b/client/src/main/resources/textures/crosshair.png differ