mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-11 18:00:34 +00:00
slide text improvements
This commit is contained in:
parent
cafd721284
commit
cfb47631ac
27
tour.cpp
27
tour.cpp
@ -71,6 +71,8 @@ static const flagtype SIDESCREEN = 64;
|
|||||||
static const flagtype USE_SLIDE_NAME = 128;
|
static const flagtype USE_SLIDE_NAME = 128;
|
||||||
/** \brief do not display any help line */
|
/** \brief do not display any help line */
|
||||||
static const flagtype NOTITLE = 256;
|
static const flagtype NOTITLE = 256;
|
||||||
|
/** \brief always display the text, even if going back or texts are disabled */
|
||||||
|
static const flagtype ALWAYS_TEXT = 256;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX vector<reaction_t> restorers;
|
EX vector<reaction_t> restorers;
|
||||||
@ -196,15 +198,14 @@ string get_subname(const string& s, const string& folder) {
|
|||||||
|
|
||||||
/** \brief display the help text for the current slide if texts enabled */
|
/** \brief display the help text for the current slide if texts enabled */
|
||||||
EX void slidehelp() {
|
EX void slidehelp() {
|
||||||
if(texts && slides[currentslide].help[0]) {
|
if(!slides[currentslide].help[0]) return;
|
||||||
string slidename = get_slidename(slides[currentslide].name);
|
string slidename = get_slidename(slides[currentslide].name);
|
||||||
gotoHelp(
|
gotoHelp(
|
||||||
help =
|
help =
|
||||||
helptitle(XLAT(slidename), 0xFF8000) +
|
helptitle(XLAT(slidename), 0xFF8000) +
|
||||||
XLAT(slides[currentslide].help)
|
XLAT(slides[currentslide].help)
|
||||||
);
|
);
|
||||||
presentation(pmHelpEx);
|
presentation(pmHelpEx);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief return from a subgame launched while in presentation */
|
/** \brief return from a subgame launched while in presentation */
|
||||||
@ -227,7 +228,7 @@ EX bool next_slide() {
|
|||||||
slide_restore_all();
|
slide_restore_all();
|
||||||
currentslide++;
|
currentslide++;
|
||||||
presentation(pmStart);
|
presentation(pmStart);
|
||||||
slidehelp();
|
if(texts) slidehelp();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +249,7 @@ bool handleKeyTour(int sym, int uni) {
|
|||||||
currentslide--;
|
currentslide--;
|
||||||
presentation(pmStart);
|
presentation(pmStart);
|
||||||
popScreenAll();
|
popScreenAll();
|
||||||
if(inhelp) slidehelp();
|
if(inhelp || (flags & ALWAYS_TEXT)) slidehelp();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
int legal = slides[currentslide].flags & 7;
|
int legal = slides[currentslide].flags & 7;
|
||||||
@ -503,7 +504,7 @@ EX namespace ss {
|
|||||||
currentslide = i;
|
currentslide = i;
|
||||||
popScreenAll();
|
popScreenAll();
|
||||||
presentation(pmStart);
|
presentation(pmStart);
|
||||||
slidehelp();
|
if(texts) slidehelp();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dialog::addBreak(50);
|
dialog::addBreak(50);
|
||||||
@ -559,7 +560,7 @@ EX void start() {
|
|||||||
}
|
}
|
||||||
restart_game(rg::tour);
|
restart_game(rg::tour);
|
||||||
if(tour::on) {
|
if(tour::on) {
|
||||||
slidehelp();
|
if(texts) slidehelp();
|
||||||
presentation(pmStart);
|
presentation(pmStart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user