MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / change

Method change

DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py:247–267  ·  view source on GitHub ↗

Rotation of pointer call it with degree and step to set initial options for rotation. Without any option to start rotation.

(self, degree=None, step=1)

Source from the content-addressed store, hash-verified

245 self.pointer.move(delta_x, delta_y)
246
247 def change(self, degree=None, step=1):
248 """
249 Rotation of pointer
250 call it with degree and step to set initial options for rotation.
251 Without any option to start rotation.
252 """
253 if self.pointer:
254 if degree != None:
255 self.pointer.stop_degree = degree
256 self.pointer.step = step if self.pointer.all[2] < degree else -step
257 return True
258 now = self.pointer.all[2]
259 step = self.pointer.step
260 new_degree = now + step
261 if ((step > 0 and new_degree < self.pointer.stop_degree) or
262 (step < 0 and new_degree > self.pointer.stop_degree)):
263 self.pointer.new(degree=new_degree)
264 return False
265 else:
266 self.pointer.new(degree=self.pointer.stop_degree)
267 return True
268
269GSIZE = (160, 160)
270

Callers 2

make_windowFunction · 0.45
mainFunction · 0.45

Calls 1

newMethod · 0.45

Tested by

no test coverage detected