I’m curious, but how do you guys make dialog box (like JOptionPane) in 2d games for example in slick2d ?
I would like to have confirm and message dialog, to pop up on some of the actions.
Are there any examples ?
In libgdx:
new Dialog("Some Dialog", skin, "dialog") {
protected void result (Object object) {
System.out.println("Chosen: " + object);
}
}.text("Are you enjoying this demo?").button("Yes", true).button("No", false).key(Keys.ENTER, true)
.key(Keys.ESCAPE, false).show(stage);
Alright, that class is comes from libgdx http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/ui/Dialog.html
However, did anyone ever make himself a class Dialog ?
I mean honestly, you just need to do it. There’s no standard way of doing it. As a programmer you should be able to take problems and solve them, so solve this one!
Honestly, I just made it.