Driftwood2D / Driftwood

Driftwood 2D Tiling Game Engine and Development Suite
http://tileengine.org/
MIT License
24 stars 1 forks source link

Widget loader text newlines #170

Closed seisatsu closed 7 years ago

seisatsu commented 7 years ago

Support newlines in the contents field of a text widget described in a widget file.

seisatsu commented 7 years ago

We should also support padding and negative padding for line spacing. By default it'll auto-space by checking the font height.

seisatsu commented 7 years ago

Depends on the "line-height" property from #168.

Make a new line when "\n" is encountered in the text. SDL_TTF does not do this automatically.

seisatsu commented 7 years ago

Implemented lists of text contents instead of newlines in 605dcd6ad9d58a5255debb32b660622c5bc70341. Also added line-spacing property, which operates in pixels. "line-height" will be a separate property which uses multiples of the default line-height.