mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2024-11-23 12:22:35 +00:00
Linedef Edit Form: added "Subtractive" render style (no Visual mode support yet).
Fixed a misleading hint.
This commit is contained in:
parent
2dee709ed6
commit
4e93bc71d3
6 changed files with 15 additions and 15 deletions
3
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
3
Source/Core/Windows/LinedefEditForm.Designer.cs
generated
|
@ -644,7 +644,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
this.cbRenderStyle.FormattingEnabled = true;
|
||||
this.cbRenderStyle.Items.AddRange(new object[] {
|
||||
"Translucent",
|
||||
"Additive"});
|
||||
"Additive",
|
||||
"Subtractive"});
|
||||
this.cbRenderStyle.Location = new System.Drawing.Point(92, 26);
|
||||
this.cbRenderStyle.Name = "cbRenderStyle";
|
||||
this.cbRenderStyle.Size = new System.Drawing.Size(86, 22);
|
||||
|
|
|
@ -49,9 +49,10 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
private ICollection<Linedef> lines;
|
||||
private List<LinedefProperties> linedefProps; //mxd
|
||||
private bool preventchanges = false;
|
||||
private bool preventchanges;
|
||||
private string arg0str; //mxd
|
||||
private bool haveArg0Str; //mxd
|
||||
private readonly List<string> renderStyles = new List<string>() { "translucent", "add", "subtract" };
|
||||
|
||||
//mxd. Persistent settings
|
||||
private static bool linkFrontTopScale;
|
||||
|
@ -331,9 +332,8 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
//mxd. UDMF Settings
|
||||
if(General.Map.FormatInterface.HasCustomFields) {
|
||||
fieldslist.SetValues(fl.Fields, true); // Custom fields
|
||||
|
||||
string renderStyle = fl.Fields.GetValue("renderstyle", "");
|
||||
cbRenderStyle.SelectedIndex = (renderStyle == "add" ? 1 : 0);
|
||||
int renderstyle = renderStyles.IndexOf(fl.Fields.GetValue("renderstyle", ""));
|
||||
cbRenderStyle.SelectedIndex = (renderstyle == -1 ? 0 : renderstyle);
|
||||
alpha.Text = General.Clamp(fl.Fields.GetValue("alpha", 1.0f), 0f, 1f).ToString();
|
||||
lockNumber.Text = fl.Fields.GetValue("locknumber", 0).ToString();
|
||||
arg0str = fl.Fields.GetValue("arg0str", string.Empty);
|
||||
|
@ -459,8 +459,7 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
|
||||
//mxd. UDMF Settings
|
||||
if(General.Map.FormatInterface.HasCustomFields) {
|
||||
int i = (l.Fields.GetValue("renderstyle", "") == "add" ? 1 : 0);
|
||||
|
||||
int i = Math.Max(0, renderStyles.IndexOf(l.Fields.GetValue("renderstyle", "")));
|
||||
if(cbRenderStyle.SelectedIndex != -1 && i != cbRenderStyle.SelectedIndex)
|
||||
cbRenderStyle.SelectedIndex = -1;
|
||||
|
||||
|
@ -927,12 +926,12 @@ namespace CodeImp.DoomBuilder.Windows
|
|||
if(preventchanges) return;
|
||||
|
||||
//update values
|
||||
if(cbRenderStyle.SelectedIndex == 1) { //add
|
||||
foreach(Linedef l in lines)
|
||||
l.Fields["renderstyle"] = new UniValue(UniversalType.String, "add");
|
||||
} else {
|
||||
if(cbRenderStyle.SelectedIndex == 0) {
|
||||
foreach(Linedef l in lines)
|
||||
if(l.Fields.ContainsKey("renderstyle")) l.Fields.Remove("renderstyle");
|
||||
} else {
|
||||
foreach(Linedef l in lines)
|
||||
l.Fields["renderstyle"] = new UniValue(UniversalType.String, renderStyles[cbRenderStyle.SelectedIndex]);
|
||||
}
|
||||
|
||||
General.Map.IsChanged = true;
|
||||
|
|
|
@ -269,7 +269,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
string gridIncKey = Actions.Action.GetShortcutKeyDesc("builder_griddec");
|
||||
string gridDecKey = Actions.Action.GetShortcutKeyDesc("builder_gridinc");
|
||||
|
||||
hints = new[]{ "Press " + panKey + " to pan the view",
|
||||
hints = new[]{ "Hold " + panKey + " to pan the view",
|
||||
"Press " + selectKey + " to select a linedef",
|
||||
"Hold " + selectKey + " and drag to use rectangular selection",
|
||||
"Press " + clearKey + " to clear selection",
|
||||
|
|
|
@ -536,7 +536,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
string gridIncKey = Actions.Action.GetShortcutKeyDesc("builder_griddec");
|
||||
string gridDecKey = Actions.Action.GetShortcutKeyDesc("builder_gridinc");
|
||||
|
||||
hints = new[]{ "Press " + panKey + " to pan the view",
|
||||
hints = new[]{ "Hold " + panKey + " to pan the view",
|
||||
"Press " + selectKey + " to select a sector",
|
||||
"Hold " + selectKey + " and drag to use rectangular selection",
|
||||
"Press " + clearKey + " to clear selection",
|
||||
|
|
|
@ -647,7 +647,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
string gridIncKey = Actions.Action.GetShortcutKeyDesc("builder_griddec");
|
||||
string gridDecKey = Actions.Action.GetShortcutKeyDesc("builder_gridinc");
|
||||
|
||||
hints = new[]{ "Press " + panKey + " to pan the view",
|
||||
hints = new[]{ "Hold " + panKey + " to pan the view",
|
||||
"Press " + selectKey + " to select a thing",
|
||||
"Hold " + selectKey + " and drag to use rectangular selection",
|
||||
"Press " + clearKey + " to clear selection",
|
||||
|
|
|
@ -658,7 +658,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
string gridIncKey = Actions.Action.GetShortcutKeyDesc("builder_griddec");
|
||||
string gridDecKey = Actions.Action.GetShortcutKeyDesc("builder_gridinc");
|
||||
|
||||
hints = new[]{ "Press " + panKey + " to pan the view",
|
||||
hints = new[]{ "Hold " + panKey + " to pan the view",
|
||||
"Press " + selectKey + " to select a vertex",
|
||||
"Hold " + selectKey + " and drag to use rectangular selection",
|
||||
"Press " + clearKey + " to clear selection",
|
||||
|
|
Loading…
Reference in a new issue