View Single Post
Old 04-16-11, 04:18 PM   #88
DrJones
Samurai Navy
 
Join Date: Jun 2009
Location: Germany, 50 Kilometers away from Kiel
Posts: 576
Downloads: 341
Uploads: 0
Default

Quote:
Originally Posted by reaper7 View Post
Not sure if this is what your looking for, but I put a blinking light in my Stadimeter fix. This was activated on clicking the switch - the length you just set with count value and the blink length duration = DurationInSeconds.

This was the code - may be of use: Its in my TorpedoSolution.py script

Code:
def StadimeterAct( sender ):
	global FlashingIcon
	if FlashingIcon != False:
		return
	else:
		item = PageTorpedoSolution_RightPanel_StadActWhite
		count = 5
		if item.Visible <= 0:
			return
		if item.Visible and count <= 0:
			item["blinking"] = None
			item.Parent.AnimationStopped -= BlinkTimerAnimationStopped
			return
		if not item["blinking"]:
			item["blinking"] = True
			item.Parent.AnimationStopped += BlinkTimerAnimationStopped
		item.Visible = not item.Visible
		DurationInSeconds = 0.3
		if not item.Visible:
			DurationInSeconds = DurationInSeconds / 2.0
		#set the animation on the Parent because animations don't run when an item is not visible
		a = item.Parent.StartAnimation( MenuItemWrapper.AnimationTypes.Timer, 1.0,  DurationInSeconds )
		a["blinkitem"] = item
		if item.Visible:
			count = count - 1
	a[ "blinkcount" ] = count
	FlashingIcon = False
Also Panel looks great, nicely made
Thank you for your response and your hint...i will try it

Regards

DrJones
DrJones is offline   Reply With Quote