close button works 😈
This commit is contained in:
parent
bf62e016fd
commit
5c6d90ce3d
1 changed files with 13 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Reference in a new issue