diff --git a/changes.txt b/changes.txt index 87b780e8..6e1a0e3f 100644 --- a/changes.txt +++ b/changes.txt @@ -38,6 +38,7 @@ Changes in version 1.5 (... 2008) Nodes are now solid or transparent. ( but still more states are needed ) - GUI: + - Disabling the BMP loader now compiles without the built-in font - Added setTextAlignment to IGUIComboBox - Fixed a bug in CGUISpriteBank which caused a crash when a non-looping animated sprite reached the end of its animation. - Modal screens no longer flash invisible children when rejecting a focus change. diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index 6d76d9f0..ea032a3b 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -286,6 +286,7 @@ B3D, MS3D or X meshes */ #define _IRR_COMPILE_WITH_STL_WRITER_ //! Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files +//! Disabling this loader will also disable the built-in font #define _IRR_COMPILE_WITH_BMP_LOADER_ //! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files #define _IRR_COMPILE_WITH_JPG_LOADER_ diff --git a/source/Irrlicht/BuiltInFont.h b/source/Irrlicht/BuiltInFont.h index bc0a4c25..76d4f866 100644 --- a/source/Irrlicht/BuiltInFont.h +++ b/source/Irrlicht/BuiltInFont.h @@ -16,7 +16,7 @@ namespace irr { namespace gui { - +#ifdef _IRR_COMPILE_WITH_BMP_LOADER_ u8 BuiltInFontData[] = { 0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00, @@ -1056,6 +1056,16 @@ u8 BuiltInFontData[] = }; u32 BuiltInFontDataSize = sizeof(BuiltInFontData); + +#else // !defined(_IRR_COMPILE_WITH_BMP_LOADER_) + + // built-in font cannot be loaded if there is no BMP loader + + u8* BuiltInFontData=0; + + u32 BuiltInFontDataSize = 0; + +#endif } // end namespace gui } // end namespace irr diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index 99f98346..ad9d9436 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -157,7 +157,7 @@ void CGUIEnvironment::loadBuiltInFont() CGUIFont* font = new CGUIFont(this, "#DefaultFont"); if (!font->load(file)) { - os::Printer::log("Error: Could not load built-in Font.", ELL_ERROR); + os::Printer::log("Error: Could not load built-in Font. Did you compile without the BMP loader?", ELL_ERROR); font->drop(); file->drop(); return; diff --git a/tools/GUIEditor/CGUIPanel.cpp b/tools/GUIEditor/CGUIPanel.cpp index 8b6bf9a0..47fbb57e 100644 --- a/tools/GUIEditor/CGUIPanel.cpp +++ b/tools/GUIEditor/CGUIPanel.cpp @@ -93,11 +93,10 @@ void CGUIPanel::draw() } video::IVideoDriver* driver = Environment->getVideoDriver(); - - if (Border) + IGUISkin* skin = Environment->getSkin(); + if (Border && skin) { - IGUISkin* skin = Environment->getSkin(); - skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), true,true, AbsoluteRect, &AbsoluteClippingRect ); + skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect ); } IGUIElement::draw();