A retro-styled menu in JavaScript, HTML & CSS.
Originally developed for POKE THE GAME.
You can easily create alerts, prompts and confirm dialogs. As such it is also a very nice replacement for the built-in window methods.
//show a nice dialog
RetroMenu.alert_dialog("Message", "I am a nice message. ", function(){
//destroy it on enter
this.destroy();
});
Run Code
RetroMenu.confirm_dialog("Confirm me", "Are you OK?", function(response){
//close dialog
this.destroy();
//Did we answer OK or cancel.
if(response){
RetroMenu.alert_dialog("Response", "That's great!", function(){
this.destroy();
});
} else {
RetroMenu.alert_dialog("Response", "You should better go see a doctor. ", function(){
this.destroy();
});
}
});
Run Code
RetroMenu.prompt_dialog("Question", "What is your name?", "<Your name here>", function(name){
this.destroy();
RetroMenu.alert_dialog("Response", "Hello "+name, function(){this.destroy(); });
});
Run Code