pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3135 - in trunk/pingus: data/data data/images/core/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3135 - in trunk/pingus: data/data data/images/core/editor src/editor
Date: Wed, 12 Sep 2007 18:33:09 +0200

Author: grumbel
Date: 2007-09-12 18:33:06 +0200 (Wed, 12 Sep 2007)
New Revision: 3135

Added:
   trunk/pingus/data/images/core/editor/combobox.png
Modified:
   trunk/pingus/data/data/core.res
   trunk/pingus/src/editor/combobox.cpp
   trunk/pingus/src/editor/combobox.hpp
Log:
- added little arrow to the combo box

Modified: trunk/pingus/data/data/core.res
===================================================================
--- trunk/pingus/data/data/core.res     2007-09-12 16:23:41 UTC (rev 3134)
+++ trunk/pingus/data/data/core.res     2007-09-12 16:33:06 UTC (rev 3135)
@@ -47,6 +47,10 @@
           (section (name "editor")
 
                    (sprite
+                    (name "combobox")
+                    (image-file "../images/core/editor/combobox.png"))
+
+                   (sprite
                     (name "obj_background")
                     (image-file "../images/core/editor/obj_background.png"))
 

Added: trunk/pingus/data/images/core/editor/combobox.png
===================================================================
(Binary files differ)


Property changes on: trunk/pingus/data/images/core/editor/combobox.png
___________________________________________________________________
Name: svn:mime-type
   + image/png

Modified: trunk/pingus/src/editor/combobox.cpp
===================================================================
--- trunk/pingus/src/editor/combobox.cpp        2007-09-12 16:23:41 UTC (rev 
3134)
+++ trunk/pingus/src/editor/combobox.cpp        2007-09-12 16:33:06 UTC (rev 
3135)
@@ -19,6 +19,7 @@
 
 #include <vector>
 #include <string>
+#include "resource.hpp"
 #include "combobox.hpp"
 #include "math.hpp"
 #include "../fonts.hpp"
@@ -27,6 +28,7 @@
 
 Combobox::Combobox(const Rect& rect)
   : RectComponent(rect),
+    sprite(Resource::load_sprite("core/editor/combobox")),
     current_item(-1),
     drop_down(false)
 {
@@ -117,6 +119,7 @@
   else
     {
       gc.draw_fillrect(rect, Color(255,255,255));
+      gc.draw(sprite, rect.right - 12, rect.top);
       gc.draw_rect(rect, Color(0,0,0));
 
       if (current_item != -1)

Modified: trunk/pingus/src/editor/combobox.hpp
===================================================================
--- trunk/pingus/src/editor/combobox.hpp        2007-09-12 16:23:41 UTC (rev 
3134)
+++ trunk/pingus/src/editor/combobox.hpp        2007-09-12 16:33:06 UTC (rev 
3135)
@@ -24,6 +24,7 @@
 #include <vector>
 #include <string>
 #include <boost/signal.hpp>
+#include "sprite.hpp"
 #include "gui/component.hpp"
 #include "gui/rect_component.hpp"
 
@@ -45,6 +46,8 @@
 class Combobox : public GUI::RectComponent
 {
 protected:
+  Sprite sprite;
+
   /** List of items in this Combobox */
   std::vector<ComboItem> item_list;
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]