Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
UltimateZoneBuilder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
UltimateZoneBuilder
Commits
0590216c
Commit
0590216c
authored
4 years ago
by
biwa
Browse files
Options
Downloads
Patches
Plain Diff
Slope Arch Form: added option to invert the arch
parent
95dd6e28
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/Plugins/BuilderModes/Interface/SlopeArchForm.Designer.cs
+17
-4
17 additions, 4 deletions
.../Plugins/BuilderModes/Interface/SlopeArchForm.Designer.cs
Source/Plugins/BuilderModes/Interface/SlopeArchForm.cs
+33
-0
33 additions, 0 deletions
Source/Plugins/BuilderModes/Interface/SlopeArchForm.cs
with
50 additions
and
4 deletions
Source/Plugins/BuilderModes/Interface/SlopeArchForm.Designer.cs
+
17
−
4
View file @
0590216c
...
...
@@ -45,6 +45,7 @@
this
.
quartercircleleft
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
lockoffset
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
invert
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -112,7 +113,7 @@
// cancel
//
this
.
cancel
.
DialogResult
=
System
.
Windows
.
Forms
.
DialogResult
.
Cancel
;
this
.
cancel
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
1
67
);
this
.
cancel
.
Location
=
new
System
.
Drawing
.
Point
(
147
,
1
94
);
this
.
cancel
.
Name
=
"cancel"
;
this
.
cancel
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
24
);
this
.
cancel
.
TabIndex
=
22
;
...
...
@@ -122,7 +123,7 @@
// accept
//
this
.
accept
.
DialogResult
=
System
.
Windows
.
Forms
.
DialogResult
.
OK
;
this
.
accept
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
1
67
);
this
.
accept
.
Location
=
new
System
.
Drawing
.
Point
(
53
,
1
94
);
this
.
accept
.
Name
=
"accept"
;
this
.
accept
.
Size
=
new
System
.
Drawing
.
Size
(
88
,
24
);
this
.
accept
.
TabIndex
=
23
;
...
...
@@ -258,21 +259,32 @@
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
invert
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
up
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
down
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
156
,
65
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
6
9
);
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
9
6
);
this
.
groupBox1
.
TabIndex
=
35
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"Direction"
;
//
// invert
//
this
.
invert
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
65
);
this
.
invert
.
Name
=
"invert"
;
this
.
invert
.
Size
=
new
System
.
Drawing
.
Size
(
96
,
23
);
this
.
invert
.
TabIndex
=
36
;
this
.
invert
.
Text
=
"Invert"
;
this
.
invert
.
UseVisualStyleBackColor
=
true
;
this
.
invert
.
Click
+=
new
System
.
EventHandler
(
this
.
invert_Click
);
//
// SlopeArchForm
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
13F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
CancelButton
=
this
.
cancel
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
286
,
2
03
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
286
,
2
28
);
this
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
Controls
.
Add
(
this
.
lockoffset
);
this
.
Controls
.
Add
(
this
.
label4
);
...
...
@@ -321,5 +333,6 @@
private
System
.
Windows
.
Forms
.
Label
label4
;
private
System
.
Windows
.
Forms
.
CheckBox
lockoffset
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
Button
invert
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Source/Plugins/BuilderModes/Interface/SlopeArchForm.cs
+
33
−
0
View file @
0590216c
...
...
@@ -289,6 +289,39 @@ namespace CodeImp.DoomBuilder.BuilderModes
offset
.
Enabled
=
!
offset
.
Enabled
;
}
/// <summary>
/// Inverts the current slope
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
invert_Click
(
object
sender
,
EventArgs
e
)
{
// Flip up/down direction
if
(
up
.
Checked
)
{
up
.
Checked
=
false
;
down
.
Checked
=
true
;
}
else
{
up
.
Checked
=
true
;
down
.
Checked
=
false
;
}
double
t
=
theta
.
GetResultFloat
(
originaltheta
);
double
o
=
offset
.
GetResultFloat
(
originaloffset
);
// Subtract theta from the offset, if the result is greater than 0, otherwise add theta
if
(
o
-
t
<
0.0
)
o
=
o
+
t
;
else
o
=
o
-
t
;
offset
.
Text
=
o
.
ToString
();
UpdateArch
();
}
#
endregion
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment