Simon recently posted a draw text Script in another topic where a function was shown which calculates the width of a string:
two questions here:
1. how do i determine in which font the script calculates the width for. Bigger fonts are wider, so the returned number also has to be bigger.
2. is it possible to resize a button area with the above given function in mind and update it (by showing the interface again)?
My aim is my lately created custom dialog system where the clickable areas for the text are as wide as the screen -even if the text inside is maybe not screen filling.
The ButtonPolygon is not scriptable. That means in my eyes that it doesnt get saved to the savegames but maybe it is possible to rewrite that value, reshow the interface and you are good to go. The polygon size gets calculated at the beginning of every showing of the dialog interface so i dont neccessarily need to save its state...
Any ideas how to achieve this?