diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-12 19:58:06 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-12 19:58:06 +0000 |
commit | ab8382c0db353d9d1ba6b7a9690d56aa2415258c (patch) | |
tree | f23fb584e594e0c9ff5a9ad650d97c493714078d /src/signs_gui.cpp | |
parent | a222fe2e86d2736217f3bba43b28e95297b8d71e (diff) | |
download | openttd-ab8382c0db353d9d1ba6b7a9690d56aa2415258c.tar.xz |
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r-- | src/signs_gui.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 6debec117..6374a0717 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -33,11 +33,13 @@ static int CDECL SignNameSorter(const void *a, const void *b) const Sign *sign1 = *(const Sign**)b; char buf1[64]; - GetString(buf1, sign0->str, lastof(buf1)); + SetDParam(0, sign0->index); + GetString(buf1, STR_SIGN_NAME, lastof(buf1)); if (sign1 != _last_sign) { _last_sign = sign1; - GetString(_bufcache, sign1->str, lastof(_bufcache)); + SetDParam(0, sign1->index); + GetString(_bufcache, STR_SIGN_NAME, lastof(_bufcache)); } return strcmp(buf1, _bufcache); // sort by name @@ -175,7 +177,7 @@ enum QueryEditSignWidgets { static void UpdateSignEditWindow(Window *w, const Sign *si) { /* Display an empty string when the sign hasnt been edited yet */ - if (si->str != STR_280A_SIGN) { + if (si->name != NULL) { SetDParam(0, si->index); GetString(_edit_str_buf, STR_SIGN_NAME, lastof(_edit_str_buf)); } else { |