aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/Template
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-31 23:14:24 -0400
committerlempamo <[email protected]>2017-07-31 23:14:24 -0400
commitb4277f918f43801cc656c7df2066b95a2bb103a7 (patch)
treeae6f1d0cec63d5f7079ffd0c631867dfc8b22702 /TimeHACK.Engine/Template
parent92fedc467a77c709b157a0ec1666bd902ad8d27e (diff)
downloadhistacom2-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.cs9
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);
}
}