summaryrefslogtreecommitdiff
path: root/order_gui.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-10-03 20:16:20 +0000
committerbelugas <belugas@openttd.org>2006-10-03 20:16:20 +0000
commit17eb65050b29b84e1a5b452d302c1a40931764cb (patch)
tree22b881cad1fc846e1fe14182d37c8f6e6261f820 /order_gui.c
parentbdaab39e648891f3e86a290ade9b02fe4d215f45 (diff)
downloadopenttd-17eb65050b29b84e1a5b452d302c1a40931764cb.tar.xz
(svn r6631) -Codechange: Use accessors for click_state.
Another step toward merging XTDwidget. The only two files not converted (window.h and widget.c) will be done at the very last commit)
Diffstat (limited to 'order_gui.c')
-rw-r--r--order_gui.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/order_gui.c b/order_gui.c
index bce259121..532005da1 100644
--- a/order_gui.c
+++ b/order_gui.c
@@ -349,8 +349,8 @@ static void OrdersPlaceObj(const Vehicle *v, TileIndex tile, Window *w)
static void OrderClick_Goto(Window *w, const Vehicle *v)
{
InvalidateWidget(w, 7);
- TOGGLEBIT(w->click_state, 7);
- if (HASBIT(w->click_state, 7)) {
+ ToggleWidgetLoweredState(w, 7);
+ if (IsWindowWidgetLowered(w, 7)) {
_place_clicked_vehicle = NULL;
SetObjectToPlaceWnd(ANIMCURSOR_PICKSTATION, 1, w);
} else {
@@ -532,7 +532,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
} break;
case WE_ABORT_PLACE_OBJ: {
- CLRBIT(w->click_state, 7);
+ RaiseWindowWidget(w, 7);
InvalidateWidget(w, 7);
} break;
@@ -547,7 +547,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
* the order is copied to the last open window instead of the
* one where GOTO is enalbed
*/
- if (v != NULL && HASBIT(w->click_state, 7)) {
+ if (v != NULL && IsWindowWidgetLowered(w, 7)) {
_place_clicked_vehicle = NULL;
HandleOrderVehClick(GetVehicle(w->window_number), v, w);
}