Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Change Canvas Widget's Brush

A topic by Capital Ex created Dec 02, 2023 Views: 211 Replies: 4
Viewing posts 1 to 2

Hi, experimenting with Decker, and I'm wondering how you can change the brush for a canvas widget? It's shown in the tour, but it's left unexplained.

Developer

The Canvas Interface has a ".brush" attribute which can be manipulated with scripts or the Listener:


There are 24 numbered brushes built in, and facilities for defining new ones with scripts or modules. The brushes.deck example includes several modules which install extra brushes.

Does that clear things up?

Yes, thank you! I didn't think to use the listener to change those. I was looking all over the tool bars for something.

Is there a way to change the color too like in the demo? I've taken a look at the documentation and I'm probably missing it but I'm not seeing an attribute for it like with the .brush attribute.

(+1)

Nevermind! I have located and made use of the ".pattern" attribute!