Color picker gui

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

Re: Color picker gui

Post by Seven »

would like to use this control but having some troubles with memory leaks.

simple code to test

IGUIColorPicker* e =new IGUIColorPicker(getGui(), getGui()->getRootGUIElement(), 7);
e->drop();

gives exception on exit without the drop() and leaks memory with the drop().

any help on this?
Ovan
Posts: 70
Joined: Thu Dec 18, 2008 12:41 am
Contact:

Re: Color picker gui

Post by Ovan »

Well I don't use irrlicht since 5 years, I don't know how the engine as changed
With a rapid reading it appear that gui elements should be grab on the constructor so I recommend you to add this few lines in the constructor :

Code: Select all

 
            close->grab();
            extend->grab();
            scroll->grab();
            img[0]->grab();
            img[1]->grab();
 
            for(int i = 0; i< 6; ++i)
            {
                tx[i][0]->grab();
                tx[i][1]->grab();
                sb[i]->grab();
            }
 
I will add the modification in my github https://github.com/Phirxian/irrlicht-addons

I hope this will help you
Best regards
Post Reply