From f7e39977de019d2bf20c4850fa3aa28deeb75854 Mon Sep 17 00:00:00 2001 From: dominik Date: Wed, 19 Jan 2005 20:55:23 +0000 Subject: (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. --- main_gui.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'main_gui.c') 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; -- cgit v1.2.3-54-g00ecf