]> granicus.if.org Git - nethack/commitdiff
Qt toolbar: add button for 'search'
authorPatR <rankin@nethack.org>
Wed, 14 Oct 2020 10:02:55 +0000 (03:02 -0700)
committerPatR <rankin@nethack.org>
Wed, 14 Oct 2020 10:02:55 +0000 (03:02 -0700)
The toolbar contains do-Again, Pick up, Drop, Kick, Throw, Fire,
Eat, and Rest.  Insert Search in front of Rest since it's useful
in its own right and some players prefer it even when resting.
Includes a new 12x13 icon; a tiny magnifying glass shown straight
on is something I can manage.

doc/fixes37.0
win/Qt/qt_main.cpp

index f32d792cdd0333fbcd6e1f12971a129924588391..0aff916878edece3dadb657be126ee7df87b252b 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.328 $ $NHDT-Date: 1602623144 2020/10/13 21:05:44 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.329 $ $NHDT-Date: 1602669770 2020/10/14 10:02:50 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -442,7 +442,7 @@ Qt: for menu search, don't require clicking on the search target popup before
 Qt: rest ("Zz") button on the toolbar only worked when 'rest_on_space' was On
        (core issue, not Qt's fault)
 Qt: rename toolbar button "Get" and action menu choice "Get" to "Pick up"
-Qt+QSX: fix control key
+Qt+OSX: fix control key
 Qt+OSX: rename menu entry "nethack->Preferences..." for invoking nethack's
        'O' command to "Game->Run-time options" and entry "Game->Qt settings"
        for making persistent Qt customizations to "nethack->Preferences..."
@@ -579,6 +579,7 @@ Qt: clicking on the paper doll runs the #seeall command (inventory of wielded
        and worn items plus tools [lamps, leashes] actively in use; in other
        words, same set of things whose tiles are used to populate the doll)
 Qt: clicking on the status window runs the #attributes command (^X)
+Qt: add a Search button to the toolbar
 
 
 NetHack Community Patches (or Variation) Included
index 73d56f080e7f1c0ad92e3aaa662944a75679e614..00765d8a98498c5e842333ae435f22f02239149c 100644 (file)
@@ -352,6 +352,25 @@ static const char * eat_xpm[] = {
 "   oo  oo   ",
 "   oo  oo   "};
 /* XPM */
+static const char * search_xpm[] = {
+"12 13 3 1",
+"      c None",
+".     c #FFFFFFFF0000",
+"X     c #7F0000000000",
+"            ",
+"    XXXXX   ",
+"   X ... X  ",
+"   X.....X  ",
+"   X.....X  ",
+"   X ... X  ",
+"    XXXXX   ",
+"      X     ",
+"      X     ",
+"      X     ",
+"      X     ",
+"      X     ",
+"            "};
+/* XPM */
 static const char * rest_xpm[] = {
 "12 13 2 1",
 "      c None",
@@ -777,6 +796,7 @@ NetHackQtMainWindow::NetHackQtMainWindow(NetHackQtKeyBuffer& ks) :
     AddToolButton(toolbar, sm, "Throw", dothrow, QPixmap(throw_xpm));
     AddToolButton(toolbar, sm, "Fire", dofire, QPixmap(fire_xpm));
     AddToolButton(toolbar, sm, "Eat", doeat, QPixmap(eat_xpm));
+    AddToolButton(toolbar, sm, "Search", dosearch, QPixmap(search_xpm));
     AddToolButton(toolbar, sm, "Rest", donull, QPixmap(rest_xpm));
 
     connect(game, SIGNAL(triggered(QAction *)),