GUI Editor Juce 6 - getting started

In order to help we need to know the error message when the compiler failed. Without there is not much point in trying to help.
(btw. this will be your first point to investigate as well. Even if you have no idea what that means, often enough brings copy-pasting the error message into google or your favourite search engine the first enlightment)

I’m always using search. I’ve found two tutorials how to place image in Juce. And both doesn’t work.

That is errors. Also, I’ve attached project.

Can you correct my project to get it work? It will be very helpful.

Or maybe create new one with only image on background. For example icon.png from Juce folder.

The error messages indicate that you have pasted the paint function in a CPP file as a local function (3rd message). In this notation is was meant to be put in the header file in the definition of your class as the intention is to override the paint member function of your component (1st and 2nd error message).

best,
Andreas

Thank you. In header already was void paint(juce::Graphics&) but I wrote void paint(juce::Graphics& g)
What is difference? Is that g important?

Also project has compiled.

Now I’ll try to control it, move and change size. Also is there way to preview my project without compiling?

done

As a follow up to my question, it would behoove you to spend some time learning C++. While most of us on the forums don’t mind helping with the occasional language question, tutoring c++ is not really the focus. This issue about why the paint function wasn’t working, and your question about is that g important, are examples of how the lack of understanding gets in the way of you using JUCE. Imagine trying to build a house but not knowing how to use any of the tools?

1 Like

Thank you again, I know, that I should know more. But at now I should learn how to do some tasks in Juce.

And now very hard task for me is moving sliders and labels. I have code generated from faust2juce command but I cant understand how to move it.
I’m searched over web, and heave read official Juce tutorial. But no exact answers for my case.
Because code is generated, it is rather hard to understand what to edit to move slider and title.

As you have more experience, maybe be it will not so hard to you.

I’ve attached project with two sliders and two labels. I need set them to bottom.

movingelements2.zip (86.1 KB)

If you are using something like faust2juce, you should refer to their documentation on how it would be possible to customize the generated GUI or if it is even possible. The generated code is very long and hard to read and understand to see if there are any supported customization possibilities. Maybe someone here will have specific experience about using that tool, though.

I’ve read Faust tutorials, manual and other documents, and there no answer.

That strongly suggests they might not have any officially supported way to customize how the GUI looks like with the faust2juce tool.

But it is simple Juce project.

It is not particularly simple and the code seems a bit difficult to customize in any way.

Sliders were vertical, and I’ve found in Juce code how to make them horizontal.
I’ve tried to change all juce::Justification::centredTop to Bottom
but sliders not move. I know it is also not very hard task for professionals.

I’ve moved labels.
But sliders still not, I need advice what to search for sliders.

How to change text color for knob value, that is white.