Changeset 659 for abuse/trunk/src/imlib/pmenu.cpp
- Timestamp:
- May 15, 2011, 6:22:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/pmenu.cpp
r655 r659 191 191 int cx1, cy1, cx2, cy2; 192 192 main_screen->GetClip(cx1, cy1, cx2, cy2); 193 if (parent-> x+w+x>=cx2)194 x=cx2-1-w-parent-> x;195 if (h+y+parent-> y>=cy2)196 { 197 if (parent-> y+parent->h+wm->font()->height()>=cy2)193 if (parent->m_pos.x + w + x >= cx2) 194 x=cx2-1-w-parent->m_pos.x; 195 if (h+y+parent->m_pos.y>=cy2) 196 { 197 if (parent->m_pos.y+parent->h+wm->font()->height()>=cy2) 198 198 y=-h; 199 199 else y=y-h+wm->font()->height()+5; … … 201 201 202 202 203 win=wm->new_window(parent-> x+x,parent->y+y,203 win=wm->new_window(parent->m_pos.x+x,parent->m_pos.y+y, 204 204 w - Jwindow::left_border() - Jwindow::right_border(), 205 205 h - Jwindow::top_border() - Jwindow::bottom_border(), … … 325 325 main_screen->GetClip(cx1, cy1, cx2, cy2); 326 326 327 x=win-> x;328 y=win-> y;327 x=win->m_pos.x; 328 y=win->m_pos.y; 329 329 330 330 int has_flags=0,dx=3; … … 353 353 } else return 1; 354 354 } else if (active!=-1) 355 return item_num(active)->handle_event(win,win-> x+dx,win->y+3+active*(th+1),w-6,0,ev);355 return item_num(active)->handle_event(win,win->m_pos.x+dx,win->m_pos.y+3+active*(th+1),w-6,0,ev); 356 356 else return 0; 357 357 … … 362 362 Event &ev) 363 363 { 364 x+=parent-> x;365 y+=parent-> y;364 x+=parent->m_pos.x; 365 y+=parent->m_pos.y; 366 366 if (ev.mouse_move.x>=x && ev.mouse_move.y>=y && ev.mouse_move.x<x+w && 367 367 ev.mouse_move.y<y+wm->font()->height()+2) … … 386 386 int cx1, cy1, cx2, cy2; 387 387 screen->GetClip(cx1, cy1, cx2, cy2); 388 mx-=bar-> x;389 my-=bar-> y;388 mx-=bar->m_pos.x; 389 my-=bar->m_pos.y; 390 390 if (mx<0 || my<0 || mx>=bar->m_surf->Size().x || my>=bar->m_surf->Size().y) return NULL; 391 391 else
Note: See TracChangeset
for help on using the changeset viewer.