mapeditor/tiled

Do you want to work on this issue?

You can request for a bounty in order to promote it!

Layer tint color doesn't affect shapes #4183

afk-mario posted onGitHub

Describe the bug The tint color property in layers doesn't seem to affect objects, the Color property does tint shapes, but this property is not documented neither in the JSON format or the API.

To Reproduce Steps to reproduce the behavior:

  1. Set the value for Tint color in a layer with shapes. Image
  2. The shapes are not tinted.
  3. Set the value for Color in a layer with shapes. Image
  4. The shapes are tinted.
  5. The Map JSON now has a property color

Expected behavior Tint the shapes when setting the layer property TintColor.

Specifications:

  • OS: Linux
  • Tiled Version: 1.11.2

The color of an Object is usually determined by its class, and if Tints applied, it would make identifying the class of an object quite annoying. The Color layer property exists to avoid this problem, allowing colouring Objects without getting in the way of the class colours.

However, it would be nice to have a layer option to apply the tint to Object colours as well, to make things simpler when the class colours are intended to be cosmetic rather than as identifiers.

posted by eishiya about 1 month ago

I'm also confused on why there is a color property on the Layer object in the first place, can't find any mentions of it on the Docs or API. I guess it's because the Layer is an object and inherits the color property, and if this is the intended behavior then the property should be documented in the JSON format right?

posted by afk-mario about 1 month ago

Sorry, I edited my post above. The Color property exists specifically to allow colouring Objects without getting in the way of the identifying class colours like tinting would.

The property should be documented, but it's possible the TMJ docs were forgotten when it was added. It's there in the TMX docs, at least.

posted by eishiya about 1 month ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests