mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
use ints on MColor
This commit is contained in:
parent
befb62366a
commit
93fc16aede
@ -17,26 +17,26 @@ namespace NewHorizons.Utility
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The red component of this colour
|
/// The red component of this colour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||||
public int r;
|
public int r;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The green component of this colour
|
/// The green component of this colour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||||
public int g;
|
public int g;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The blue component of this colour
|
/// The blue component of this colour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||||
public int b;
|
public int b;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The alpha (opacity) component of this colour
|
/// The alpha (opacity) component of this colour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[System.ComponentModel.DataAnnotations.Range(0f, 255f)]
|
[System.ComponentModel.DataAnnotations.Range(0, 255)]
|
||||||
[DefaultValue(255f)]
|
[DefaultValue(255)]
|
||||||
public int a;
|
public int a;
|
||||||
|
|
||||||
public Color ToColor() => new Color(r / 255f, g / 255f, b / 255f, a / 255f);
|
public Color ToColor() => new Color(r / 255f, g / 255f, b / 255f, a / 255f);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user