I didn't look at the game (away from home and not able to atm), so maybe I'm about to answer the wrong question - but you can put a constant colour image as a Chili image in as the first child of the object and then (repeatedly) alter that images colour/transparency setting. Or, if your Chili theme has a background already for the object, a simple solution is to just keep changing Object.backgroundColor and Object.borderColor.whole tech window flash but I didn't know how to code that easy and fast while using chili
How to make flashing Chili objects
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
How to make flashing Chili objects
Split from viewtopic.php?f=14&t=33829
Re: Ludum Dare 33
Oh, you can do that for images as well? I thought they used textures which ignored color settings.Silentwings wrote:I didn't look at the game (away from home and not able to atm), so maybe I'm about to answer the wrong question - but you can put a constant colour image as a Chili image in as the first child of the object and then (repeatedly) alter that images colour/transparency setting. Or, if your Chili theme has a background already for the object, a simple solution is to just keep changing Object.backgroundColor and Object.borderColor.
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Ludum Dare 33
Yep! All the unit pics in BAR, the colour is actually added by chili.Oh, you can do that for images as well?
Re: Ludum Dare 33
Ah you're right. I think I tried .backgroundColor and didn't look further. It seems it's only multiplied with the texture though so you can't add colors (e.g. can't turn a blue image red), but you can still do a lot if the image is white.Silentwings wrote:Yep! All the unit pics in BAR, the colour is actually added by chili.Oh, you can do that for images as well?
Re: Ludum Dare 33
There is an example in the demo widget.gajop wrote:Unlock available should just make the whole tech window flash but I didn't know how to code that easy and fast while using chili. (Probably would have to resort to default opengl and had no time for that)
Re: Ludum Dare 33
Yep! I've been using that for buttons, text and similar for ages, I just didn't know there was the .color field for images.jK wrote:There is an example in the demo widget.gajop wrote:Unlock available should just make the whole tech window flash but I didn't know how to code that easy and fast while using chili. (Probably would have to resort to default opengl and had no time for that)
I'm keep to restart work in chili fx for some sexier animated UI though -> shaders would probably be neat.