Commit 6f4a9f92 authored by bitplane's avatar bitplane

Compiling without the BMP loader now compiles without the built-in font data....

Compiling without the BMP loader now compiles without the built-in font data. Added some comments and a warning about this. CGUIPanel draws background when border is on

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1236 dfc29bdd-3216-0410-991c-e03cc46cb475
parent f9a0f21b
...@@ -38,6 +38,7 @@ Changes in version 1.5 (... 2008) ...@@ -38,6 +38,7 @@ Changes in version 1.5 (... 2008)
Nodes are now solid or transparent. ( but still more states are needed ) Nodes are now solid or transparent. ( but still more states are needed )
- GUI: - GUI:
- Disabling the BMP loader now compiles without the built-in font
- Added setTextAlignment to IGUIComboBox - 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. - 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. - Modal screens no longer flash invisible children when rejecting a focus change.
......
...@@ -286,6 +286,7 @@ B3D, MS3D or X meshes */ ...@@ -286,6 +286,7 @@ B3D, MS3D or X meshes */
#define _IRR_COMPILE_WITH_STL_WRITER_ #define _IRR_COMPILE_WITH_STL_WRITER_
//! Define _IRR_COMPILE_WITH_BMP_LOADER_ if you want to load .bmp files //! 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_BMP_LOADER_
//! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files //! Define _IRR_COMPILE_WITH_JPG_LOADER_ if you want to load .jpg files
#define _IRR_COMPILE_WITH_JPG_LOADER_ #define _IRR_COMPILE_WITH_JPG_LOADER_
......
...@@ -16,7 +16,7 @@ namespace irr ...@@ -16,7 +16,7 @@ namespace irr
{ {
namespace gui namespace gui
{ {
#ifdef _IRR_COMPILE_WITH_BMP_LOADER_
u8 BuiltInFontData[] = u8 BuiltInFontData[] =
{ {
0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x42, 0x4d, 0x4a, 0x20, 0x00, 0x00, 0x00, 0x00,
...@@ -1056,6 +1056,16 @@ u8 BuiltInFontData[] = ...@@ -1056,6 +1056,16 @@ u8 BuiltInFontData[] =
}; };
u32 BuiltInFontDataSize = sizeof(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 gui
} // end namespace irr } // end namespace irr
......
...@@ -157,7 +157,7 @@ void CGUIEnvironment::loadBuiltInFont() ...@@ -157,7 +157,7 @@ void CGUIEnvironment::loadBuiltInFont()
CGUIFont* font = new CGUIFont(this, "#DefaultFont"); CGUIFont* font = new CGUIFont(this, "#DefaultFont");
if (!font->load(file)) 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(); font->drop();
file->drop(); file->drop();
return; return;
......
...@@ -93,11 +93,10 @@ void CGUIPanel::draw() ...@@ -93,11 +93,10 @@ void CGUIPanel::draw()
} }
video::IVideoDriver* driver = Environment->getVideoDriver(); video::IVideoDriver* driver = Environment->getVideoDriver();
if (Border)
{
IGUISkin* skin = Environment->getSkin(); IGUISkin* skin = Environment->getSkin();
skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), true,true, AbsoluteRect, &AbsoluteClippingRect ); if (Border && skin)
{
skin->draw3DSunkenPane( this, skin->getColor( EGDC_APP_WORKSPACE), false, true, AbsoluteRect, &AbsoluteClippingRect );
} }
IGUIElement::draw(); IGUIElement::draw();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment