mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-08 23:20:12 +00:00
tour:: replaced 'a'+i to allow longer presentations
This commit is contained in:
parent
ac6da6831d
commit
629e94cbb1
34
tour.cpp
34
tour.cpp
@ -280,24 +280,16 @@ namespace ss {
|
|||||||
slideshows.push_back(ss);
|
slideshows.push_back(ss);
|
||||||
}
|
}
|
||||||
|
|
||||||
int sssize;
|
string slidechars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ23456789!@#$%^&*(";
|
||||||
|
|
||||||
void showMenu() {
|
void showMenu() {
|
||||||
if(!wts) wts = slides;
|
if(!wts) wts = slides;
|
||||||
|
|
||||||
dialog::init(XLAT("slides"), forecolor, 150, 100);
|
dialog::init(XLAT("slides"), forecolor, 150, 100);
|
||||||
|
|
||||||
for(sssize=0;; sssize++) {
|
for(int i=0;; i++) {
|
||||||
int i = sssize;
|
dialog::addBoolItem(XLAT(wts[i].name), wts == slides && i == currentslide, slidechars[i]);
|
||||||
dialog::addBoolItem(XLAT(wts[i].name), wts == slides && i == currentslide, 'a'+i);
|
dialog::add_action([i] {
|
||||||
if(wts[i].flags & FINALSLIDE) break;
|
|
||||||
}
|
|
||||||
dialog::addBreak(50);
|
|
||||||
if(isize(slideshows) > 1) dialog::addItem(XLAT("change slideshow"), '1');
|
|
||||||
dialog::addBack();
|
|
||||||
dialog::display();
|
|
||||||
keyhandler = [] (int sym, int uni) {
|
|
||||||
if(uni >= 'a' && uni < 'a' + sssize) {
|
|
||||||
if(geometry || CHANGED_VARIATION) {
|
if(geometry || CHANGED_VARIATION) {
|
||||||
pop_game();
|
pop_game();
|
||||||
presentation(pmGeometryReset);
|
presentation(pmGeometryReset);
|
||||||
@ -308,20 +300,26 @@ namespace ss {
|
|||||||
tour::start();
|
tour::start();
|
||||||
}
|
}
|
||||||
presentation(pmStop);
|
presentation(pmStop);
|
||||||
currentslide = uni - 'a';
|
currentslide = i;
|
||||||
popScreenAll();
|
popScreenAll();
|
||||||
presentation(pmStart);
|
presentation(pmStart);
|
||||||
slidehelp();
|
slidehelp();
|
||||||
}
|
});
|
||||||
else if(uni == '1') {
|
if(wts[i].flags & FINALSLIDE) break;
|
||||||
|
}
|
||||||
|
dialog::addBreak(50);
|
||||||
|
if(isize(slideshows) > 1) {
|
||||||
|
dialog::addItem(XLAT("change slideshow"), '1');
|
||||||
|
dialog::add_action([] {
|
||||||
list(wts);
|
list(wts);
|
||||||
for(int i=0; i<isize(slideshows)-1; i++) if(slideshows[i] == wts) {
|
for(int i=0; i<isize(slideshows)-1; i++) if(slideshows[i] == wts) {
|
||||||
wts = slideshows[i+1]; return;
|
wts = slideshows[i+1]; return;
|
||||||
}
|
}
|
||||||
wts = slideshows[0];
|
wts = slideshows[0];
|
||||||
}
|
});
|
||||||
else if(doexiton(sym, uni)) { wts = NULL; popScreen(); }
|
}
|
||||||
};
|
dialog::addBack();
|
||||||
|
dialog::display();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user