braitsch / ofxDatGui

Simple to use, fully customizable, high-resolution graphical user interface for openFrameworks

Home Page:https://braitsch.github.io/ofxDatGui/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

problem with Png alpha using ofxDatGui

antocreo opened this issue · comments

commented

Hi, I am using your addon for the first time. I am having problems in blending the alpha of the png icons. This happens only when I use the ofxDatGui.
If I use just the component, or the folders etc, I get no problems.
Have you got any Idea of what I am doing wrong?

Thank you

I don't understand your issue. Can you post a screenshot and explain how you're trying to blend the alpha of the icons?

commented

Hi Braitsch,
thanks for the quick reply.
so, if I use ofDatGui *myGui and then a theme and then I attach to the myGui some folders I created with all the components in it, what happens is that when I run the app, the alpha in the png icons (arrows, dots etc) doesn't blend with the background. I attached a screenshot that may explains better than my words.

here is how I blend the alpha
ofEnableAlphaBlending();
myGui->draw();
ofDisableAlphaBlending();

Note that if I don't use the theme or the ofDatGui but I use only the components or the folders, I don't have this problem... In fact, this is what I am doing at the moment.

I tried to use the other method to have control on the theme otherwise I have no idea how to change the colors of the components alone.

Also - I am sneeking this question in - I was trying to find a way to create a folder of folders.
Or a way to collapse all the folders in one go. I tried to add a header or a footer to a folder but it didn't work.

My first time using this addon which I find great, but I need more time to get into it, I suppose.

Thank you for this anyway. it really looks cool

screen shot 2016-12-12 at 14 30 34

You shouldn't have to enable alpha blending as the png icons should render correctly without that. Can you post a link to your project so I can run it locally and test? As for your second question, nested folders (folders of folders) are not supported and likely won't be anytime soon. Sorry that's a limitation of the addon.

commented

Hi Braitsch,
I have just published the code that I finished last night. it's here https://github.com/antocreo/BYO_Master
The class you're looking for is GUI.h/cpp
I do need to alphablend if I use the folders. and that solves the problem. But it doesn't if I use the ofDatGui component. It may be something that I am doing wrong in ofApp. I am not sure.
Feel free to have a look when you have time.
I didn't mean to complain. Your addon is already ace as it is! :) and in fact I sorted it out using the folders.

thank you!

Hi, apologies that I never followed up on this. I can't seem to recreate the issue you're describing from within any of the examples included with the addon. Feel free to reopen this issue if the latest version on master hasn't resolved this issue for you.