Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7226 → Rev 7227

/programs/cmm/lib/gui.h
346,8 → 346,30
return n;
}
 
//block with hover
struct block {
int x,y,w,h;
bool hovered();
void set_size();
};
 
:bool block::hovered() {
if ((mouse.x>x) && (mouse.y>y)
&& (mouse.y<y+h) && (mouse.x<x+w))
return true;
return false;
}
 
:void block::set_size(dword _x, _y, _w, _h)
{
x=_x;
y=_y;
w=_w;
h=_h;
}
 
 
 
 
 
#endif