Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addon image and font resources not being loaded #51

Closed
pierrep opened this issue Mar 20, 2016 · 6 comments
Closed

Addon image and font resources not being loaded #51

pierrep opened this issue Mar 20, 2016 · 6 comments

Comments

@pierrep
Copy link

pierrep commented Mar 20, 2016

I'm assuming this works on OSX, but is not cross-platform. I'm on Linux and the addon image resources weren't loading. I fixed this by setting the paths to be the following:

string rainbow = "../../../../../addons/ofxDatGui/ofxbraitsch/ofxdatgui/picker-rainbow.png";
string radioOn = "../../../../../addons/ofxDatGui/ofxbraitsch/ofxdatgui/icon-radio-on.png";
string radioOff = "../../../../../addons/ofxDatGui/ofxbraitsch/ofxdatgui/icon-radio-off.png";
string dropdown = "../../../../../addons/ofxDatGui/ofxbraitsch/ofxdatgui/icon-dropdown.png";

This is the normal OF behaviour, i.e. that file loading is relative to the data path.
Maybe there's a more elegant way to do this, but I'm not sure.

@braitsch
Copy link
Owner

Thanks for reporting this. I just added a ofxDatGui::setAssetPath() method that will allow you to customize the location of the ofxbraitsch asset directory and made the default path relative to the location of the addon. LMK if this helps.

@pierrep
Copy link
Author

pierrep commented Mar 21, 2016

Great, will try it out. Otherwise addon works perfectly, thanks for making this :)

@pierrep
Copy link
Author

pierrep commented Mar 21, 2016

That fixed it, thanks

@braitsch
Copy link
Owner

Great, glad to hear you're finding it helpful!

@transat
Copy link

transat commented Apr 22, 2016

In my app on a mac I needed to add gui->setAssetPath(""); to use the app's bin/data folder rather than the addons.

@braitsch
Copy link
Owner

@transat Thanks. This appears related to #65. Looking into this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants