diff -Nauwr source/Irrlicht/CGUIEnvironment.cpp source/Irrlicht/CGUIEnvironment.cpp --- source/Irrlicht/CGUIEnvironment.cpp 2005-08-24 18:04:44.000000000 +0200 +++ source/Irrlicht/CGUIEnvironment.cpp 2005-09-28 09:07:06.000000000 +0200 @@ -59,7 +59,7 @@ loadBuidInFont(); - IGUISkin* skin = createSkin(EGST_WINDOWS_METALLIC); + IGUISkin* skin = createSkin(EGST_WINDOWS_GRADIENT); setSkin(skin); skin->drop(); } diff -Nauwr source/Irrlicht/CGUISkin.cpp source/Irrlicht/CGUISkin.cpp --- source/Irrlicht/CGUISkin.cpp 2005-08-20 22:17:48.000000000 +0200 +++ source/Irrlicht/CGUISkin.cpp 2005-09-28 08:39:58.000000000 +0200 @@ -12,7 +12,7 @@ { CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver) -: Font(0), Driver(driver) +: Font(0), Driver(driver), Type(EGST_WINDOWS_GRADIENT) { #ifdef _DEBUG setDebugName("CGUISkin"); @@ -50,8 +50,6 @@ Texts[EGDT_MSG_BOX_CANCEL] = L"Cancel"; Texts[EGDT_MSG_BOX_YES] = L"Yes"; Texts[EGDT_MSG_BOX_NO] = L"No"; - - UseGradient = (type == EGST_WINDOWS_METALLIC); } @@ -161,9 +159,11 @@ rect.LowerRightCorner.X -= 1; rect.LowerRightCorner.Y -= 1; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c1 = getColor(EGDC_3D_FACE); video::SColor c2 = c1.getInterpolated(getColor(EGDC_3D_DARK_SHADOW), 0.4f); @@ -202,9 +202,11 @@ rect.UpperLeftCorner.X += 1; rect.UpperLeftCorner.Y += 1; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c1 = getColor(EGDC_3D_FACE); video::SColor c2 = c1.getInterpolated(getColor(EGDC_3D_DARK_SHADOW), 0.4f); @@ -337,9 +339,11 @@ rect.LowerRightCorner.X -= 2; rect.LowerRightCorner.Y -= 2; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, cl); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c2 = getColor(EGDC_3D_SHADOW); video::SColor c1 = getColor(EGDC_3D_FACE); @@ -355,9 +359,11 @@ if (drawTitleBar) { // draw title bar - //if (!UseGradient) - // Driver->draw2DRectangle(titleBarColor, rect, cl); - //else + if( Type == EGST_WINDOWS_CLASSIC ) + { + Driver->draw2DRectangle(titleBarColor, rect, cl); + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c = titleBarColor.getInterpolated(video::SColor(255,0,0,0), 0.2f); Driver->draw2DRectangle(rect, titleBarColor, c, titleBarColor, c, cl); @@ -430,9 +436,11 @@ rect.LowerRightCorner.X -= 2; rect.LowerRightCorner.Y -= 2; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c1 = getColor(EGDC_3D_FACE); video::SColor c2 = getColor(EGDC_3D_SHADOW); @@ -466,9 +474,11 @@ rect = r; rect.LowerRightCorner.Y -= 1; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), rect, clip); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c1 = getColor(EGDC_3D_FACE); video::SColor c2 = getColor(EGDC_3D_SHADOW); @@ -565,9 +575,11 @@ tr.UpperLeftCorner.X += 1; tr.LowerRightCorner.Y -= 1; - if (!UseGradient) + if( Type == EGST_WINDOWS_CLASSIC ) + { Driver->draw2DRectangle(getColor(EGDC_3D_FACE), tr, clip); - else + } + else if( Type == EGST_WINDOWS_GRADIENT ) { video::SColor c1 = getColor(EGDC_3D_FACE); video::SColor c2 = getColor(EGDC_3D_SHADOW); diff -Nauwr source/Irrlicht/CGUISkin.h source/Irrlicht/CGUISkin.h --- source/Irrlicht/CGUISkin.h 2005-08-20 22:17:48.000000000 +0200 +++ source/Irrlicht/CGUISkin.h 2005-09-28 08:36:32.000000000 +0200 @@ -54,6 +54,12 @@ "OK", "Cancel", "Yes", "No" and so on. */ virtual void setDefaultText(EGUI_DEFAULT_TEXT which, const wchar_t* newText); + //! sets the type of the GUISkin + virtual void setType( EGUI_SKIN_TYPE type ) { Type = type; } + + //! gets the type of the GUISkin + virtual const EGUI_SKIN_TYPE& getType() const { return Type; } + //! draws a standard 3d button pane /** Used for drawing for example buttons in normal state. It uses the colors EGDC_3D_DARK_SHADOW, EGDC_3D_HIGH_LIGHT, EGDC_3D_SHADOW and @@ -159,6 +165,7 @@ private: video::SColor Colors[EGDC_COUNT]; + EGUI_SKIN_TYPE Type; s32 Sizes[EGDS_COUNT]; IGUIFont* Font; core::stringw Texts[EGDT_COUNT]; diff -Nauwr include/IGUISkin.h include/IGUISkin.h --- include/IGUISkin.h 2005-08-20 22:17:46.000000000 +0200 +++ include/IGUISkin.h 2005-09-28 08:40:54.000000000 +0200 @@ -32,7 +32,7 @@ EGST_WINDOWS_CLASSIC, //! Like EGST_WINDOWS_CLASSIC, but with metallic shaded windows and buttons - EGST_WINDOWS_METALLIC + EGST_WINDOWS_GRADIENT }; //! Enumeration for skin colors @@ -160,6 +160,12 @@ //! sets a default size virtual void setSize(EGUI_DEFAULT_SIZE which, s32 size) = 0; + //! sets the type of the GUISkin + virtual void setType( EGUI_SKIN_TYPE type ) = 0; + + //! gets the type of the GUISkin + virtual const EGUI_SKIN_TYPE& getType() const = 0; + //! returns the default font virtual IGUIFont* getFont() = 0;