diff options
author | smatz <smatz@openttd.org> | 2008-06-12 22:29:42 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-12 22:29:42 +0000 |
commit | 421a040e8919c95a431253b797a48c8f12b37343 (patch) | |
tree | 45b8578044e599868684d7df743926f0f72d7a91 /src/signs_gui.cpp | |
parent | 79ad51867aa9551a8e9a85bdc3eff5ff760837b2 (diff) | |
download | openttd-421a040e8919c95a431253b797a48c8f12b37343.tar.xz |
(svn r13501) -Feature(tte): ctrl+click on sign you own to remove it (Osai, planetmaker)
Diffstat (limited to 'src/signs_gui.cpp')
-rw-r--r-- | src/signs_gui.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/signs_gui.cpp b/src/signs_gui.cpp index 8a9aae241..7a0e9c44b 100644 --- a/src/signs_gui.cpp +++ b/src/signs_gui.cpp @@ -8,6 +8,7 @@ #include "textbuf_gui.h" #include "window_gui.h" #include "player_gui.h" +#include "player_func.h" #include "signs_base.h" #include "signs_func.h" #include "debug.h" @@ -301,6 +302,15 @@ static const WindowDesc _query_sign_edit_desc = { _query_sign_edit_widgets, }; +void HandleClickOnSign(const Sign *si) +{ + if (_ctrl_pressed && si->owner == _local_player) { + RenameSign(si->index, ""); + return; + } + ShowRenameSignWindow(si); +} + void ShowRenameSignWindow(const Sign *si) { /* Delete all other edit windows and the save window */ |