diff options
| author | lempamo <[email protected]> | 2017-07-31 23:14:24 -0400 |
|---|---|---|
| committer | lempamo <[email protected]> | 2017-07-31 23:14:24 -0400 |
| commit | b4277f918f43801cc656c7df2066b95a2bb103a7 (patch) | |
| tree | ae6f1d0cec63d5f7079ffd0c631867dfc8b22702 /TimeHACK.Engine/Template | |
| parent | 92fedc467a77c709b157a0ec1666bd902ad8d27e (diff) | |
| download | histacom2-b4277f918f43801cc656c7df2066b95a2bb103a7.tar.gz histacom2-b4277f918f43801cc656c7df2066b95a2bb103a7.tar.bz2 histacom2-b4277f918f43801cc656c7df2066b95a2bb103a7.zip | |
added fixed size windows
Diffstat (limited to 'TimeHACK.Engine/Template')
| -rw-r--r-- | TimeHACK.Engine/Template/WinClassic.cs | 9 |
1 files changed, 5 insertions, 4 deletions
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); } } |
