Cabbage Logo
Back to Cabbage Site

Only outline on buttons?

Hi,

it seems like the button outline is produced by creating a full square underneath the button instead of just being around it. That’s fine, but I was wondering if there’s any way to only have the outline on a button? This is to place it over some text while you can still see the text through the button.

A image-widget over a invisible button or something could also be a reasonable solution, but is it possible to produce a square-line with an invisible area inside with the image-widget?

button bounds(32, 198, 65, 20), channel("Choices"), text("", ""), fontColour:0(255, 114, 114, 0) colour:1(65, 73, 89, 0) colour:0(65, 73, 89, 0) fontColour:1(255, 114, 114, 0), outlineThickness(4), corners(0), outlineColour(16, 19, 22, 255)

I know what you mean. Hmm, would an image do the trick instead?

I can easily do it in a graphical editor, the reason I like to do as many of these things as possible in Cabbage is that you can adjust the height and width naturally without the image getting stretched. Also you can of course adjust all the other identifiers to fine-tune it without having to create/change images, re-export, etc…

But if images are the only way I can of course do it that way yeah

No, I mean use an image widget as a button?

Yes I can use an image widget, but is it possible to create only the outline with a image widget? And still have the invisible area between the outline?

I can’t recall off the top of my head, but it’s worth a shot. Sorry, I’m not at a PC I can test this with right now…

Just tried this on a machine with Cabbage and using an image widget will work Ok. I will try to update the button widget when I get a chance :+1:

2 Likes

I notice that the outline with a image-widget has a different thickness at the corners than the rest of the outline. Is this intended?

Not, but it’s most likely a rendering issue. I’ve always got Cabbage to draw those shapes using straight up pixel data, but I think it’s time to swap that out for paths. I think they might handle these kinds of things much better. So I will revisit the button outline, and the general shapes and see if I can rework them to use paths :+1:

1 Like