Home › Forums › General › Panels, Components, Macros › Question for Atom: AddResources…
Tagged: Resource
- This topic has 10 replies, 3 voices, and was last updated 6 years, 1 month ago by goodweather.
-
AuthorPosts
-
May 31, 2017 at 1:33 pm #72230
Hello Atom and all other awesome Ctrlr users!
Quick question:
Is there any way to create a method that will open the “Add Resources” window?
Basically mimicking the pressing of the “Add” button on the “Resources” tab so it can be accessible by the user from the main panel without the need to dig in the AppData\Roaming\Ctrlr….. etc. manually (on both platforms).
Same question could apply to the “Remove” and “Reload” buttons too.
I went thru some JUCE classes but couldn’t find anything really even close to what I need, so I assume this is maybe more Ctrlr than strictly JUCE related.Thank you and have a great day!
Peace!
June 3, 2017 at 11:19 am #72247knock, knock… anybody home ???
Any ideas?
Anyone?
Cheers!June 3, 2017 at 5:48 pm #72252hey Proton :o)
in my digging, i saw that it is possible to create and delete
modulators (saw it in the github stuff).
maybe something there?June 4, 2017 at 2:49 pm #72272Hi human fly,
how do you mean? Can you elaborate on that?
Cheers!June 4, 2017 at 7:08 pm #72274i’m pretty sure i saw something here somewhere:
https://github.com/RomanKubiak/ctrlr/tree/master/Sourceand there’s some stuff here – but i don’t know if we’re
are allowed to get at these, CtrlrManager.h:
https://github.com/RomanKubiak/ctrlr/blob/master/Source/Core/CtrlrManager/CtrlrManager.hat line 114 and 193, it has addModulator and removeModulator.
beyond that..??June 4, 2017 at 9:49 pm #72278Hi human fly,
ok now I see what do you mean but unfortunately it is not what I am looking for.
The Git repository is of course a good place to look for clues but in this case I think only Atom can shed a light.What I want to do is to allow the end user to import own resources to the panel by pressing a GUI button and with a simple Lua script attached. I did checked the demos where Roman shows us how to deal with file import/export but I couldn’t find anything related to the root folder where the resources are stored and I hope for an elegant solution with the option to Add, Remove and Refresh assets.
Hm, maybe he will check the forum soon.
Cheers!
June 7, 2017 at 2:29 pm #72299Is Atom still here? 😉 Or is he sipping drinks on Bermudas beaches???
🙂June 9, 2017 at 8:09 am #72314hey Proton,
this morning’s little discovery:
idea here: i’ve managed to ‘add resource’ to a popup
with
i= Image(resources:getResourceAsImage("my_image"))
as per the demo file DEMO Popups.
provides me with alternative to using a combo.could you maybe use this, if you could replace the image
referred to, on the fly? ie: call the image file ‘ImageResource1.png’,
and allow the user to overwrite that with own file?June 10, 2017 at 1:43 pm #72327Hi human fly,
thanks but I know about this and too bad this is not what I am looking for.
Here you select a certain image from a bunch of images you already have in your Resources, what I am looking for is a way for the user to ADD png files to the Resources first (root folder of the panel) so they can select them later on with a method you’ve described above. I hope this description of my intent is clear 😉 Cheers!June 10, 2017 at 8:54 pm #72330yep i realised that after posting.
March 25, 2018 at 8:53 pm #83090Hi Proton,
did you solve your issue with loading images?
I’m actually looking for a way to display an external image as a popup.
Looking in Juce I found the ImageFileFormat class that allows reading and writing images.
When read, it can maybe be added in Resources?
Anyway, I will try using that ImageFileFormat method and I hope it has been integrated within Ctrlr.
I’m using 5.3.201…Cheers
-
AuthorPosts
- The forum ‘Panels, Components, Macros’ is closed to new topics and replies.