* Checks if the mouse cursor is within any of the panel buttons and flag it if so. */
| 888 | * Checks if the mouse cursor is within any of the panel buttons and flag it if so. |
| 889 | */ |
| 890 | void DoPanBtn() |
| 891 | { |
| 892 | int i; |
| 893 | |
| 894 | for (i = 0; i < numpanbtns; i++) { |
| 895 | if (MouseX >= PanBtnPos[i][0] && MouseX <= PanBtnPos[i][0] + PanBtnPos[i][2]) { |
| 896 | if (MouseY >= PanBtnPos[i][1] && MouseY <= PanBtnPos[i][1] + PanBtnPos[i][3]) { |
| 897 | panbtn[i] = 1; |
| 898 | drawbtnflag = TRUE; |
| 899 | panbtndown = TRUE; |
| 900 | } |
| 901 | } |
| 902 | } |
| 903 | if (!spselflag && MouseX >= 565 + PANEL_LEFT && MouseX < 621 + PANEL_LEFT && MouseY >= 64 + PANEL_TOP && MouseY < 120 + PANEL_TOP) { |
| 904 | DoSpeedBook(); |
| 905 | gamemenu_off(); |
| 906 | } |
| 907 | } |
| 908 | |
| 909 | void control_set_button_down(int btn_id) |
| 910 | { |
no test coverage detected