Properties Panel Overhaul
Marking player location on galaxy map Fixed non-input field focus disabling global key map Player start ship is now always the same Loadout generator now demands exact match for item dimensions Thermal damage now triggers ItemDamaged event = player can die from cockpit wear! Properties panel now has a much more attractive UI Implemented curve control for properties UI Centralized number formatting in player settings Moved significant digits to player settings Added temperature unit option in player settings
This commit is contained in:
parent
ec1f8f56d4
commit
54f7e3a66f
152 changed files with 8691 additions and 179 deletions
24
Assets/Scripts/UI/StatSheet.cs
Normal file
24
Assets/Scripts/UI/StatSheet.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class StatSheet : MonoBehaviour
|
||||
{
|
||||
public PropertyLabel StatPrefab;
|
||||
|
||||
private List<(PropertyLabel property, Func<string> value)> _stats = new List<(PropertyLabel property, Func<string> value)>();
|
||||
|
||||
public void AddStat(string label, Func<string> value)
|
||||
{
|
||||
var instance = Instantiate(StatPrefab, transform);
|
||||
instance.Label.text = label;
|
||||
_stats.Add((instance, value));
|
||||
}
|
||||
|
||||
public void RefreshValues()
|
||||
{
|
||||
foreach(var stat in _stats)
|
||||
stat.property.Value.text = stat.value();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue