Engine/lib/sdl/src/video/x11/SDL_x11messagebox.c
/* Return index of button if position x,y is contained therein. */
Return index of button if position x,y is contained therein.
Return index of button if position x y is contained therein .
static int
GetHitButtonIndex( SDL_MessageBoxDataX11 *data, int x, int y )
{
    int i;
    int numbuttons = data->numbuttons;
    SDL_MessageBoxButtonDataX11 *buttonpos = data->buttonpos;
    for ( i = 0; i < numbuttons; i++ ) {
        SDL_Rect *rect = &buttonpos[ i ].rect;
        if ( ( x >= rect->x ) &&
             ( x <= ( rect->x + rect->w ) ) &&
             ( y >= rect->y ) &&
             ( y <= ( rect->y + rect->h ) ) ) {
            return i;
        }
    }
    return -1;
}
static int GetHitButtonIndex ( SDL_MessageBoxDataX11 * data , int x , int y ) { int i ; int numbuttons = data -> numbuttons ; SDL_MessageBoxButtonDataX11 * buttonpos = data -> buttonpos ; for ( i = 0 ; i < numbuttons ; i ++ ) { SDL_Rect * rect = & buttonpos [ i ] . rect ; if ( ( x >= rect -> x ) && ( x <= ( rect -> x + rect -> w ) ) && ( y >= rect -> y ) && ( y <= ( rect -> y + rect -> h ) ) ) { return i ; } } return -1 ; }
Return index of button if position x,y is contained therein.
Return index of button if position x y is contained therein .