WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Mouse (https://forum.worldviz.com/showthread.php?t=363)

alaa 05-23-2005 11:18 AM

Mouse
 
Hi, How do I make the button when i click on it, it only clicks ones. Every time i click in a button, it does it twice.


Thank you
Alaa G

farshizzo 05-23-2005 11:28 AM

Hi,

The second parameter in the button callback event signifies whether the button is being pressed or released. So you would need to do something like this:
Code:

def onbutton(obj,state):
    if state == viz.DOWN:
        if obj == mybutton:
            #my button has been clicked



All times are GMT -7. The time now is 03:04 AM.

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