tweecode / twine

UI for creating hypertext stories
http://twinery.org
656 stars 97 forks source link

Store twine passage position information in modified .twee file #160

Open nephlm opened 10 years ago

nephlm commented 10 years ago

While searching for information to facilitate editing in an external program without loosing the graph I came across this conversations:

http://twinery.org/forum/index.php?topic=1403.0

which pretty much said what I was looking for was not currently implemented. However it did give me enough information to suggest it was very doable. So I did. I don't know if this is of use to anyone else or just myself and being new to the twine community I wasn't sure if this is something that is generally wanted or if there is some other plan to handle the issue.

I created a new preference. Unfortunately I couldn't seem to get it to default to False. If someone can point me to what I'm missing I'll fix it.

This patch creates a new section in a passage after the tags containing key value pairs. At present it handles 'twine-pos-x' and 'twine-pos-y'. If you do export to twee (while the pref is set) it will populate those values in the twee file. Import from twee will similarly read them and place the passage widgets according to those values.

Standard twee files continue to work and if the pref is set to false standard twee files can still be generated.