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
master
bitplane 2008-02-11 19:34:12 +00:00
parent f9a0f21bef
commit 6f4a9f921a
5 changed files with 17 additions and 6 deletions

View File

@ -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.

View File

@ -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_

View File

@ -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

View File

@ -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;

View File

@ -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();