misc fixes
This commit is contained in:
parent
2783aaa2ce
commit
887401b0b8
3 changed files with 61 additions and 11 deletions
|
@ -339,7 +339,7 @@ public class Game implements IThreadListener {
|
|||
@Variable(name = "con_overlay", category = CVarCategory.CONSOLE, display = "Konsolen-Overlay")
|
||||
public boolean hudOverlay = true;
|
||||
@Variable(name = "con_position", category = CVarCategory.CONSOLE, display = "Position")
|
||||
public ConsolePos hudPos = ConsolePos.BOTTOM;
|
||||
public ConsolePos hudPos = ConsolePos.TOP;
|
||||
@Variable(name = "con_opacity", category = CVarCategory.CONSOLE, min = 0x00, max = 0xff, display = "Deckkraft Hintergrund")
|
||||
public int hudOpacity = 0x40;
|
||||
public boolean syncLimited;
|
||||
|
@ -2925,8 +2925,7 @@ public class Game implements IThreadListener {
|
|||
for(Iterator<Message> iter = log.iterator(); iter.hasNext();) {
|
||||
Message msg = iter.next();
|
||||
if((Timing.tmr_current - msg.time) <= fade) {
|
||||
Drawing.txt_draw(0, y, 0, y, this.fb_x, this.fb_y,
|
||||
(this.hudOpacity << 24) | 0xffffff, msg.message);
|
||||
Drawing.drawTextbox(msg.message, 0, y, (this.hudOpacity << 24) | 0x000000);
|
||||
y += this.hudPos == ConsolePos.BOTTOM ? -(Font.YGLYPH) : Font.YGLYPH;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -11,11 +11,20 @@ public class GuiInfo extends Gui {
|
|||
TextColor.GREEN + "" + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG + " " + TextColor.VIOLET + "" + Config.VERSION + "" +
|
||||
TextColor.GREEN + " " + TextColor.BUG + "" + TextColor.BUG + "" + TextColor.BUG + "\n" +
|
||||
"\n" +
|
||||
TextColor.LGRAY + "Ein kleine Anwendung zur Simulation, zum Testen, für Spiele, Musik und vieles" + "\n" +
|
||||
"mehr. Optimiert für Geschwindigkeit, Stabilität und" + TextColor.UNKNOWN + "" + TextColor.UNKNOWN + " [Speicherzugriffsfehler]";
|
||||
TextColor.LGRAY + "Ein Mod zur Simulation, zum Testen, für Rollenspiele, Multiplayer und vieles mehr." + "\n" +
|
||||
"Optimiert für Geschwindigkeit, Stabilität und" + TextColor.UNKNOWN + "" + TextColor.UNKNOWN + " [Speicherzugriffsfehler]";
|
||||
|
||||
private static final String[] AUTHORS = {TextColor.CYAN + "Sen der \"kleine\" Dämon " + TextColor.CRIMSON + TextColor.DEMON + TextColor.BLACK + TextColor.BLKHEART};
|
||||
private static final String[] LIBRARIES = {"LWJGL 3.3.6+1 (GLFW + OpenGL)", "Netty 4.1.119-Final", "Guava 33.4.0", "Albert Pham - WorldEdit", "Joonas Vali - NameGenerator", "LWJGL 2.9.4-nightly-20150209 - GLUProject"};
|
||||
private static final String[] AUTHORS = {
|
||||
TextColor.CYAN + "Sen der \"kleine\" Dämon " + TextColor.CRIMSON + TextColor.DEMON + TextColor.BLACK + TextColor.BLKHEART
|
||||
};
|
||||
private static final String[] LIBRARIES = {
|
||||
"LWJGL 3.3.6+1 (GLFW + OpenGL)",
|
||||
"Netty 4.1.119-Final",
|
||||
"Guava 33.4.0",
|
||||
"Albert Pham - WorldEdit",
|
||||
"Joonas Vali - NameGenerator",
|
||||
"LWJGL 2.9.4-nightly-20150209 - GLUProject"
|
||||
};
|
||||
|
||||
public static final GuiInfo INSTANCE = new GuiInfo("Über dieses Programm", INFO + "\n\n" + getLibraries(false) + "\n\n" + getCredits(false) + "\n\n" + getColors());
|
||||
public static final GuiInfo HAX = new GuiInfo("Üb3r d1es3n Cr4ck", INFO + "\n\n" + getLibraries(true) + "\n\n" + getCredits(true) + "\n\n" + getColors());
|
||||
|
|
|
@ -4,11 +4,13 @@ import game.color.TextColor;
|
|||
import game.gui.element.ActButton;
|
||||
import game.gui.element.Label;
|
||||
import game.gui.element.Textbox;
|
||||
import game.gui.element.ActButton.Mode;
|
||||
import game.gui.element.Textbox.Action;
|
||||
import game.gui.world.GuiWorlds;
|
||||
import game.init.Config;
|
||||
import game.renderer.Drawing;
|
||||
import game.rng.Random;
|
||||
import game.util.ExtMath;
|
||||
import game.util.Splashes;
|
||||
import game.util.Timing;
|
||||
import game.window.Keysym;
|
||||
|
@ -29,6 +31,7 @@ public class GuiMenu extends Gui {
|
|||
private final Random rand = new Random();
|
||||
|
||||
private Label splashLabel;
|
||||
private ActButton infoButton;
|
||||
|
||||
private int ticks;
|
||||
private int hacked;
|
||||
|
@ -48,9 +51,48 @@ public class GuiMenu extends Gui {
|
|||
this.ticks = 0;
|
||||
this.hacked = 0;
|
||||
this.resetAnimation();
|
||||
this.add(new ActButton(0, 0, 400, 24, (Gui)GuiWorlds.INSTANCE, "Einzelspieler"));
|
||||
this.add(new ActButton(0, 28, 400, 24, (Gui)GuiConnect.INSTANCE, "Mehrspieler"));
|
||||
this.add(new ActButton(0, 56, 400, 24, GuiInfo.INSTANCE, "Info / Über / Mitwirkende"));
|
||||
this.add(new ActButton(0, 0, 400, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, Mode action) {
|
||||
if(GuiMenu.this.hacked == 9) {
|
||||
GuiMenu.this.hacked++;
|
||||
GuiMenu.this.splashLabel.setText(TextColor.VIOLET + "Hax!");
|
||||
}
|
||||
else {
|
||||
GuiMenu.this.gm.displayGuiScreen(GuiWorlds.INSTANCE);
|
||||
}
|
||||
}
|
||||
}, "Einzelspieler"));
|
||||
this.add(new ActButton(0, 28, 400, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, Mode action) {
|
||||
if(GuiMenu.this.hacked == 8)
|
||||
GuiMenu.this.hacked++;
|
||||
else
|
||||
GuiMenu.this.gm.displayGuiScreen(GuiConnect.INSTANCE);
|
||||
}
|
||||
}, "Mehrspieler"));
|
||||
this.infoButton = this.add(new ActButton(0, 56, 400, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, Mode action) {
|
||||
GuiMenu.this.gm.displayGuiScreen(GuiMenu.this.hacked == 10 ? GuiInfo.HAX : GuiInfo.INSTANCE);
|
||||
}
|
||||
}, "Info / Über / Mitwirkende") {
|
||||
public void drawHover() {
|
||||
if(GuiMenu.this.hacked == 10) {
|
||||
Drawing.drawRectColor(this.pos_x, this.pos_y, this.size_x, this.size_y, (this.gm.style.hover & 0xff000000) | 0x7f00ff);
|
||||
GuiMenu.this.rand.setSeed(((long)this.gm.mouse_x * 7652657L) ^ ((long)this.gm.mouse_y * 87262826276L));
|
||||
int width = Drawing.getWidth("Hax!");
|
||||
for(int z = 0; z < 64; z++) {
|
||||
Drawing.drawText("Hax!", GuiMenu.this.rand.zrange(Math.max(1, this.gm.fb_x - width)) +
|
||||
(int)(ExtMath.sin(((float)(GuiMenu.this.ticks + GuiMenu.this.rand.zrange(256)) + (float)Timing.tick_fraction) / 100.0f * (float)Math.PI * 2.0f) * 16.0f),
|
||||
GuiMenu.this.rand.zrange(Math.max(1, this.gm.fb_y - Font.YGLYPH)) +
|
||||
(int)(ExtMath.sin(((float)(GuiMenu.this.ticks + GuiMenu.this.rand.zrange(256)) + (float)Timing.tick_fraction) / 100.0f * (float)Math.PI * 2.0f) * 16.0f),
|
||||
0xff0000ff | (GuiMenu.this.rand.zrange(256) << 16));
|
||||
}
|
||||
}
|
||||
else {
|
||||
super.drawHover();
|
||||
}
|
||||
}
|
||||
});
|
||||
this.add(new ActButton(0, 102, 196, 24, GuiOptions.getPage(), "Einstellungen"));
|
||||
this.add(new ActButton(204, 102, 196, 24, new ActButton.Callback() {
|
||||
public void use(ActButton elem, ActButton.Mode action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue