Hello everyone! First off, something I need to let off my chest before I get to the question. Why the trivia? I suppose I should start using .hashCode().
Anyways, I am making a RPG that uses Dialog Boxes. This isn’t stuff like a JOptionPane or anything. It’s a custom DialogBox that is made of an extension of the Rectangle class in java.awt. All the previous should work. However, the thing that doesn’t work is waiting for user input. I have tried doing it by having a mouse listener that checks if the next “button” is “clicked.” (All the “” because it’s not really a button and can’t truly be clicked like a button. It’s merely the class I have that is extended from the java.awt.Rectangle. It’s called DRoundRect for future reference, and draws a round rectangle using the method Graphics g.drawRoundRect(); ) However, this doesn’t work and immediately skips to the next dialog box, then the next, then the next until it gets to the last dialog box.
All of these dialog boxes are in a Canvas, which has a buffer strategy and Graphics by using bufferStrategy.getDrawGraphics();
Here’s the code - http://pastebin.java-gaming.org/00f901c6c2213
There’s of course code deleted from the paste bin. If you need the complete code, I can easily post it.
Thank you for helping, and if you didn’t help, thank you for reading!