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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user