I was thinking of putting more characters into signs too, but I didn't think about multiline really. I just stretched up the array a bit but the sign became too big for the game and it only rendered a small part of the background and cut of a piece of the text, so there is also some change needed there.
But I'll see what I can do about the maximum amount of characters on a sign, there seem to be comming quite some complications along the way so don't expect it too soon.
You could try to apply it to 0.5.2 but it is possible that applying it fails (I don't know how much the code affected by the patch has been touched).
And no, it won't cause desyncs AFAIK, it still uses the same methods as before, there is only a shortcut for deleting signs and a client side method to cycle through all the signs.
XeryusTC wrote:* Cycle through all the signs from the edit window
Found a bug with this feature. Steps to recreate:
Create 4 signs
Click on any of the signs and then Next will only cycle through the first 3. The Prev button will cycle through all 4, though.
Delete the 1st sign
Use the Next or Prev button some more; OpenTTD will crash with "!invalid string id 0 in GetString()" when it hits where the 1st sign used to be
I've fixed the invalid string bug earlier today, but that switched the other problem around to the previous button. I have fixed that now too and I'll upload a new version.
And for the gotos: I mainly used them to prevent code duplication (or making more functions) and also a little bit because I borrowed code from some other OTTD window .
The patch works quite well. Thanks for your work, XeryusTC.
I've attached two images for the interested. The first one shows XeryusTC's sign edit box.
The second one is an animation which shows how signs are now attached to the original tile so that they also move when terraforming.
Attachments
signs attached to the tiles move when terraforming
anim2.gif (217.75 KiB) Viewed 4521 times
This is the sign edit box with the extra delete button and the navigation buttons.
I updated the patch again, there are a minor update and I moved some code. Note that the move affects network play, when someone places a second sign on a tile where there was already a sign then you won't see it. Sign IDs might also be screwed from that point and you might see signs disappearing when a sign gets deleted from a double-sign-tile. It will not cause desyncs AFAIK though.
A patch update, I added a method to cycle through the signs list alphabetically. The old method is still available and you can switch between them with a patch setting.
OpenTTD: peter1138 * r10401 /trunk/src/ (lang/english.txt main_gui.cpp signs.h signs_gui.cpp): -Feature: new sign editor features including switching to previous/next sign (XeryusTC)
This means that this patch will be in today's nightly and you don't have to use the outdated patch on the top of the page anymore.
Have fun with it!
OpenTTD: peter1138 * r10401 /trunk/src/ (lang/english.txt main_gui.cpp signs.h signs_gui.cpp): -Feature: new sign editor features including switching to previous/next sign (XeryusTC)
This means that this patch will be in today's nightly and you don't have to use the outdated patch on the top of the page anymore.
Have fun with it!