[fixed] IGUIScrollBar and other fixings

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

[fixed] IGUIScrollBar and other fixings

Post by REDDemon »

I checked for those bugs in the latest trunk and they are still present:

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
 
now:
"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);
}
 
my FIXED VERSION:

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);
 
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Thanks for the reports.

I fixed CGUIScrollBar in svn releases branch 1.7

Problem with Window losing focus has to wait - seems there are more problems like that, at least I had found similar one once when closing submenues.

Tab group clipping also on my todo for now.

CImage and IImage documentation are fixed also in svn 1.7 branch now.

One note: It's no problem putting a bunch of documentation errors in one thread, but otherwise please report each bug always in an own thread. Don't worry about creating too many posts. It makes bug management a little easier for use if we can just decide if a thread is done or not.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

ok sorry. I will report each (if i found any again) in a different thread :)
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

The tab group clipping problem is probably fixed now in svn release branch 1.7. At least if it was that problem...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply