diff options
author | dominik <dominik@openttd.org> | 2005-01-19 20:55:23 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2005-01-19 20:55:23 +0000 |
commit | f7e39977de019d2bf20c4850fa3aa28deeb75854 (patch) | |
tree | 4721eddc93c76f7d2ab9c04a82bbb528732eeda1 /main_gui.c | |
parent | d419f9b2f07843341c38c5d78875685f82bbd691 (diff) | |
download | openttd-f7e39977de019d2bf20c4850fa3aa28deeb75854.tar.xz |
(svn r1571) Feature: Visually enhanced autorail placing
When using the autorail tool, the rail pieces which are going to be build are highlighted.
If a piece is shown in red, this indicates that the slope/rail combination is impossible. It does not tell you if the rail line construction might not be possible because of other obstacles, e.g. houses or water.
Diffstat (limited to 'main_gui.c')
-rw-r--r-- | main_gui.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/main_gui.c b/main_gui.c index 7fb3f0df4..b0428f690 100644 --- a/main_gui.c +++ b/main_gui.c @@ -111,7 +111,19 @@ void HandleOnEditText(WindowEvent *e) { } } -// this code is shared for the majority of the pushbuttons +/** + * This code is shared for the majority of the pushbuttons. + * Handles e.g. the pressing of a button (to build things), playing of click sound and sets certain parameters + * + * @param w Window which called the function + * @param widget ID of the widget (=button) that called this function + * @param cursor How should the cursor image change? E.g. cursor with depot image in it + * @param mode Tile highlighting mode, e.g. drawing a rectangle or a dot on the ground + * @param placeproc Procedure which will be called when someone clicks on the map + + * @return true if the button is clicked, false if it's unclicked + */ + bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc) { uint32 mask = 1 << widget; |