still working on adding frames to config
This commit is contained in:
parent
3fa74e8f9e
commit
0591b6ca6e
10 changed files with 199 additions and 53 deletions
|
|
@ -63,6 +63,8 @@ void ARC_Mouse_Update(ARC_Mouse *mouse){
|
|||
*mouse->scroll = mouse->event->wheel.y;
|
||||
}
|
||||
|
||||
uint32_t buttons = SDL_GetMouseState(&(mouse->coords->x), &(mouse->coords->y));
|
||||
|
||||
if(mouse->event->type != SDL_MOUSEBUTTONDOWN && mouse->event->type != SDL_MOUSEBUTTONUP){
|
||||
if(!*mouse->buttonsReleased){
|
||||
return;
|
||||
|
|
@ -82,7 +84,6 @@ void ARC_Mouse_Update(ARC_Mouse *mouse){
|
|||
return;
|
||||
}
|
||||
|
||||
uint32_t buttons = SDL_GetMouseState(&(mouse->coords->x), &(mouse->coords->y));
|
||||
ARC_Mouse_UpdateButton(mouse, ARC_MOUSE_LEFT , &buttons, SDL_BUTTON_LMASK );
|
||||
ARC_Mouse_UpdateButton(mouse, ARC_MOUSE_MIDDLE, &buttons, SDL_BUTTON_MMASK );
|
||||
ARC_Mouse_UpdateButton(mouse, ARC_MOUSE_RIGHT , &buttons, SDL_BUTTON_RMASK );
|
||||
|
|
@ -90,8 +91,8 @@ void ARC_Mouse_Update(ARC_Mouse *mouse){
|
|||
ARC_Mouse_UpdateButton(mouse, ARC_MOUSE_X2 , &buttons, SDL_BUTTON_X2MASK);
|
||||
}
|
||||
|
||||
ARC_Point ARC_Mouse_GetCoords(ARC_Mouse *mouse){
|
||||
return *mouse->coords;
|
||||
ARC_Point *ARC_Mouse_GetCoords(ARC_Mouse *mouse){
|
||||
return mouse->coords;
|
||||
}
|
||||
|
||||
ARC_MouseState ARC_Mouse_GetState(ARC_Mouse *mouse, ARC_MouseButton button){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue