Changeset 11613 for lang/d

Show
Ignore:
Timestamp:
05/15/08 02:12:40 (6 months ago)
Author:
omega
Message:

リサイズ対応の修正

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/d/koke/trunk/clickable.d

    r11612 r11613  
    235235         
    236236        bool onMouse(){ 
    237                 if(position.x <= Hell_getMouseX() && position.x + size.x >= Hell_getMouseX() 
    238                         && position.y <= Hell_getMouseY() && position.y + size.y >= Hell_getMouseY())  
     237                int x = cast(int)position.x; 
     238                int y = cast(int)position.y; 
     239                if( x < 0 ) x += hell2.getScreenWidth(); 
     240                if( y < 0 ) y += hell2.getScreenHeight(); 
     241                 
     242                if(x <= Hell_getMouseX() && x + size.x >= Hell_getMouseX() 
     243                        && y <= Hell_getMouseY() && y + size.y >= Hell_getMouseY())  
    239244                { 
    240245                        return true;