mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-26 05:40:53 +00:00
working on the brightness mode
This commit is contained in:
parent
3117725c15
commit
1a6641f46b
12 changed files with 372 additions and 48 deletions
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
- Make sector gradient features
|
- Make sector gradient features
|
||||||
|
|
||||||
|
- Categories for control keys!
|
||||||
|
|
||||||
- Make error checking feature
|
- Make error checking feature
|
||||||
|
|
||||||
- Make quick sector draw (square/circle) mode
|
- Make quick sector draw (square/circle) mode
|
||||||
|
|
BIN
Resources/Icons/BrightnessGradient.png
Normal file
BIN
Resources/Icons/BrightnessGradient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 420 B |
|
@ -155,6 +155,9 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="Resources\treeview.png" />
|
<None Include="Resources\treeview.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<None Include="Resources\BrightnessGradient.png" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
@ -47,6 +47,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
public sealed class BrightnessMode : BaseClassicMode
|
public sealed class BrightnessMode : BaseClassicMode
|
||||||
{
|
{
|
||||||
|
#region ================== Enums
|
||||||
|
|
||||||
|
private enum ModifyMode : int
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
Adjusting
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region ================== Constants
|
#region ================== Constants
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -59,9 +69,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Interface
|
// Interface
|
||||||
private bool editpressed;
|
private bool editpressed;
|
||||||
|
|
||||||
|
// The methods GetSelected* and MarkSelected* on the MapSet do not
|
||||||
|
// retain the order in which items were selected.
|
||||||
|
// This list keeps in order while sectors are selected/deselected.
|
||||||
|
protected List<Sector> orderedselection;
|
||||||
|
|
||||||
// Labels
|
// Labels
|
||||||
private Dictionary<Sector, TextLabel[]> labels;
|
private Dictionary<Sector, TextLabel[]> labels;
|
||||||
|
|
||||||
|
// Modifying
|
||||||
|
private ModifyMode mode;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Properties
|
#region ================== Properties
|
||||||
|
@ -73,6 +91,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Constructor
|
// Constructor
|
||||||
public BrightnessMode()
|
public BrightnessMode()
|
||||||
{
|
{
|
||||||
|
// Make ordered selection list
|
||||||
|
orderedselection = new List<Sector>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disposer
|
// Disposer
|
||||||
|
@ -140,23 +160,40 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
// This highlights a new item
|
// This highlights a new item
|
||||||
protected void Highlight(Sector s)
|
protected void Highlight(Sector s)
|
||||||
|
{
|
||||||
|
// Highlight actually changes?
|
||||||
|
if(s != highlighted)
|
||||||
{
|
{
|
||||||
// Update display
|
// Update display
|
||||||
if(renderer.StartPlotter(false))
|
if(renderer.StartPlotter(false))
|
||||||
{
|
{
|
||||||
// Undraw previous highlight
|
|
||||||
if((highlighted != null) && !highlighted.IsDisposed)
|
if((highlighted != null) && !highlighted.IsDisposed)
|
||||||
|
{
|
||||||
|
// Undraw previous highlight
|
||||||
renderer.PlotSector(highlighted);
|
renderer.PlotSector(highlighted);
|
||||||
|
|
||||||
|
// Change label color
|
||||||
|
TextLabel[] labelarray = labels[highlighted];
|
||||||
|
foreach(TextLabel l in labelarray) l.Color = General.Colors.Selection;
|
||||||
|
}
|
||||||
|
|
||||||
// Set new highlight
|
// Set new highlight
|
||||||
highlighted = s;
|
highlighted = s;
|
||||||
|
|
||||||
// Render highlighted item
|
|
||||||
if((highlighted != null) && !highlighted.IsDisposed)
|
if((highlighted != null) && !highlighted.IsDisposed)
|
||||||
|
{
|
||||||
|
// Render highlighted item
|
||||||
renderer.PlotSector(highlighted, General.Colors.Highlight);
|
renderer.PlotSector(highlighted, General.Colors.Highlight);
|
||||||
|
|
||||||
// Done
|
// Change label color
|
||||||
|
TextLabel[] labelarray = labels[highlighted];
|
||||||
|
foreach(TextLabel l in labelarray) l.Color = General.Colors.Highlight;
|
||||||
|
}
|
||||||
|
|
||||||
renderer.Finish();
|
renderer.Finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
UpdateOverlay();
|
||||||
renderer.Present();
|
renderer.Present();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,6 +204,66 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
General.Interface.HideInfo();
|
General.Interface.HideInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This selectes or deselects a sector
|
||||||
|
protected void SelectSector(Sector s, bool selectstate, bool update)
|
||||||
|
{
|
||||||
|
bool selectionchanged = false;
|
||||||
|
|
||||||
|
if(!s.IsDisposed)
|
||||||
|
{
|
||||||
|
// Select the sector?
|
||||||
|
if(selectstate && !s.Selected)
|
||||||
|
{
|
||||||
|
orderedselection.Add(s);
|
||||||
|
s.Selected = true;
|
||||||
|
selectionchanged = true;
|
||||||
|
|
||||||
|
// Setup labels
|
||||||
|
TextLabel[] labelarray = labels[s];
|
||||||
|
foreach(TextLabel l in labelarray)
|
||||||
|
{
|
||||||
|
l.Text = orderedselection.Count.ToString();
|
||||||
|
l.Color = General.Colors.Selection;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Deselect the sector?
|
||||||
|
else if(!selectstate && s.Selected)
|
||||||
|
{
|
||||||
|
orderedselection.Remove(s);
|
||||||
|
s.Selected = false;
|
||||||
|
selectionchanged = true;
|
||||||
|
|
||||||
|
// Clear labels
|
||||||
|
TextLabel[] labelarray = labels[s];
|
||||||
|
foreach(TextLabel l in labelarray) l.Text = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Selection changed?
|
||||||
|
if(selectionchanged)
|
||||||
|
{
|
||||||
|
// Make update lines selection
|
||||||
|
foreach(Sidedef sd in s.Sidedefs)
|
||||||
|
{
|
||||||
|
bool front, back;
|
||||||
|
if(sd.Line.Front != null) front = sd.Line.Front.Sector.Selected; else front = false;
|
||||||
|
if(sd.Line.Back != null) back = sd.Line.Back.Sector.Selected; else back = false;
|
||||||
|
sd.Line.Selected = front | back;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(update)
|
||||||
|
{
|
||||||
|
UpdateOverlay();
|
||||||
|
renderer.Present();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Remove from list
|
||||||
|
orderedselection.Remove(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ================== Events
|
#region ================== Events
|
||||||
|
@ -176,9 +273,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
base.OnEngage();
|
base.OnEngage();
|
||||||
|
|
||||||
// No selection
|
// Add toolbar button
|
||||||
General.Map.Map.ClearAllMarks(false);
|
General.Interface.AddButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);
|
||||||
General.Map.Map.ClearAllSelected();
|
|
||||||
|
|
||||||
// Make custom presentation
|
// Make custom presentation
|
||||||
CustomPresentation p = new CustomPresentation();
|
CustomPresentation p = new CustomPresentation();
|
||||||
|
@ -205,10 +301,62 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
labelarray[i].AlignY = TextAlignmentY.Middle;
|
labelarray[i].AlignY = TextAlignmentY.Middle;
|
||||||
labelarray[i].Scale = 14f;
|
labelarray[i].Scale = 14f;
|
||||||
labelarray[i].Color = General.Colors.Highlight;
|
labelarray[i].Color = General.Colors.Highlight;
|
||||||
labelarray[i].Backcolor = General.Colors.Background;
|
labelarray[i].Backcolor = General.Colors.Background.WithAlpha(80);
|
||||||
}
|
}
|
||||||
labels.Add(s, labelarray);
|
labels.Add(s, labelarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Convert geometry selection to sectors only
|
||||||
|
General.Map.Map.ClearAllMarks(false);
|
||||||
|
General.Map.Map.MarkSelectedVertices(true, true);
|
||||||
|
ICollection<Linedef> lines = General.Map.Map.LinedefsFromMarkedVertices(false, true, false);
|
||||||
|
foreach(Linedef l in lines) l.Selected = true;
|
||||||
|
General.Map.Map.ClearMarkedSectors(true);
|
||||||
|
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||||
|
{
|
||||||
|
if(!l.Selected)
|
||||||
|
{
|
||||||
|
if(l.Front != null) l.Front.Sector.Marked = false;
|
||||||
|
if(l.Back != null) l.Back.Sector.Marked = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
General.Map.Map.ClearAllSelected();
|
||||||
|
foreach(Sector s in General.Map.Map.Sectors)
|
||||||
|
{
|
||||||
|
if(s.Marked)
|
||||||
|
{
|
||||||
|
s.Selected = true;
|
||||||
|
foreach(Sidedef sd in s.Sidedefs) sd.Line.Selected = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fill the list with selected sectors (these are not in order, but we have no other choice)
|
||||||
|
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
|
||||||
|
General.Map.Map.ClearSelectedSectors();
|
||||||
|
foreach(Sector s in selectedsectors) SelectSector(s, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// When disengaged
|
||||||
|
public override void OnDisengage()
|
||||||
|
{
|
||||||
|
base.OnDisengage();
|
||||||
|
|
||||||
|
// Remove toolbar button
|
||||||
|
General.Interface.RemoveButton(BuilderPlug.Me.MenusForm.MakeGradientBrightness);
|
||||||
|
|
||||||
|
// Going to EditSelectionMode?
|
||||||
|
if(General.Map.NewMode is EditSelectionMode)
|
||||||
|
{
|
||||||
|
// No selection made? But we have a highlight!
|
||||||
|
if((General.Map.Map.GetSelectedSectors(true).Count == 0) && (highlighted != null))
|
||||||
|
{
|
||||||
|
// Make the highlight the selection
|
||||||
|
SelectSector(highlighted, true, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hide highlight info
|
||||||
|
General.Interface.HideInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This redraws the display
|
// This redraws the display
|
||||||
|
@ -292,22 +440,140 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
// Selecting with mouse
|
// Selecting with mouse
|
||||||
protected override void OnSelect()
|
protected override void OnSelect()
|
||||||
{
|
{
|
||||||
base.OnSelect();
|
// Item highlighted?
|
||||||
|
|
||||||
// Sector highlighted?
|
|
||||||
if((highlighted != null) && !highlighted.IsDisposed)
|
if((highlighted != null) && !highlighted.IsDisposed)
|
||||||
{
|
{
|
||||||
// Show index on label
|
// Flip selection
|
||||||
for(int i = 0; i < highlighted.Triangles.IslandVertices.Count; i++)
|
SelectSector(highlighted, !highlighted.Selected, true);
|
||||||
|
|
||||||
|
// Update display
|
||||||
|
if(renderer.StartPlotter(false))
|
||||||
{
|
{
|
||||||
labels[highlighted][i].Text = highlighted.Index.ToString();
|
// Redraw highlight to show selection
|
||||||
|
renderer.PlotSector(highlighted);
|
||||||
|
renderer.Finish();
|
||||||
|
renderer.Present();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Start making a selection
|
||||||
|
StartMultiSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base.OnSelect();
|
||||||
|
}
|
||||||
|
|
||||||
|
// End selection
|
||||||
|
protected override void OnEndSelect()
|
||||||
|
{
|
||||||
|
// Not stopping from multiselection?
|
||||||
|
if(!selecting)
|
||||||
|
{
|
||||||
|
// Item highlighted?
|
||||||
|
if((highlighted != null) && !highlighted.IsDisposed)
|
||||||
|
{
|
||||||
|
// Update display
|
||||||
|
if(renderer.StartPlotter(false))
|
||||||
|
{
|
||||||
|
// Render highlighted item
|
||||||
|
renderer.PlotSector(highlighted, General.Colors.Highlight);
|
||||||
|
renderer.Finish();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update overlay
|
||||||
|
TextLabel[] labelarray = labels[highlighted];
|
||||||
|
foreach(TextLabel l in labelarray) l.Color = General.Colors.Highlight;
|
||||||
UpdateOverlay();
|
UpdateOverlay();
|
||||||
renderer.Present();
|
renderer.Present();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
base.OnEndSelect();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is called wheh selection ends
|
||||||
|
protected override void OnEndMultiSelection()
|
||||||
|
{
|
||||||
|
// Go for all lines
|
||||||
|
foreach(Linedef l in General.Map.Map.Linedefs)
|
||||||
|
{
|
||||||
|
l.Selected = ((l.Start.Position.x >= selectionrect.Left) &&
|
||||||
|
(l.Start.Position.y >= selectionrect.Top) &&
|
||||||
|
(l.Start.Position.x <= selectionrect.Right) &&
|
||||||
|
(l.Start.Position.y <= selectionrect.Bottom) &&
|
||||||
|
(l.End.Position.x >= selectionrect.Left) &&
|
||||||
|
(l.End.Position.y >= selectionrect.Top) &&
|
||||||
|
(l.End.Position.x <= selectionrect.Right) &&
|
||||||
|
(l.End.Position.y <= selectionrect.Bottom));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Go for all sectors
|
||||||
|
foreach(Sector s in General.Map.Map.Sectors)
|
||||||
|
{
|
||||||
|
// Go for all sidedefs
|
||||||
|
bool allselected = true;
|
||||||
|
foreach(Sidedef sd in s.Sidedefs)
|
||||||
|
{
|
||||||
|
if(!sd.Line.Selected)
|
||||||
|
{
|
||||||
|
allselected = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sector completely selected?
|
||||||
|
SelectSector(s, allselected, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make sure all linedefs reflect selected sectors
|
||||||
|
foreach(Sector s in General.Map.Map.Sectors)
|
||||||
|
SelectSector(s, s.Selected, false);
|
||||||
|
|
||||||
|
base.OnEndMultiSelection();
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
// This is called when the selection is updated
|
||||||
|
protected override void OnUpdateMultiSelection()
|
||||||
|
{
|
||||||
|
base.OnUpdateMultiSelection();
|
||||||
|
|
||||||
|
// Render selection
|
||||||
|
UpdateOverlay();
|
||||||
|
if(renderer.StartOverlay(false))
|
||||||
|
{
|
||||||
|
RenderMultiSelection();
|
||||||
|
renderer.Finish();
|
||||||
|
renderer.Present();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region ================== Actions
|
||||||
|
|
||||||
|
[BeginAction("gradientbrightness")]
|
||||||
|
public void MakeGradientBrightness()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// This clears the selection
|
||||||
|
[BeginAction("clearselection", BaseAction = true)]
|
||||||
|
public void ClearSelection()
|
||||||
|
{
|
||||||
|
// Clear selection
|
||||||
|
General.Map.Map.ClearAllSelected();
|
||||||
|
orderedselection.Clear();
|
||||||
|
|
||||||
|
// Clear labels
|
||||||
|
foreach(TextLabel[] labelarray in labels.Values)
|
||||||
|
foreach(TextLabel l in labelarray) l.Text = "";
|
||||||
|
|
||||||
|
// Redraw
|
||||||
|
General.Interface.RedrawDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,10 +77,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
// Make ordered selection list
|
// Make ordered selection list
|
||||||
orderedselection = new List<Sector>();
|
orderedselection = new List<Sector>();
|
||||||
|
|
||||||
// Fill the list with selected sectors (these are not in order, but we have no other choice)
|
|
||||||
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
|
|
||||||
foreach(Sector s in selectedsectors) orderedselection.Add(s);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disposer
|
// Disposer
|
||||||
|
@ -286,6 +282,10 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
foreach(Sidedef sd in s.Sidedefs) sd.Line.Selected = true;
|
foreach(Sidedef sd in s.Sidedefs) sd.Line.Selected = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Fill the list with selected sectors (these are not in order, but we have no other choice)
|
||||||
|
ICollection<Sector> selectedsectors = General.Map.Map.GetSelectedSectors(true);
|
||||||
|
foreach(Sector s in selectedsectors) orderedselection.Add(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode disengages
|
// Mode disengages
|
||||||
|
@ -785,6 +785,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
{
|
{
|
||||||
// Clear selection
|
// Clear selection
|
||||||
General.Map.Map.ClearAllSelected();
|
General.Map.Map.ClearAllSelected();
|
||||||
|
orderedselection.Clear();
|
||||||
|
|
||||||
// Redraw
|
// Redraw
|
||||||
General.Interface.RedrawDisplay();
|
General.Interface.RedrawDisplay();
|
||||||
|
|
47
Source/BuilderModes/Interface/MenusForm.Designer.cs
generated
47
Source/BuilderModes/Interface/MenusForm.Designer.cs
generated
|
@ -43,8 +43,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
this.thingsmenu = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.rotatethingscwitem = new System.Windows.Forms.ToolStripMenuItem();
|
this.rotatethingscwitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.rotatethingsccwitem = new System.Windows.Forms.ToolStripMenuItem();
|
this.rotatethingsccwitem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.toolstrip = new System.Windows.Forms.ToolStrip();
|
this.globalstrip = new System.Windows.Forms.ToolStrip();
|
||||||
|
this.manualstrip = new System.Windows.Forms.ToolStrip();
|
||||||
|
this.buttonbrightnessgradient = new System.Windows.Forms.ToolStripButton();
|
||||||
this.menustrip.SuspendLayout();
|
this.menustrip.SuspendLayout();
|
||||||
|
this.manualstrip.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// menustrip
|
// menustrip
|
||||||
|
@ -168,19 +171,41 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.rotatethingsccwitem.Size = new System.Drawing.Size(204, 22);
|
this.rotatethingsccwitem.Size = new System.Drawing.Size(204, 22);
|
||||||
this.rotatethingsccwitem.Text = "Rotate Counterclockwise";
|
this.rotatethingsccwitem.Text = "Rotate Counterclockwise";
|
||||||
//
|
//
|
||||||
// toolstrip
|
// globalstrip
|
||||||
//
|
//
|
||||||
this.toolstrip.Location = new System.Drawing.Point(0, 24);
|
this.globalstrip.Location = new System.Drawing.Point(0, 24);
|
||||||
this.toolstrip.Name = "toolstrip";
|
this.globalstrip.Name = "globalstrip";
|
||||||
this.toolstrip.Size = new System.Drawing.Size(423, 25);
|
this.globalstrip.Size = new System.Drawing.Size(423, 25);
|
||||||
this.toolstrip.TabIndex = 1;
|
this.globalstrip.TabIndex = 1;
|
||||||
this.toolstrip.Text = "toolstrip";
|
this.globalstrip.Text = "toolstrip";
|
||||||
|
//
|
||||||
|
// manualstrip
|
||||||
|
//
|
||||||
|
this.manualstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.buttonbrightnessgradient});
|
||||||
|
this.manualstrip.Location = new System.Drawing.Point(0, 49);
|
||||||
|
this.manualstrip.Name = "manualstrip";
|
||||||
|
this.manualstrip.Size = new System.Drawing.Size(423, 25);
|
||||||
|
this.manualstrip.TabIndex = 2;
|
||||||
|
this.manualstrip.Text = "toolStrip1";
|
||||||
|
//
|
||||||
|
// buttonbrightnessgradient
|
||||||
|
//
|
||||||
|
this.buttonbrightnessgradient.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.buttonbrightnessgradient.Image = global::CodeImp.DoomBuilder.BuilderModes.Properties.Resources.BrightnessGradient;
|
||||||
|
this.buttonbrightnessgradient.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
|
||||||
|
this.buttonbrightnessgradient.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.buttonbrightnessgradient.Name = "buttonbrightnessgradient";
|
||||||
|
this.buttonbrightnessgradient.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.buttonbrightnessgradient.Tag = "gradientbrightness";
|
||||||
|
this.buttonbrightnessgradient.Text = "Make Brightness Gradient";
|
||||||
//
|
//
|
||||||
// MenusForm
|
// MenusForm
|
||||||
//
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.ClientSize = new System.Drawing.Size(423, 248);
|
this.ClientSize = new System.Drawing.Size(423, 248);
|
||||||
this.Controls.Add(this.toolstrip);
|
this.Controls.Add(this.manualstrip);
|
||||||
|
this.Controls.Add(this.globalstrip);
|
||||||
this.Controls.Add(this.menustrip);
|
this.Controls.Add(this.menustrip);
|
||||||
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
this.Font = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||||
|
@ -193,6 +218,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
this.Text = "MenusForm";
|
this.Text = "MenusForm";
|
||||||
this.menustrip.ResumeLayout(false);
|
this.menustrip.ResumeLayout(false);
|
||||||
this.menustrip.PerformLayout();
|
this.menustrip.PerformLayout();
|
||||||
|
this.manualstrip.ResumeLayout(false);
|
||||||
|
this.manualstrip.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
@ -215,6 +242,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
private System.Windows.Forms.ToolStripMenuItem rotatethingsccwitem;
|
private System.Windows.Forms.ToolStripMenuItem rotatethingsccwitem;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
|
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3;
|
||||||
private System.Windows.Forms.ToolStripMenuItem splitlinedefsitem;
|
private System.Windows.Forms.ToolStripMenuItem splitlinedefsitem;
|
||||||
private System.Windows.Forms.ToolStrip toolstrip;
|
private System.Windows.Forms.ToolStrip globalstrip;
|
||||||
|
private System.Windows.Forms.ToolStrip manualstrip;
|
||||||
|
private System.Windows.Forms.ToolStripButton buttonbrightnessgradient;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -53,6 +53,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
public ToolStripMenuItem LinedefsMenu { get { return linedefsmenu; } }
|
public ToolStripMenuItem LinedefsMenu { get { return linedefsmenu; } }
|
||||||
public ToolStripMenuItem SectorsMenu { get { return sectorsmenu; } }
|
public ToolStripMenuItem SectorsMenu { get { return sectorsmenu; } }
|
||||||
public ToolStripMenuItem ThingsMenu { get { return thingsmenu; } }
|
public ToolStripMenuItem ThingsMenu { get { return thingsmenu; } }
|
||||||
|
public ToolStripButton MakeGradientBrightness { get { return buttonbrightnessgradient; } }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -69,8 +70,8 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
for(int i = 0; i < menustrip.Items.Count; i++) menus[i] = menustrip.Items[i];
|
for(int i = 0; i < menustrip.Items.Count; i++) menus[i] = menustrip.Items[i];
|
||||||
|
|
||||||
// List all buttons
|
// List all buttons
|
||||||
buttons = new ToolStripItem[toolstrip.Items.Count];
|
buttons = new ToolStripItem[globalstrip.Items.Count];
|
||||||
for(int i = 0; i < toolstrip.Items.Count; i++) buttons[i] = toolstrip.Items[i];
|
for(int i = 0; i < globalstrip.Items.Count; i++) buttons[i] = globalstrip.Items[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -120,7 +120,10 @@
|
||||||
<metadata name="menustrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="menustrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="toolstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="globalstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>118, 17</value>
|
<value>118, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="manualstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>210, 17</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
|
@ -60,6 +60,13 @@ namespace CodeImp.DoomBuilder.BuilderModes.Properties {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal static System.Drawing.Bitmap BrightnessGradient {
|
||||||
|
get {
|
||||||
|
object obj = ResourceManager.GetObject("BrightnessGradient", resourceCulture);
|
||||||
|
return ((System.Drawing.Bitmap)(obj));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
internal static System.Drawing.Bitmap treeview {
|
internal static System.Drawing.Bitmap treeview {
|
||||||
get {
|
get {
|
||||||
object obj = ResourceManager.GetObject("treeview", resourceCulture);
|
object obj = ResourceManager.GetObject("treeview", resourceCulture);
|
||||||
|
|
|
@ -118,6 +118,9 @@
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||||
|
<data name="BrightnessGradient" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
|
<value>..\Resources\BrightnessGradient.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
|
</data>
|
||||||
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="treeview" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\treeview.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
|
|
@ -208,3 +208,12 @@ editselectionmode
|
||||||
allowmouse = true;
|
allowmouse = true;
|
||||||
allowscroll = true;
|
allowscroll = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gradientbrightness
|
||||||
|
{
|
||||||
|
title = "Brightness: Make Gradient";
|
||||||
|
description = "Creates a brightness gradient over all selected sectors from the first to the last selected sector.";
|
||||||
|
allowkeys = true;
|
||||||
|
allowmouse = true;
|
||||||
|
allowscroll = true;
|
||||||
|
}
|
||||||
|
|
BIN
Source/BuilderModes/Resources/BrightnessGradient.png
Normal file
BIN
Source/BuilderModes/Resources/BrightnessGradient.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 420 B |
Loading…
Reference in a new issue