<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff></diff>
      <filename>vultures/gamedata/graphics/tb2.png</filename>
    </modified>
    <modified>
      <diff>@@ -104,20 +104,21 @@ void levelwin::init()
 	new hotspot(this, 20, 0, w - 40, 20, V_HOTSPOT_SCROLL_UP, &quot;scroll up&quot;);
 
 	/* Toolbar1: inventory, map, cast spell, extended commands */
-	const tb_buttondesc tb1_desc[5] = {
+	const tb_buttondesc tb1_desc[6] = {
 		{V_HOTSPOT_BUTTON_INVENTORY, &quot;Inventory&quot;},
 		{V_HOTSPOT_BUTTON_MAP, &quot;Map&quot;},
 		{V_HOTSPOT_BUTTON_SPELLBOOK, &quot;Cast spell&quot;},
 		{V_HOTSPOT_BUTTON_EXTENDED, &quot;Extended commands&quot;},
-		{V_HOTSPOT_BUTTON_DISCOVERIES, &quot;Show discoveries&quot;}
+		{V_HOTSPOT_BUTTON_DISCOVERIES, &quot;Show discoveries&quot;},
+    {0,&quot;&quot;}
 	};
 
 	new toolbar(this, V_WIN_TOOLBAR1, vultures_opts.show_actiontb,
 				w - 215, h - 84, V_FILENAME_TOOLBAR1, tb1_desc);
 
-
 	/* Toolbar 2: look at, previous messages, options, help */
-	const tb_buttondesc tb2_desc[5] = {
+	const tb_buttondesc tb2_desc[6] = {
+		{V_HOTSPOT_BUTTON_GOLD, &quot;Gold&quot;},
 		{V_HOTSPOT_BUTTON_LOOK, &quot;Look&quot;},
 		{V_HOTSPOT_BUTTON_MESSAGES, &quot;Old messages&quot;},
 		{V_HOTSPOT_BUTTON_OPTIONS, &quot;Options&quot;},
@@ -126,7 +127,7 @@ void levelwin::init()
 	};
 
 	new toolbar(this, V_WIN_TOOLBAR2, vultures_opts.show_helptb,
-				w - 215, h - 45, V_FILENAME_TOOLBAR2, tb2_desc);
+				w - 255, h - 45, V_FILENAME_TOOLBAR2, tb2_desc);
 	
 	/* select wall style */
 	switch (vultures_opts.wall_style)</diff>
      <filename>vultures/winclass/levelwin.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -38,6 +38,11 @@ typedef enum {
     V_ACTION_OPEN_DOOR,
     V_ACTION_SEARCH,
 
+    V_ACTION_GOLD_QUERY,
+    V_ACTION_GOLD_DROP,
+    V_ACTION_GOLD_THROW,
+    V_ACTION_GOLD_PAY,
+
     V_ACTION_ENGRAVE,
     V_ACTION_LOOK_AROUND,
     V_ACTION_PAY_BILL,</diff>
      <filename>vultures/winclass/mapdata.h</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,8 @@
 #include &quot;hotspot.h&quot;
 #include &quot;messagewin.h&quot;
 #include &quot;map.h&quot;
+#include &quot;levelwin.h&quot;
+#include &quot;contextmenu.h&quot;
 
 
 toolbar::toolbar(window *p, int menuid, bool visible, int x, int y, std::string imgfile, const tb_buttondesc buttons[5]) : window(p)
@@ -30,6 +32,7 @@ toolbar::toolbar(window *p, int menuid, bool visible, int x, int y, std::string
 	new hotspot(this, 84, 0, 38, 39, buttons[2].menu_id, buttons[2].name);
 	new hotspot(this, 124, 0, 38, 39, buttons[3].menu_id, buttons[3].name);
 	new hotspot(this, 164, 0, 38, 39, buttons[4].menu_id, buttons[4].name);
+	new hotspot(this, 184, 0, 38, 39, buttons[5].menu_id, buttons[5].name);
 
 }
 
@@ -76,6 +79,46 @@ eventresult toolbar::handle_mousebuttonup_event(window* target, void* result,
 
 	/* one of the buttons was clicked */
 	switch (target-&gt;menu_id) {
+    case V_HOTSPOT_BUTTON_GOLD:
+      {
+        int action;
+        contextmenu *menu = new contextmenu( levwin );
+
+        menu-&gt;add_item(&quot;Check Wallet&quot;, V_ACTION_GOLD_QUERY);
+        menu-&gt;add_item(&quot;Drop Gold&quot;, V_ACTION_GOLD_DROP);
+        menu-&gt;add_item(&quot;Throw Gold&quot;, V_ACTION_GOLD_THROW);
+        if (*u.ushops)
+          menu-&gt;add_item(&quot;Pay shopkeeper&quot;, V_ACTION_GOLD_PAY);
+
+        menu-&gt;layout();
+        vultures_event_dispatcher(&amp;action, V_RESPOND_INT, menu );
+
+        switch (action) {
+
+          case V_ACTION_GOLD_QUERY:
+            ((vultures_event*)result)-&gt;num = '$';
+            break;
+
+          case V_ACTION_GOLD_DROP:
+            vultures_eventstack_add('$', -1, -1, V_RESPOND_CHARACTER);
+            ((vultures_event*)result)-&gt;num = 'd';
+            break;
+
+          case V_ACTION_GOLD_THROW:
+            vultures_eventstack_add('$', -1, -1, V_RESPOND_CHARACTER);
+            ((vultures_event*)result)-&gt;num = 't';
+            break;
+
+          case V_ACTION_GOLD_PAY:
+            ((vultures_event*)result)-&gt;num = 'p';
+            break;
+
+        }
+
+        delete menu;
+      }
+			return V_EVENT_HANDLED_FINAL;
+
 		case V_HOTSPOT_BUTTON_LOOK:
 			vultures_eventstack_add('y', -1, -1, V_RESPOND_CHARACTER);
 			((vultures_event*)result)-&gt;num = '/';</diff>
      <filename>vultures/winclass/toolbar.cpp</filename>
    </modified>
    <modified>
      <diff>@@ -62,6 +62,7 @@ enum hotspots {
 	V_WIN_ENHANCE,
 
 	/* child windows of the statusbar */
+	V_HOTSPOT_BUTTON_GOLD,
 	V_HOTSPOT_BUTTON_LOOK,
 	V_HOTSPOT_BUTTON_EXTENDED,
 	V_HOTSPOT_BUTTON_MAP,</diff>
      <filename>vultures/winclass/window.h</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>78964cdaed21793ca5c9314a3c741262400bfb38</id>
    </parent>
  </parents>
  <author>
    <name>Clive Crous</name>
    <email>clive@crous.co.za</email>
  </author>
  <url>http://github.com/clivecrous/vultures/commit/3324ec30e3f29f090e2317df9092a00f3266028c</url>
  <id>3324ec30e3f29f090e2317df9092a00f3266028c</id>
  <committed-date>2009-07-19T06:08:29-07:00</committed-date>
  <authored-date>2009-07-19T06:08:29-07:00</authored-date>
  <message>Add a gold action button to the toolbar. Rough implementation pending toolbar rewrite for next release. Closes #61.</message>
  <tree>d31ddd0a7b7abd97686f129748099a7608b215eb</tree>
  <committer>
    <name>Clive Crous</name>
    <email>clive@crous.co.za</email>
  </committer>
</commit>
