mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-02-11 01:54:24 +01:00
Update Sensors.cs
This commit is contained in:
parent
3e5df1ace1
commit
1314774149
|
|
@ -48,6 +48,18 @@ namespace PerformanceOverlay
|
|||
return ConvertToString(Value());
|
||||
}
|
||||
}
|
||||
|
||||
public class UserStringValueSensor : ValueSensor
|
||||
{
|
||||
public delegate string? ValueDelegate();
|
||||
|
||||
public ValueDelegate Value { get; set; }
|
||||
|
||||
public override string? GetValue(Sensors sensors)
|
||||
{
|
||||
return ConvertToString(Value());
|
||||
}
|
||||
}
|
||||
|
||||
public class HardwareSensor : ValueSensor
|
||||
{
|
||||
|
|
@ -341,9 +353,9 @@ namespace PerformanceOverlay
|
|||
}
|
||||
},
|
||||
{
|
||||
"CURR_TIME", new UserValueSensor()
|
||||
"CURR_TIME", new UserStringValueSensor()
|
||||
{
|
||||
Value = delegate string ()
|
||||
Value = delegate ()
|
||||
{
|
||||
DateTime localDate = DateTime.Now;
|
||||
return localDate.ToString("t");
|
||||
|
|
|
|||
Loading…
Reference in a new issue