Subversion Repositories Games.Chess Giants

Rev

Rev 131 | Rev 140 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 131 Rev 136
Line 1160... Line 1160...
1160
 
1160
 
1161
   float mousex_percent;
1161
   float mousex_percent;
1162
   float mousey_percent;
1162
   float mousey_percent;
1163
 
1163
 
1164
   // compute mouse coordinates in percents
1164
   // compute mouse coordinates in percents
1165
   mousex_percent = (float) (mouse_x * 100) / current_width;
1165
   mousex_percent = (float) mouse_x * 100.0f / current_width;
1166
   mousey_percent = (float) (mouse_y * 100) / current_height;
1166
   mousey_percent = (float) mouse_y * 100.0f / current_height;
1167
 
1167
 
1168
   return ((mousex_percent >= x_percent) && (mousex_percent <= x_percent + width_percent)
1168
   return ((mousex_percent >= x_percent) && (mousex_percent <= x_percent + width_percent)
1169
           && (mousey_percent >= y_percent) && (mousey_percent <= y_percent + height_percent));
1169
           && (mousey_percent >= y_percent) && (mousey_percent <= y_percent + height_percent));
1170
}
1170
}
1171
 
1171