WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 04-09-2009, 02:03 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
In your case the mouse button event is not being passed on. Would it work to send a mouse event when the button event occurs?
Code:
import viz
viz.go()

import vizinfo
infoObject = vizinfo.add('Give me feedback!')
button = infoObject.add(viz.BUTTON, 'Push me')

def onMouse():
	pos = viz.mouse.getPosition()
	print 'mouse is currently at',pos
	
vizact.onmousedown(viz.MOUSEBUTTON_LEFT, onMouse)

def onButton(obj,state):
	if state == viz.ON:
		viz.sendEvent( viz.MOUSEDOWN_EVENT, viz.MOUSEBUTTON_LEFT )

viz.callback(viz.BUTTON_EVENT,onButton)
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Wanda button events on flock of birds Atul Thakur Vizard 12 01-18-2008 04:04 PM
button problems cade_mccall Vizard 3 02-22-2007 10:48 AM
on/off button bailenson Vizard 1 09-28-2004 06:13 PM


All times are GMT -7. The time now is 03:09 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC