Rework slider to use values rather than modifiers

This commit is contained in:
DarkPhoenix
2018-11-14 17:15:04 +03:00
parent 0ab6d6e845
commit 90698dde90
4 changed files with 31 additions and 42 deletions

View File

@@ -567,6 +567,10 @@ class Unit(EqBase):
""" This is a mapping of various tweaks that we have to do between the internal representation of an attribute
value and the display (for example, 'Millisecond' units have the display name of 's', so we have to convert value
from ms to s) """
# Each entry contains:
# Function to convert value to display value
# Function to convert display value to value
# Function which controls attribute unit name used with attribute
return {
"Inverse Absolute Percent": (
lambda v: (1 - v) * 100,
@@ -653,6 +657,5 @@ class Unit(EqBase):
return value
class Traits(EqBase):
pass