mirror of
https://github.com/amevarashi/RJW-Sexperience.git
synced 2024-08-14 23:54:08 +00:00
Refactored/optimized SexStatusWindow
This commit is contained in:
parent
e9ca084680
commit
cdc79acfa3
16 changed files with 1178 additions and 797 deletions
35
Source/RJWSexperience/SexHistory/UI/BarInfo.cs
Normal file
35
Source/RJWSexperience/SexHistory/UI/BarInfo.cs
Normal file
|
@ -0,0 +1,35 @@
|
|||
using UnityEngine;
|
||||
using Verse;
|
||||
|
||||
namespace RJWSexperience.SexHistory.UI
|
||||
{
|
||||
public readonly struct BarInfo
|
||||
{
|
||||
public readonly string label;
|
||||
public readonly float fillPercent;
|
||||
public readonly Texture2D fillTexture;
|
||||
public readonly TipSignal tooltip;
|
||||
public readonly string labelRight;
|
||||
public readonly Texture2D border;
|
||||
|
||||
public BarInfo(string label, float fillPercent, Texture2D fillTexture, TipSignal tooltip, string labelRight = "", Texture2D border = null)
|
||||
{
|
||||
this.label = label.CapitalizeFirst();
|
||||
this.fillPercent = Mathf.Clamp01(fillPercent);
|
||||
this.fillTexture = fillTexture;
|
||||
this.tooltip = tooltip;
|
||||
this.labelRight = labelRight.CapitalizeFirst();
|
||||
this.border = border;
|
||||
}
|
||||
|
||||
public BarInfo(string label, float fillPercent, Texture2D fillTexture, string labelRight = "")
|
||||
{
|
||||
this.label = label.CapitalizeFirst();
|
||||
this.fillPercent = Mathf.Clamp01(fillPercent);
|
||||
this.fillTexture = fillTexture;
|
||||
this.tooltip = default;
|
||||
this.labelRight = labelRight.CapitalizeFirst();
|
||||
this.border = null;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue