I am using the TCastleShape outline to indicate if a list item is selected. It works for rectangles and ovals, but for the triangleright (haven’t tried the others), there is no outline. I will use another feature like font color to indicate selection so it isn’t a bit deal. but oval outline was cool…
I see it is deprecated anyways.
Sorry for such delay in answering! I’m catching up with the forum.
I started to write an answer, saying that the TCastleShape.Render
simply doesn’t implement Outline
when ShapeType = stTriangle*
, and pointing out how to workaround it by rendering 2 shapes… Then I had a change of heart, since my answer seemed too complicated for something that should be just a checkbox at TCastleShape
Sometimes I fear adding features to the engine, but in this case it makes total sense that TCastleShape
features working outlines.
New answer: I have
- un-deprecated a few properties of
TCastleShape
related to outlines (Filled
,Outline
,OutlineColor
,OutlineWidth
) - made sure they are implemented nicely also for triangles
- and even put them in “Basic” tab of CGE editor object inspector.
See the attached project and screenshot for demo.
The change is committed to CGE. As usual, it will be available in downloads on Download | Castle Game Engine automatically if everything passes automatic tests. You can observe the page Comparing snapshot...master · castle-engine/castle-engine · GitHub – when this page will no longer show the commit “Undeprecate TCastleShape properties related to outline…” then this commit is part of the released archive.
Nice! Just highlighting the text didn’t communicate ‘selected’ as strongly as the outline. Thanks!