From b4277f918f43801cc656c7df2066b95a2bb103a7 Mon Sep 17 00:00:00 2001 From: lempamo Date: Mon, 31 Jul 2017 23:14:24 -0400 Subject: added fixed size windows --- TimeHACK.Engine/Template/WinClassic.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'TimeHACK.Engine/Template') diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs index ca55c59..ec80fcc 100644 --- a/TimeHACK.Engine/Template/WinClassic.cs +++ b/TimeHACK.Engine/Template/WinClassic.cs @@ -15,6 +15,7 @@ namespace TimeHACK.Engine.Template public Font fnt; + public bool resizable = true; public bool closeDisabled = false; public bool isActive = true; @@ -70,7 +71,7 @@ namespace TimeHACK.Engine.Template { if (e.Button == MouseButtons.Left) { - this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height); + if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height); } } @@ -78,15 +79,15 @@ namespace TimeHACK.Engine.Template { if (e.Button == MouseButtons.Left) { - this.Size = new Size(this.Size.Width + (this.Location.X - MousePosition.X), this.Size.Height); - this.Location = new Point(MousePosition.X, this.Location.Y); + if (resizable) this.Size = new Size(this.Size.Width + (this.Location.X - MousePosition.X), this.Size.Height); + if (resizable) this.Location = new Point(MousePosition.X, this.Location.Y); } } private void bottom_MouseMove(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { - this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y); + if (resizable) this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y); } } -- cgit v1.2.3