================= UI_MouseEvent ================= */ JLFMOUSE CALLED EACH FRAME IN UI
| 4006 | */ |
| 4007 | //JLFMOUSE CALLED EACH FRAME IN UI |
| 4008 | void _UI_MouseEvent( int dx, int dy ) |
| 4009 | { |
| 4010 | // update mouse screen position |
| 4011 | uiInfo.uiDC.cursorx += dx; |
| 4012 | if (uiInfo.uiDC.cursorx < 0) |
| 4013 | { |
| 4014 | uiInfo.uiDC.cursorx = 0; |
| 4015 | } |
| 4016 | else if (uiInfo.uiDC.cursorx > SCREEN_WIDTH) |
| 4017 | { |
| 4018 | uiInfo.uiDC.cursorx = SCREEN_WIDTH; |
| 4019 | } |
| 4020 | |
| 4021 | uiInfo.uiDC.cursory += dy; |
| 4022 | if (uiInfo.uiDC.cursory < 0) |
| 4023 | { |
| 4024 | uiInfo.uiDC.cursory = 0; |
| 4025 | } |
| 4026 | else if (uiInfo.uiDC.cursory > SCREEN_HEIGHT) |
| 4027 | { |
| 4028 | uiInfo.uiDC.cursory = SCREEN_HEIGHT; |
| 4029 | } |
| 4030 | |
| 4031 | if (Menu_Count() > 0) |
| 4032 | { |
| 4033 | //menuDef_t *menu = Menu_GetFocused(); |
| 4034 | //Menu_HandleMouseMove(menu, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory); |
| 4035 | Display_MouseMove(NULL, uiInfo.uiDC.cursorx, uiInfo.uiDC.cursory); |
| 4036 | } |
| 4037 | |
| 4038 | } |
| 4039 | |
| 4040 | /* |
| 4041 | ================= |
no test coverage detected