diff -abBdpuNPr --exclude='*.svn' irrlicht-svn-ss/trunk/include/EGUIElementTypes.h Irrlicht_starsonata/include/EGUIElementTypes.h --- irrlicht-svn-ss/trunk/include/EGUIElementTypes.h 2007-07-26 02:11:22.000000000 +0200 +++ Irrlicht_starsonata/include/EGUIElementTypes.h 2007-10-22 18:57:04.000000000 +0200 @@ -77,6 +77,12 @@ enum EGUI_ELEMENT_TYPE //! A spin box (IGUISpinBox) EGUIET_SPIN_BOX, + //! A table (IGUITable) + EGUIET_TABLE, + + //! A colored rectangle (IGUIRectangle) + EGUIET_RECTANGLE, + //! Not an element, amount of elements in there EGUIET_COUNT, @@ -113,7 +119,10 @@ const c8* const GUIElementTypeNames[] = "toolBar", "window", "spinBox", - 0 + "table", + "rectangle", + 0, // count + "unknown" }; } // end namespace gui diff -abBdpuNPr --exclude='*.svn' irrlicht-svn-ss/trunk/include/IGUIEnvironment.h Irrlicht_starsonata/include/IGUIEnvironment.h --- irrlicht-svn-ss/trunk/include/IGUIEnvironment.h 2007-07-26 02:11:22.000000000 +0200 +++ Irrlicht_starsonata/include/IGUIEnvironment.h 2008-05-31 04:53:40.000000000 +0200 @@ -56,4 +59,6 @@ class IGUIButton; class IGUIWindow; class IGUIElementFactory; +class IGUITable; +class IGUIRectangle; // JEFF, StarSonata //! GUI Environment. Used as factory and manager of all other GUI elements. @@ -225,6 +231,9 @@ public: virtual IGUIImage* addImage(const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0) = 0; + //! JEFF extension adds a rectangle + virtual IGUIRectangle* addRectangle(const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1) = 0; + //! Adds a checkbox element. /** \return Returns a pointer to the created check box. Returns 0 if an error occured. @@ -239,6 +248,13 @@ public: virtual IGUIListBox* addListBox(const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0; + //! Adds a table element. + /** \return + Returns a pointer to the created table. Returns 0 if an error occured. + This pointer should not be dropped. See IUnknown::drop() for more information. */ + virtual IGUITable* addTable(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false) = 0; + //! Adds an mesh viewer. Not 100% implemented yet. /** \return Returns a pointer to the created mesh viewer. Returns 0 if an error occured. diff -abBdpuNPr --exclude='*.svn' irrlicht-svn-ss/trunk/include/irrlicht.h Irrlicht_starsonata/include/irrlicht.h --- irrlicht-svn-ss/trunk/include/irrlicht.h 2007-07-26 02:11:22.000000000 +0200 +++ Irrlicht_starsonata/include/irrlicht.h 2008-05-14 05:43:46.000000000 +0200 @@ -70,6 +71,8 @@ #include "IGUIImage.h" #include "IGUIInOutFader.h" #include "IGUIListBox.h" +#include "IGUITable.h" +#include "Extended_IGUIRectangle.h" #include "IGUIMeshViewer.h" #include "IGUIScrollBar.h" #include "IGUISkin.h" diff -abBdpuNPr --exclude='*.svn' irrlicht-svn-ss/trunk/source/Irrlicht/CDefaultGUIElementFactory.cpp Irrlicht_starsonata/source/Irrlicht/CDefaultGUIElementFactory.cpp --- irrlicht-svn-ss/trunk/source/Irrlicht/CDefaultGUIElementFactory.cpp 2007-07-26 02:11:08.000000000 +0200 +++ Irrlicht_starsonata/source/Irrlicht/CDefaultGUIElementFactory.cpp 2008-08-19 19:36:02.000000000 +0200 @@ -21,6 +21,8 @@ #include "IGUITabControl.h" #include "IGUIToolbar.h" #include "IGUIWindow.h" +#include "Extended_IGUIRectangle.h" +#include "IGUITable.h" #include @@ -47,6 +49,10 @@ IGUIElement* CDefaultGUIElementFactory:: switch(type) { + case EGUIET_TABLE: + return Environment->addTable(core::rect(0,0,100,100), parent); + case EGUIET_RECTANGLE: + return Environment->addRectangle(core::rect(0,0,100,100), parent); case EGUIET_BUTTON: return Environment->addButton(core::rect(0,0,100,100),parent); case EGUIET_CHECK_BOX: diff -abBpNPwrU2 --exclude='*.svn' irrlicht-svn-ss/trunk/source/Irrlicht/CGUIEnvironment.cpp Irrlicht_starsonata/source/Irrlicht/CGUIEnvironment.cpp --- irrlicht-svn-ss/trunk/source/Irrlicht/CGUIEnvironment.cpp 2007-07-26 02:11:08.000000000 +0200 +++ Irrlicht_starsonata/source/Irrlicht/CGUIEnvironment.cpp 2008-08-15 18:20:47.000000000 +0200 @@ -7,4 +7,6 @@ #include "IVideoDriver.h" +#include "CGUITable.h" +#include "Extended_CGUIRectangle.h" #include "CGUISkin.h" #include "CGUIButton.h" @@ -1019,4 +1317,13 @@ IGUIImage* CGUIEnvironment::addImage(con } +//! Adds a GUI Rectangle +IGUIRectangle* CGUIEnvironment::addRectangle(const core::rect& rectangle, IGUIElement* parent, s32 id) +{ + IGUIRectangle * newRect = new CGUIRectangle(this, parent ? parent : this, id, rectangle); + + newRect->drop(); + + return newRect; +} //! adds an mesh viewer. The returned pointer must not be dropped. @@ -1071,4 +1378,11 @@ IGUIListBox* CGUIEnvironment::addListBox +IGUITable* CGUIEnvironment::addTable(const core::rect& rectangle, IGUIElement* parent, s32 id, bool drawBackground) +{ + CGUITable* b = new CGUITable(this, parent ? parent : this, id, rectangle, true, drawBackground, false); + b->drop(); + return b; +} + //! adds a file open dialog. The returned pointer must not be dropped. diff -abBpNPwrU2 --exclude='*.svn' irrlicht-svn-ss/trunk/source/Irrlicht/CGUIEnvironment.h Irrlicht_starsonata/source/Irrlicht/CGUIEnvironment.h --- irrlicht-svn-ss/trunk/source/Irrlicht/CGUIEnvironment.h 2007-07-26 02:11:08.000000000 +0200 +++ Irrlicht_starsonata/source/Irrlicht/CGUIEnvironment.h 2008-08-15 20:39:43.000000000 +0200 @@ -102,4 +104,7 @@ public: IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0); + //! JEFF extension adds a rectangle + virtual IGUIRectangle* addRectangle(const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1); + //! adds a checkbox virtual IGUICheckBox* addCheckBox(bool checked, const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0); @@ -109,4 +114,8 @@ public: IGUIElement* parent=0, s32 id=-1, bool drawBackground=false); + //! Adds a table element. + virtual IGUITable* addTable(const core::rect& rectangle, + IGUIElement* parent=0, s32 id=-1, bool drawBackground=false); + //! adds an mesh viewer. The returned pointer must not be dropped. virtual IGUIMeshViewer* addMeshViewer(const core::rect& rectangle, IGUIElement* parent=0, s32 id=-1, const wchar_t* text=0);