There is a bug in this file:
CGUIScrollBar.cpp
How to get the bug:
Code: Select all
IGUIScrollBar * sbar = guienv->addScrollBar(...)
sbar->setMin( 101 ) //any number greater than 100
sbar->setMax( 102 ) //any number greater than the last number
"Min" is 0 instead of 101
"Max" is correct.
BUGGED VERSION:
Code: Select all
void CGUIScrollBar::setMax(s32 max) //line 400
{
Max = core::max_ ( max, Min );
bool enable = core::isnotzero ( range() );
UpButton->setEnabled(enable);
DownButton->setEnabled(enable);
setPos(Pos);
}
//! sets the minimum value of the scrollbar.
void CGUIScrollBar::setMin(s32 min) //line 418
{
Min = core::min_ ( min, Max );
bool enable = core::isnotzero ( range() );
UpButton->setEnabled(enable);
DownButton->setEnabled(enable);
setPos(Pos);
}
Code: Select all
void CGUIScrollBar::setMax(s32 max)
{
Max = core::max_ ( max, Min );
if(max!=Max)
Min=max;
bool enable = core::isnotzero ( range() );
UpButton->setEnabled(enable);
DownButton->setEnabled(enable);
setPos(Pos);
}
//! sets the minimum value of the scrollbar.
void CGUIScrollBar::setMin(s32 min)
{
Min = core::min_ ( min, Max );
if(min!=Min)
Max=min;
bool enable = core::isnotzero ( range() );
UpButton->setEnabled(enable);
DownButton->setEnabled(enable);
setPos(Pos);
}
Gui artifacts:
1)When clicking a CheckBox that is child of a WINDOW, the title bar of that window will be highligthed only when you are clicking (holding down Left mouse button) the checkbox, when you release "Left Mouse button" the window is not more highligthed.
I.E.: If you click a checkbox inside a win form the form will never lose its "highligthing". (nether when releasing the mouse button since the window remain selected)
Fixing:
Unknown
2)Tab Group clipping Area. To prevent a clipping artifact with transparent gui and items inside a tab page the Clipping area must be resized moving down its top left corner by 1 pixel. but without changing the drawed parts (only for irrlicht default skins).
fixing:
So if we have a tab group with 2 tabs and a clipping area of
recti(20,20,400,400) now the new clipping area must be (20,21,400,400).
note that the clipping area is smaller than the whole tab drawing area because the size of Tabs is removed.
(i found that artifact making a tab group with ScrollBars used for scrolling its content)
Errata Corrige:
There are several errata in the API documentation:
file:
CImage.h
line 103
Code: Select all
//! fills the surface with ANY CHOOSEN COLOR
virtual void fill(const SColor &color);