1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-23 21:07:17 +00:00

ads-game:: further improvements to the menu

This commit is contained in:
Zeno Rogue 2022-09-18 10:26:16 +02:00
parent 29ed17410b
commit d76b2156f2

View File

@ -3,6 +3,9 @@ namespace hr {
namespace ads_game { namespace ads_game {
void edit_difficulty() { void edit_difficulty() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen();
dialog::init(XLAT("AdS game parameters"), 0xC0C0FFFF, 150, 100); dialog::init(XLAT("AdS game parameters"), 0xC0C0FFFF, 150, 100);
add_edit(simspeed); add_edit(simspeed);
add_edit(accel); add_edit(accel);
@ -17,6 +20,9 @@ void edit_difficulty() {
} }
void game_menu() { void game_menu() {
cmode = sm::SIDE | sm::MAYDARK;
gamescreen();
dialog::init(XLAT("AdS game settings"), 0xC0C0FFFF, 150, 100); dialog::init(XLAT("AdS game settings"), 0xC0C0FFFF, 150, 100);
dialog::addItem(XLAT("set game parameters"), 'm'); dialog::addItem(XLAT("set game parameters"), 'm');
@ -43,7 +49,7 @@ void game_menu() {
#endif #endif
dialog::addItem("RogueViz settings", 'v'); dialog::addItem("RogueViz settings", 'v');
dialog::add_key_action('r', [] { dialog::add_action([] {
pushScreen(showSettings); pushScreen(showSettings);
}); });
@ -55,6 +61,11 @@ void game_menu() {
}); });
#endif #endif
dialog::addItem("quit the game", 'q');
dialog::add_action([] {
quitmainloop = true;
});
dialog::addBreak(100); dialog::addBreak(100);
dialog::addBack(); dialog::addBack();
dialog::display(); dialog::display();