MCPcopy Create free account
hub / github.com/pyfa-org/Pyfa / SetValue

Method SetValue

gui/attribute_gauge.py:128–141  ·  view source on GitHub ↗

Sets the current position of the gauge.

(self, value, animate=True)

Source from the content-addressed store, hash-verified

126 return self._value
127
128 def SetValue(self, value, animate=True):
129 """ Sets the current position of the gauge. """
130 if self._value == value:
131 return
132
133 self._old_percentage = self._percentage
134 self._value = value
135
136 self._percentage = (self._value / self._max_range) * 100
137
138 if animate:
139 self.Animate()
140
141 self._tooltip.SetTip("%.2f/%.2f" % (self._value, self._max_range))
142
143 def SetValueRange(self, value, range, reinit=False):
144 """ Set both value and range of the gauge. """

Callers

nothing calls this directly

Calls 1

AnimateMethod · 0.95

Tested by

no test coverage detected