Files
LiquidGUI/common.py
Dunestorm ca036a5576 LiquidGUI [1.1.3.0]
- Added emoji to value text.
- Refactored label styling.
2024-07-14 15:24:26 +01:00

23 lines
552 B
Python

class MinMaxCurrent:
def __init__(self):
self.min = 0
self.max = 0
self.cur = 0
def builder(self, _cur: int, _unit: str):
self.cur = _cur
if 0 in [self.max, self.min]:
self.max = _cur
self.min = _cur
if self.cur > self.max:
self.max = _cur
if self.cur < self.min:
self.min = _cur
return (f"🟢 Current: {self.cur}{_unit}\n"
f"❄️ Min: {self.min}{_unit} / "
f"☀️ Max: {self.max}{_unit}")