close button works 😈

This commit is contained in:
Michael 2017-07-28 14:54:34 -04:00
parent bf62e016fd
commit 5c6d90ce3d

View file

@ -180,6 +180,19 @@ namespace ShiftOS.Frontend.Desktop
public WindowBorder()
{
Click += () =>
{
var cbtnloc = LoadedSkin.CloseButtonFromSide;
var realcloc = new Vector2(
(LoadedSkin.TitleButtonPosition == 1) ? cbtnloc.X : (Width - LoadedSkin.TitleLeftCornerWidth - LoadedSkin.TitleRightCornerWidth) - cbtnloc.X,
cbtnloc.Y
);
var cbtnsize = LoadedSkin.CloseButtonSize;
if(MouseX >= realcloc.X && MouseY >= realcloc.Y && MouseX <= realcloc.X + cbtnsize.Width && MouseY <= realcloc.Y + cbtnsize.Height)
{
AppearanceManager.Close(ParentWindow);
}
};
X = 720;
Y = 480;
}