mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-06-02 09:51:47 +00:00
added configuration support for generalized sector effects
This commit is contained in:
parent
9bfaae721e
commit
2e741f7c8e
14 changed files with 457 additions and 263 deletions
63
Source/Config/GeneralizedBit.cs
Normal file
63
Source/Config/GeneralizedBit.cs
Normal file
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
|
||||
namespace CodeImp.DoomBuilder.Config
|
||||
{
|
||||
public class GeneralizedBit : INumberedTitle, IComparable<GeneralizedBit>
|
||||
{
|
||||
#region ================== Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Variables
|
||||
|
||||
// Properties
|
||||
private int index;
|
||||
private string title;
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Properties
|
||||
|
||||
public int Index { get { return index; } }
|
||||
public string Title { get { return title; } }
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Constructor / Disposer
|
||||
|
||||
// Constructor
|
||||
internal GeneralizedBit(int index, string title)
|
||||
{
|
||||
// Initialize
|
||||
this.index = index;
|
||||
this.title = title;
|
||||
|
||||
// We have no destructor
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region ================== Methods
|
||||
|
||||
// This presents the item as string
|
||||
public override string ToString()
|
||||
{
|
||||
return title;
|
||||
}
|
||||
|
||||
// This compares against another
|
||||
public int CompareTo(GeneralizedBit other)
|
||||
{
|
||||
if(this.index < other.index) return -1;
|
||||
else if(this.index > other.index) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue