diff options
author | skidd13 <skidd13@openttd.org> | 2007-11-24 10:38:43 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2007-11-24 10:38:43 +0000 |
commit | bf959f926ff6dee99a15d91652256169a6484042 (patch) | |
tree | 9c936ecbb5e2e4367788a18a55cbf52eb6eb6cc6 /src/industry_gui.cpp | |
parent | 64246a2775c56c99746727a02af509fe8d75d53f (diff) | |
download | openttd-bf959f926ff6dee99a15d91652256169a6484042.tar.xz |
(svn r11510) -Codechange: merge the IS_*INSIDE* functions and rename them fitting to the naming style
Diffstat (limited to 'src/industry_gui.cpp')
-rw-r--r-- | src/industry_gui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/industry_gui.cpp b/src/industry_gui.cpp index 171577c60..127d63090 100644 --- a/src/industry_gui.cpp +++ b/src/industry_gui.cpp @@ -539,8 +539,8 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) if (!IsProductionAlterable(i)) return; x = e->we.click.pt.x; line = (e->we.click.pt.y - WP(w, indview_d).production_offset_y) / 10; - if (e->we.click.pt.y >= WP(w, indview_d).production_offset_y && IS_INT_INSIDE(line, 0, 2) && i->produced_cargo[line] != CT_INVALID) { - if (IS_INT_INSIDE(x, 5, 25) ) { + if (e->we.click.pt.y >= WP(w, indview_d).production_offset_y && IsInsideMM(line, 0, 2) && i->produced_cargo[line] != CT_INVALID) { + if (IsInsideMM(x, 5, 25) ) { /* Clicked buttons, decrease or increase production */ if (x < 15) { if (isProductionMinimum(i, line)) return; @@ -557,7 +557,7 @@ static void IndustryViewWndProc(Window *w, WindowEvent *e) w->flags4 |= 5 << WF_TIMEOUT_SHL; WP(w, indview_d).clicked_line = line + 1; WP(w, indview_d).clicked_button = (x < 15 ? 1 : 2); - } else if (IS_INT_INSIDE(x, 34, 160)) { + } else if (IsInsideMM(x, 34, 160)) { /* clicked the text */ WP(w, indview_d).editbox_line = line; SetDParam(0, i->production_rate[line] * 8); @@ -844,7 +844,7 @@ static void IndustryDirectoryWndProc(Window *w, WindowEvent *e) int y = (e->we.click.pt.y - 28) / 10; uint16 p; - if (!IS_INT_INSIDE(y, 0, w->vscroll.cap)) return; + if (!IsInsideMM(y, 0, w->vscroll.cap)) return; p = y + w->vscroll.pos; if (p < _num_industry_sort) { ScrollMainWindowToTile(_industry_sort[p]->xy); |