CGUITreeCtrl slight change

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
Post Reply
Seven
Posts: 1030
Joined: Mon Nov 14, 2005 2:03 pm

CGUITreeCtrl slight change

Post by Seven »

found the CGUITreeCtrl code on the forumsomewhere but cant find it again.
anyhow, some clipping issues if the control has too few items in it to activate the clipping code

slight change to clip text correctly in the CGUITreeCtrl element draw function

Code: Select all

 
void CGUITreeCtrl::draw()
{
        ------------- < code removed for clarity > ----------------
 
    if(RootNode->Child) // No point in drawing anything otherwise
    {
        // core::rect<s32> *MyClip = NULL;                // original code
        core::rect<s32> *MyClip = &clientClip;            // replacement code to clip text correctly 
 
        core::array<bool> DistStack;
        u32 Indent = 1-ScrollBarH->getPos()/10;
 
Post Reply