equal
deleted
inserted
replaced
109 } |
109 } |
110 #endif /* ENABLE_NETWORK */ |
110 #endif /* ENABLE_NETWORK */ |
111 } |
111 } |
112 } |
112 } |
113 |
113 |
114 // this code is shared for the majority of the pushbuttons |
114 /** |
|
115 * This code is shared for the majority of the pushbuttons. |
|
116 * Handles e.g. the pressing of a button (to build things), playing of click sound and sets certain parameters |
|
117 * |
|
118 * @param w Window which called the function |
|
119 * @param widget ID of the widget (=button) that called this function |
|
120 * @param cursor How should the cursor image change? E.g. cursor with depot image in it |
|
121 * @param mode Tile highlighting mode, e.g. drawing a rectangle or a dot on the ground |
|
122 * @param placeproc Procedure which will be called when someone clicks on the map |
|
123 |
|
124 * @return true if the button is clicked, false if it's unclicked |
|
125 */ |
|
126 |
115 bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc) |
127 bool HandlePlacePushButton(Window *w, int widget, uint32 cursor, int mode, PlaceProc *placeproc) |
116 { |
128 { |
117 uint32 mask = 1 << widget; |
129 uint32 mask = 1 << widget; |
118 |
130 |
119 if (w->disabled_state & mask) |
131 if (w->disabled_state & mask) |