1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

display smaller mouseover help if there is too much text

This commit is contained in:
Zeno Rogue 2024-05-27 15:54:12 +02:00
parent 95d7ffee08
commit ce09e4910e

View File

@ -5933,8 +5933,12 @@ EX void drawscreen() {
color_t col = linf[cwt.at->land].color; color_t col = linf[cwt.at->land].color;
if(cwt.at->land == laRedRock) col = 0xC00000; if(cwt.at->land == laRedRock) col = 0xC00000;
if(titlecolor) col = titlecolor; if(titlecolor) col = titlecolor;
if(nohelp != 1) if(nohelp != 1) {
displayfr(vid.xres/2, vid.fsize, 2, vid.fsize, mouseovers, col, 8); int size = vid.fsize;
while(size > 3 && textwidth(size, mouseovers) > vid.xres) size--;
println(hlog, "mouseovers size changed from ", vid.fsize, " to ", size);
displayfr(vid.xres/2, vid.fsize, 2, size, mouseovers, col, 8);
}
#endif #endif
drawmessages(); drawmessages();