Struct CustonResolutionList
- Namespace
- Cobilas.GodotEngine.Utility
- Assembly
- com.cobilas.godot.utility.dll
Stores custom resolutions.
[Serializable]
[JsonObject]
public readonly struct CustonResolutionList : IEnumerable<Resolution>, IEnumerable
- Implements
- Inherited Members
Remarks
Stores all custom resolutions defined in the application to be used.
Constructors
CustonResolutionList(in int, in Resolution[])
Starts a new instance of the object.
public CustonResolutionList(in int hash, in Resolution[] resolutions)
Parameters
hashintresolutionsResolution[]
CustonResolutionList(in int, in IEnumerable<Resolution>)
Starts a new instance of the object.
public CustonResolutionList(in int hash, in IEnumerable<Resolution> resolutions)
Parameters
hashintresolutionsIEnumerable<Resolution>
Methods
Deserialize(Stream?)
Deserializes a list of objects from a specified file.
public static CustonResolutionList[] Deserialize(Stream? stream)
Parameters
streamStreamThe file where the list is.
Returns
- CustonResolutionList[]
Returns a custom resolution list.
Exceptions
- ArgumentNullException
An exception will be thrown if the parameters are null.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<Resolution> GetEnumerator()
Returns
- IEnumerator<Resolution>
An enumerator that can be used to iterate through the collection.
Serialize(in CustonResolutionList[], Stream?)
Serializes a list of objects to a specified file.
public static void Serialize(in CustonResolutionList[] list, Stream? stream)
Parameters
listCustonResolutionList[]The list to be serialized.
streamStreamThe file that will receive the list.
Exceptions
- ArgumentNullException
An exception will be thrown if the parameters are null.
Operators
explicit operator int(CustonResolutionList)
Explicit conversion operator.(CustonResolutionList to int)
public static explicit operator int(CustonResolutionList R)
Parameters
RCustonResolutionListObject to be converted.