Ludii Forum
(show Piece Text ...) - Printable Version

+- Ludii Forum (https://ludii.games/forums)
+-- Forum: Suggestions (https://ludii.games/forums/forumdisplay.php?fid=10)
+--- Forum: Ludii Features / Services (https://ludii.games/forums/forumdisplay.php?fid=11)
+--- Thread: (show Piece Text ...) (/showthread.php?tid=1050)



(show Piece Text ...) - dale walton - 07-05-2022

Since you are not encouraging the addition of game specific graphics for pieces, is it possible to have a feature that displays arbitrary text and/or the piece name on a piece? (with / without automatic scaling)

For example showing the word "Throw" on a disc.  Same also for sites on the board.  -- There are games where selecting a site, tile or piece activates a certain type of consequential action.

I suggest:

(show Piece Text ....)
(show Piece Name ...)
(show Symbol ... text:"string" ...)


RE: (show Piece Text ...) - MatthewStephenson - 07-05-2022

Hi,

I've added this functionality to the metadata commands for adding piece foreground/background, and for drawing symbols on the board.

For example, the following metadata line will write the word "Pawn" on all pawns:
(piece Foreground "Pawn" text:"Pawn" scale:0.1)

And the following line will write the word "Pawn" on the first vertex of the board:
(show Symbol text:"Pawn" Vertex 0)

With this you can hopefully achieve your desired effect.
It will be included in the next release.

Cheers,
Matthew


RE: (show Piece Text ...) - dale walton - 07-06-2022

Thanks!