CMM: general refactoring

git-svn-id: svn://kolibrios.org@7227 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
2018-04-15 22:44:36 +00:00
parent 83b61f94d2
commit 1392a1c519
28 changed files with 194 additions and 235 deletions

View File

@@ -346,6 +346,28 @@ TODO: scroll
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;
}