Qt support for changing 'statuslines' dynamically

Turns out it was nearly as simple as I originally thought.
I just missed one significant detail the first time around.
This leaves DYNAMIC_STATUSLINES as conditionl but now enables
it by default.  Using 'O' to change 'statuslines' from 2 to 3
or vice versa now works for Qt as well as for curses and tty.
This commit is contained in:
PatR
2020-12-22 11:10:32 -08:00
parent 430edb5a74
commit 934808be0e
6 changed files with 19 additions and 21 deletions

View File

@@ -834,10 +834,11 @@ void NetHackQtBind::qt_outrip(winid wid, int how, time_t when)
void NetHackQtBind::qt_preference_update(const char *optname)
{
#ifdef DYNAMIC_STATUSLINES // leave disabled; redoStatus() doesn't work
#ifdef DYNAMIC_STATUSLINES // defined in qt_main.h
if (!strcmp(optname, "statuslines")) {
// delete and recreate status window
main->redoStatus();
// to toggle statuslines from 2 to 3 or vice versa
id_to_window[WIN_STATUS] = main->redoStatus();
}
#else
nhUse(optname);