Qt "Paper Doll" inventory
Enhance the "Qt Settings" dialog box to provide control over the paper doll subset of inventory displayed between the message and status windows (above the map). A ton of flailing about for a fairly small but useful change in functionality. Old dialog (no title): | [ ] Zoomed -- check box | "Width:" [ ] -- number entry spinner | "Height:" [ ] -- ditto | "Font:" [ ] -- Huge:18pt, Large:14, Medium:12, Small:10, Tiny:8 | [ Dismiss ] -- button New dialog: | "Qt NetHack Settings" | | "Map:" [ ] "Zoomed" -- check box | "Tile Width" [ ] -- number entry spinner | "Tile Height" [ ] -- ditto | "Invent:" [ ] "Shown" -- check box | "Doll Width" [ ] -- number entry spinner | "Doll Height" [ ] -- ditto | "Font:" [ ] -- Huge:18pt, Large:14, Medium:12, Small:10, Tiny:8 | [ Dismiss ] -- button The inventory subset can now be suppressed. When shown (the default), its size can be set independently of the map tiles' size. I've set the default to be 32x32 tiles instead of 16x16 used for the map. The settings are saved and restored automatically by Qt, and persist not just across save/restore cycles but into new games. (That's not a change, just a reminder.)
This commit is contained in:
@@ -110,9 +110,27 @@ NetHackQtBind::NetHackQtBind(int& argc, char** argv) :
|
||||
} else {
|
||||
splash = 0;
|
||||
}
|
||||
|
||||
// these used to be in MainWindow but we want them before QtSettings
|
||||
// which we want before MainWindow...
|
||||
QCoreApplication::setOrganizationName("The NetHack DevTeam");
|
||||
QCoreApplication::setOrganizationDomain("nethack.org");
|
||||
QCoreApplication::setApplicationName("NetHack-Qt"); // Qt NetHack
|
||||
{
|
||||
char cvers[BUFSZ];
|
||||
QString qvers = version_string(cvers);
|
||||
QCoreApplication::setApplicationVersion(qvers);
|
||||
}
|
||||
#ifdef MACOSX
|
||||
/* without this, neither control+x nor option+x do anything;
|
||||
with it, control+x is ^X and option+x still does nothing */
|
||||
QCoreApplication::setAttribute(Qt::AA_MacDontSwapCtrlAndMeta);
|
||||
#endif
|
||||
|
||||
qt_settings = new NetHackQtSettings(); /*(main->width(),main->height());*/
|
||||
|
||||
main = new NetHackQtMainWindow(keybuffer);
|
||||
connect(qApp, SIGNAL(lastWindowClosed()), qApp, SLOT(quit()));
|
||||
qt_settings=new NetHackQtSettings(main->width(),main->height());
|
||||
msgs_strings = new QStringList();
|
||||
msgs_initd = false;
|
||||
msgs_saved = false;
|
||||
|
||||
Reference in New Issue
Block a user