Ludii Forum
How to colour regions? - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Questions (https://ludii.games/forums/forumdisplay.php?fid=13)
+--- Forum: About the Ludii Grammar (https://ludii.games/forums/forumdisplay.php?fid=15)
+--- Thread: How to colour regions? (/showthread.php?tid=313)



How to colour regions? - slimy_asparagus - 12-03-2020

In the attached file I am trying to make the region "H" be White with Black borders. Ideally the region border would have a thick black line whereas each cell would have a thin black line.

I did once manage to get some region colouring to work but I cannot recreate what I did even with exactly the same file.


RE: How to colour regions? - MatthewStephenson - 12-03-2020

Hi,

You game description is completely correct, the problem was just a bug in Ludii.
Thanks for pointing this out Smile

This will be fixed in the next release.

Cheers,
Matthew


RE: How to colour regions? - slimy_asparagus - 12-03-2020

(12-03-2020, 08:35 AM)MatthewStephenson Wrote: Hi,

You game description is completely correct, the problem was just a bug in Ludii.
Thanks for pointing this out :)

This will be fixed in the next release.

Cheers,
Matthew
Matthew, Thank you so much.


RE: How to colour regions? - MatthewStephenson - 12-03-2020

Hi,

I might have spoken too soon before, there is also a small issue in your description.
You have specified the roleType condition for the region colour metadata as "All".
As a result, the metadata will only colour regions called "H", which have the roletype "All"
But, you have defined the roletype of the "H" region as "Shared", so it will not be coloured.

If you don't care about the roletype of the region (which I don't think you do in this case) you don't need to specify one in the metadata.

I.e.
(region Colour "H" All Cell (colour White)) -> (region Colour "H" Cell (colour White))

Hopefully that makes sense?

Cheers,
Matthew


RE: How to colour regions? - slimy_asparagus - 12-03-2020

(12-03-2020, 09:38 AM)MatthewStephenson Wrote: Hi,

I might have spoken too soon before, there is also a small issue in your description.
You have specified the roleType condition for the region colour metadata as "All".
As a result, the metadata will only colour regions called "H", which have the roletype "All"
But, you have defined the roletype of the "H" region as "Shared", so it will not be coloured.

If you don't care about the roletype of the region (which I don't think you do in this case) you don't need to specify one in the metadata.

I.e.
(region Colour "H" All Cell (colour White)) -> (region Colour "H" Cell (colour White))

Hopefully that makes sense?

Cheers,
Matthew


Matthew,

Thanks. That works for the cell space. It doesn't do anything for the edge. Is there still a bug or am I still doing something wrong?


RE: How to colour regions? - MatthewStephenson - 12-03-2020

Hi,

Did you make the same change on the Edge metadata line as well?

If its still not working please attach the .lud and I'll take a look.

Cheers,
Matthew


RE: How to colour regions? - slimy_asparagus - 12-03-2020

(12-03-2020, 02:24 PM)MatthewStephenson Wrote: Hi,

Did you make the same change on the Edge metadata line as well?

If its still not working please attach the .lud and I'll take a look.

Cheers,
Matthew
Matthew,

Thanks it has curiously sprung into action. I am not really sureĀ  what happened there. Sorry for bothering you.

Nicholas