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>
|
||||
/// The red component of this colour
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
||||
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||
public int r;
|
||||
|
||||
/// <summary>
|
||||
/// The green component of this colour
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
||||
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||
public int g;
|
||||
|
||||
/// <summary>
|
||||
/// The blue component of this colour
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.Range(0f, int.MaxValue)]
|
||||
[System.ComponentModel.DataAnnotations.Range(0, int.MaxValue)]
|
||||
public int b;
|
||||
|
||||
/// <summary>
|
||||
/// The alpha (opacity) component of this colour
|
||||
/// </summary>
|
||||
[System.ComponentModel.DataAnnotations.Range(0f, 255f)]
|
||||
[DefaultValue(255f)]
|
||||
[System.ComponentModel.DataAnnotations.Range(0, 255)]
|
||||
[DefaultValue(255)]
|
||||
public int a;
|
||||
|
||||
public Color ToColor() => new Color(r / 255f, g / 255f, b / 255f, a / 255f);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user