Qt: if player's run-time options specified a tiles file and it couldn't be
loaded, Qt was falling back to x11tiles just like when the default
can't be loaded; fallback to player's file plus explicit path instead
+Qt: force the 'toptenwin' option On so that high scores display at end of game
+ is shown in a text window instead of being written to stdout where it
+ might not be seen (note: doesn't apply to 'nethack -s')
Qt: {maybe just Qt+OSX:} when viewing a text window ('V' to look at 'history'
for instance), clicking on [Search], entering a search target in the
resulting popup and clicking on [Okay] or typing <return>, the text
}
}
-void NetHackQtBind::qt_init_nhwindows(int* argc, char** argv)
+void NetHackQtBind::qt_init_nhwindows(int *argc, char **argv)
{
- iflags.menu_tab_sep = true;
+ // menu entries use embedded <tab> to align fields;
+ // it could be toggled off via 'O', but only when in wizard mode
+ ::iflags.menu_tab_sep = true;
+
+ // force high scores display to be shown in a window, and don't allow
+ // that to be toggled off via 'O' (note: 'nethack -s' won't reach here;
+ // its output goes to stdout so can potentially be redirected into a file)
+ ::iflags.toptenwin = true;
+ ::set_option_mod_status("toptenwin", ::set_in_config);
#ifdef UNIX
// Userid control
NetHackQtWindow* window=id_to_window[(int)wid];
window->ClipAround(x,y);
}
-void NetHackQtBind::qt_print_glyph(winid wid,xchar x,xchar y,
- const glyph_info *glyphinfo,
- const glyph_info *bkglyphinfo UNUSED)
+
+void NetHackQtBind::qt_print_glyph(
+ winid wid, xchar x, xchar y,
+ const glyph_info *glyphinfo,
+ const glyph_info *bkglyphinfo UNUSED)
{
/* TODO: bkglyph */
- NetHackQtWindow* window=id_to_window[(int)wid];
- window->PrintGlyph(x,y,glyphinfo);
+ NetHackQtWindow *window = id_to_window[(int) wid];
+ window->PrintGlyph(x, y, glyphinfo);
+}
+
+#if 0
+void NetHackQtBind::qt_print_glyph_compose(
+ winid wid, xchar x, xchar y, int glyph1, int glyph2)
+{
+ NetHackQtWindow *window = id_to_window[(int) wid];
+ window->PrintGlyphCompose(x, y, glyph1, glyph2);
}
-//void NetHackQtBind::qt_print_glyph_compose(winid wid,xchar x,xchar y,int glyph1, int glyph2)
-//{
- //NetHackQtWindow* window=id_to_window[(int)wid];
- //window->PrintGlyphCompose(x,y,glyph1,glyph2);
-//}
+#endif /*0*/
+//
+// FIXME: sending output to stdout can mean that the player never sees it.
+//
void NetHackQtBind::qt_raw_print(const char *str)
{
puts(str);
void NetHackQtBind::qt_raw_print_bold(const char *str)
{
- puts(str);
+ qt_raw_print(str);
}
int NetHackQtBind::qt_nhgetch()