Cabbage Logo
Back to Cabbage Site

Visual bugs

I have had many a few issues with the widgets in cabbage. First off, the end of the hslider to the right doesnt generate all the way. Second off, im using groupboxes to group up widgets together. I know from messing around that widgets generated farther down the code are farther in front. In my ADSR groupbox, the image for the skin appears, but the knobs dont want to. I have code that looks somewhat like this

groupbox bounds(25, 308, 308, 308) visible(1) identchannel("GROUP_ENVALL") plant("GUI_ENVALL"){
    groupbox bounds(0, 0, 308, 308) visible(1) identchannel("GROUP_ENV1") plant("GUI_ENV1"){
        image bounds(0, 0, 308, 308) file("Skin\Envelope 1.png") 
        rslider bounds(4, 512, 50, 70) range(0.001, 1, 0.001, 1, 0.001) text("Delay") channel("delay") $rsliderstyle
        rslider bounds(54, 512, 50, 70) range(0.001, 1, 0.001, 1, 0.001) text("Attack") channel("attack") $rsliderstyle
        rslider bounds(104, 512, 50, 70) range(0.001, 1, 1, 1, 0.001) text("Decay") channel("decay") $rsliderstyle
        rslider bounds(154, 512, 50, 70) range(0.001, 1, 1, 1, 0.001) text("Sustain") channel("sustain") $rsliderstyle
        rslider bounds(204, 512, 50, 70) range(0.001, 1, 0.3, 1, 0.001) text("Release") channel("release") $rsliderstyle
        rslider bounds(254, 512, 50, 70) range(0.001, 1, 0.3, 1, 0.001) text("Amount") channel("amount") $rsliderstyle
    }

}
as you can see, i have knobs over the image and groupbox, however, i get a result that looks like this:
Envelope 1
i dont know whats causing this, as an example im looking at (toneZ) has code almost exactly like it. I dont have this issue with the oscillators, just with the envelopes. Any ideas?

I’m not sure, can’t test for an hour or so… but might it be the nested plants()? Honestly, I rarely even declare things as plants anymore… perhaps I’m in bad form by doing that.

But I vaguely feel like this is something I ran into once upon a time, and it ended up they’re not meant to be nested.

It’s actually simpler than that, I think…

change all of the 512’s to 50’s and suddenly I see the knobs, I think it’s just a placement issue?

    groupbox bounds(0, 0, 308, 308) visible(1) identchannel("GROUP_ENV1") plant("GUI_ENV1"){
        image bounds(0, 0, 308, 308) file("Skin\Envelope 1.png") 
        rslider bounds(4, 50, 50, 70) range(0.001, 1, 0.001, 1, 0.001) text("Delay") channel("delay") $rsliderstyle
        rslider bounds(54, 50, 50, 70) range(0.001, 1, 0.001, 1, 0.001) text("Attack") channel("attack") $rsliderstyle
        rslider bounds(104, 50, 50, 70) range(0.001, 1, 1, 1, 0.001) text("Decay") channel("decay") $rsliderstyle
        rslider bounds(154, 50, 50, 70) range(0.001, 1, 1, 1, 0.001) text("Sustain") channel("sustain") $rsliderstyle
        rslider bounds(204, 50, 50, 70) range(0.001, 1, 0.3, 1, 0.001) text("Release") channel("release") $rsliderstyle
        rslider bounds(254, 50, 50, 70) range(0.001, 1, 0.3, 1, 0.001) text("Amount") channel("amount") $rsliderstyle
    }
}

(without the image to load) gives me this:
image

Oh! thanks! i guess i just forgot to do that. whoopsies!
Edit: do you know anything about the hsliders? still wondering about those

The thumb moves slightly past the rightmost edge? Is this what you are referring to? It also happens on the leftmost edge but it less obvious. Is this the issue for you?

HSlider

Yes, that is the issue i have is there a fix?

Not for now, but leave it with me. My only concern is that resizing the width of the hsliders might mess up other peoples GUIs. I think it would be better to limit the thumb so that it doesn’t move past the end of the slider? :thinking:

This is fixed now. It’s available in the latest beta build.