1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-07-27 04:52:50 +00:00

rogueviz:: presentation:: improved latex slides

This commit is contained in:
Zeno Rogue 2025-06-22 15:53:47 +02:00
parent 484e133d4d
commit 55baf26769
2 changed files with 6 additions and 2 deletions

View File

@ -604,8 +604,11 @@ void uses_game(presmode mode, string name, reaction_t launcher, reaction_t resto
color_t latex_ring = 0x00FF0080; color_t latex_ring = 0x00FF0080;
string latex_s;
void latex_slide(presmode mode, string s, flagtype flags, int size) { void latex_slide(presmode mode, string s, flagtype flags, int size) {
empty_screen(mode); empty_screen(mode);
latex_s = s;
add_stat(mode, [=] { add_stat(mode, [=] {
tour::slide_backup(no_find_player, true); tour::slide_backup(no_find_player, true);
if(flags & sm::SIDE) { if(flags & sm::SIDE) {
@ -621,11 +624,12 @@ void latex_slide(presmode mode, string s, flagtype flags, int size) {
gamescreen(); gamescreen();
dialog::init(); dialog::init();
dialog_may_latex( dialog_may_latex(
s, latex_s,
"(LaTeX is off)", "(LaTeX is off)",
dialog::dialogcolor, size, LATEX_COLOR dialog::dialogcolor, size, LATEX_COLOR
); );
dialog::display(); dialog::display();
callhooks(hooks_post_latex_slide);
return true; return true;
}); });
no_other_hud(mode); no_other_hud(mode);

View File

@ -247,7 +247,7 @@ function<void(presmode)> roguevizslide_action(char c, const T& t, const U& act)
void latex_slide(presmode mode, string s, flagtype flags = 0, int size = 100); void latex_slide(presmode mode, string s, flagtype flags = 0, int size = 100);
void latex_in_space(const shiftmatrix& V, ld scale, string s, color_t col, flagtype flags); void latex_in_space(const shiftmatrix& V, ld scale, string s, color_t col, flagtype flags);
inline purehookset hooks_latex_slide; inline purehookset hooks_latex_slide, hooks_post_latex_slide;
inline ld angle = 0; inline ld angle = 0;
inline int dir = -1; inline int dir = -1;