Oregon-Trail icon indicating copy to clipboard operation
Oregon-Trail copied to clipboard

Automatic text wrapping

Open Rodak123 opened this issue 3 years ago • 5 comments
trafficstars

Right now for rendering a new line you must add a new element in the JSON string array.

@shiffman already suggested using the text() function where you can specify the width and height of the textbox.

Rodak123 avatar Nov 23 '22 22:11 Rodak123

I'll work on this!

shiffman avatar Nov 23 '22 22:11 shiffman

@Rodak123 also related to this, do we need separate font setting for each slide, maybe it's just one font setting for the entire game in slide_data.json?

shiffman avatar Nov 24 '22 15:11 shiffman

Maybe, but I'm not sure if there are any pages with different font settings.

Rodak123 avatar Nov 24 '22 15:11 Rodak123

I think there should be a default font for the entire game and then if a page can optionally override the default font.

shiffman avatar Nov 24 '22 17:11 shiffman

I noticed that the text wrapping has some issues:

  1. When I turned the title "Many Kinds of people made the trip to Oregon." from:

    ["Many kinds of people made the", "trip to Oregon."]
    

    to:

    "Many kinds of people made the trip to Oregon."
    

    A new line was added: wArrays woArrays

  2. When the text string length exceeds 22 characters it freaks out:

    gerW Here I split the Seien Sie... option string to an array: gerC

Rodak123 avatar Dec 08 '22 13:12 Rodak123