add crosshair texture
This commit is contained in:
parent
743afbed6d
commit
3e12a1c36a
3 changed files with 17 additions and 6 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue