Commit 5f21bbf8 authored by bitplane's avatar bitplane

added a black border around the icons in builtInFont.h, added the source...

added a black border around the icons in builtInFont.h, added the source bitmap. changed the way completely background transparency is handled in the bitmap font loader, the colour data for background is not kept.
changed default icon highlight value in the skin so the icons are highlighted in the same way as the text.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@755 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 40abacae
......@@ -3,7 +3,8 @@ Changes in version 1.4 (... 2007)
- createDevice now reports errors if the driverType is unknown, previously it
created a window but populated it with a null driver without any warning.
- Fixed a bug in CBillboardTextSceneNode::setText where the old text was not cleared.
- Fixed a bug in CBillboardTextSceneNode::setText where the old text was not
cleared.
- Changed irrArray::linear_search to use the == operator rather than <
This may be slower in some cases, but it no longer returns false positives
......@@ -30,6 +31,12 @@ Changes in version 1.4 (... 2007)
GUI:
- Fixed the default font icons so they have a black border and are not
invisible in default listboxes. Old font tool textures now keep their color
so colorful fonts are possible by editing the font's texture. The colors of
completely transparent areas are no longer kept when generating the texture
from an image. Added builtInFont.bmp for ease of editing.
- IGUIElement changes:
OnEvent no longer absorbs events by default.
Serialize/deserialize now call getter and setter functions, in case people
......
This diff is collapsed.
......@@ -976,12 +976,17 @@ IGUIListBox* CGUIEnvironment::addListBox(const core::rect<s32>& rectangle,
IGUIListBox* b = new CGUIListBox(this, parent ? parent : this, id, rectangle,
true, drawBackground, false);
if (getBuiltInFont() && getBuiltInFont()->getType() == EGFT_BITMAP)
if (CurrentSkin && CurrentSkin->getSpriteBank())
{
b->setSpriteBank(CurrentSkin->getSpriteBank());
}
else if (getBuiltInFont() && getBuiltInFont()->getType() == EGFT_BITMAP)
{
b->setSpriteBank( ((IGUIFontBitmap*)getBuiltInFont())->getSpriteBank());
}
b->drop();
return b;
}
......
......@@ -284,16 +284,13 @@ void CGUIFont::readPositions32bit(video::IImage* image, s32& lowerRightPositions
return;
}
// TODO: Hack till it's getting better...
// Pixel(0,0) == half opacity assume font with alpha..
s32 truealphaFont = ( (p[0] & 0xFF000000) == 0x7f000000 );
// fix half alpha of top left pixel in some font textures
p[0] |= 0xFF000000;
s32 colorTopLeft = p[0];
s32 colorLowerRight = *(p+1);
s32 colorBackGround = *(p+2);
s32 colorBackGroundTransparent = 0x00FFFFFF & colorBackGround;
s32 colorBackGroundTransparent = 0; // 0x00FFFFFF & colorBackGround;
s32 colorFont = 0xFFFFFFFF;
*(p+1) = colorBackGround;
......@@ -348,11 +345,6 @@ void CGUIFont::readPositions32bit(video::IImage* image, s32& lowerRightPositions
{
*p = colorBackGroundTransparent;
}
else
if ( 0 == truealphaFont )
{
*p = colorFont;
}
++p;
}
}
......@@ -376,13 +368,13 @@ void CGUIFont::readPositions16bit(video::IImage* image, s32& lowerRightPositions
return;
}
s16 truealphaFont = ( (p[0] & 0x8000) == 0x8000 );
// fix half alpha of top left pixel in some font textures
p[0] |= 0x8000;
s16 colorTopLeft = p[0];;
s16 colorTopLeft = p[0];
s16 colorLowerRight = *(p+1);
s16 colorBackGround = *(p+2);
s16 colorBackGroundTransparent = 0x7FFF & colorBackGround;
s16 colorBackGroundTransparent = 0; // 0x7FFF & colorBackGround;
u16 colorFont = 0xFFFF;
*(p+1) = colorBackGround;
......@@ -436,11 +428,6 @@ void CGUIFont::readPositions16bit(video::IImage* image, s32& lowerRightPositions
else
if (*p == colorBackGround)
*p = colorBackGroundTransparent;
else
if ( 0 == truealphaFont )
{
*p = colorFont;
}
++p;
}
}
......
......@@ -45,7 +45,7 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
Colors[EGDC_WINDOW] = video::SColor(101,255,255,255);
Colors[EGDC_WINDOW_SYMBOL] = video::SColor(200,10,10,10);
Colors[EGDC_ICON] = video::SColor(200,255,255,255);
Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,10,10,10);
Colors[EGDC_ICON_HIGH_LIGHT] = video::SColor(200,8,36,107);
Sizes[EGDS_SCROLLBAR_SIZE] = 14;
Sizes[EGDS_MENU_HEIGHT] = 30;
......@@ -84,7 +84,7 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
Colors[EGDC_WINDOW] = 0xf0f0f0f0;
Colors[EGDC_WINDOW_SYMBOL] = 0xd0161616;
Colors[EGDC_ICON] = 0xd0161616;
Colors[EGDC_ICON_HIGH_LIGHT]= 0xd0e0e0e0;
Colors[EGDC_ICON_HIGH_LIGHT]= 0xd0606060;
Sizes[EGDS_SCROLLBAR_SIZE] = 14;
Sizes[EGDS_MENU_HEIGHT] = 48;
......
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