Changeset 659 for abuse/trunk/src/gui.cpp
- Timestamp:
- May 15, 2011, 6:22:25 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/gui.cpp
r655 r659 27 27 ico_switch_button::ico_switch_button(int X, int Y, int ID, int start_on, ifield *butts, ifield *Next) 28 28 { 29 x=X; y=Y; id=ID;29 m_pos = vec2i(X, Y); id=ID; 30 30 next=Next; 31 31 blist=cur_but=butts; 32 32 act=0; 33 for (ifield *b=blist; b; b=b->next) { b->x=x; b->y=y; } 33 for (ifield *b=blist; b; b=b->next) 34 b->m_pos = m_pos; 34 35 while (cur_but && start_on--) cur_but=cur_but->next; 35 36 if (!cur_but) cur_but=blist; … … 51 52 if (Y2>y2) y2=Y2; 52 53 } 53 if (!blist) { x1=x2= x; y1=y2=y; }54 if (!blist) { x1=x2=m_pos.x; y1=y2=m_pos.y; } 54 55 } 55 56 … … 135 136 void ico_button::area(int &x1, int &y1, int &x2, int &y2) 136 137 { 137 x1= x; y1=y;138 x2= x+cache.img(u)->Size().x-1;139 y2= y+cache.img(u)->Size().y-1;138 x1=m_pos.x; y1=m_pos.y; 139 x2=m_pos.x+cache.img(u)->Size().x-1; 140 y2=m_pos.y+cache.img(u)->Size().y-1; 140 141 } 141 142 … … 150 151 151 152 up=1; 152 x=X; y=Y; id=ID;153 m_pos = vec2i(X, Y); id=ID; 153 154 u=Up; d=down; 154 155 ua=upa; da=downa;
Note: See TracChangeset
for help on using the changeset viewer.