MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / SetValue

Method SetValue

gui/pyfa_gauge.py:176–192  ·  view source on GitHub ↗

Sets the current position of the gauge.

(self, value, animate=True)

Source from the content-addressed store, hash-verified

174 return self._value
175
176 def SetValue(self, value, animate=True):
177 """ Sets the current position of the gauge. """
178 if self._value == value:
179 return
180
181 self._old_percentage = self._percentage
182 self._value = value
183
184 if value < 0:
185 self._value = 0
186
187 self._percentage = (self._value / self._max_range) * 100
188
189 if animate:
190 self.Animate()
191
192 self._tooltip.SetTip("%.2f/%.2f" % (self._value, self._max_range))
193
194 def SetValueRange(self, value, range, reinit=False):
195 """ Set both value and range of the gauge. """

Callers 4

__init__Method · 0.45
__init__Method · 0.45
SaveCharacterAsMethod · 0.45
charChangedMethod · 0.45

Calls 1

AnimateMethod · 0.95

Tested by

no test coverage detected