Formspec: Draw images before inventories. Allows to use image as background.
authorRealBadAngel <mk@realbadangel.pl>
Sun, 4 Nov 2012 20:18:28 +0000 (21:18 +0100)
committerRealBadAngel <mk@realbadangel.pl>
Sun, 4 Nov 2012 20:18:28 +0000 (21:18 +0100)
src/guiFormSpecMenu.cpp

index ed44e441b4c562e29761165d97b18a86e7413ba1..affbd1a34f4d1890e59d87d3bc254072731416f2 100644 (file)
@@ -692,17 +692,8 @@ void GUIFormSpecMenu::drawMenu()
        m_tooltip_element->setVisible(false);
 
        /*
-               Draw items
-               Phase 0: Item slot rectangles
-               Phase 1: Item images; prepare tooltip
+               Draw images
        */
-       
-       for(int phase=0; phase<=1; phase++)
-       for(u32 i=0; i<m_inventorylists.size(); i++)
-       {
-               drawList(m_inventorylists[i], phase);
-       }
-
        for(u32 i=0; i<m_images.size(); i++)
        {
                const ImageDrawSpec &spec = m_images[i];
@@ -720,6 +711,17 @@ void GUIFormSpecMenu::drawMenu()
                        NULL/*&AbsoluteClippingRect*/, colors, true);
        }
 
+       /*
+               Draw items
+               Phase 0: Item slot rectangles
+               Phase 1: Item images; prepare tooltip
+       */
+       for(int phase=0; phase<=1; phase++)
+       for(u32 i=0; i<m_inventorylists.size(); i++)
+       {
+               drawList(m_inventorylists[i], phase);
+       }
+
        /*
                Draw dragged item stack
        */