如果单击鼠标按钮,如何执行一组操作? [英] How can I perform an set of operation only if the mouse button is clicked?

查看:53
本文介绍了如果单击鼠标按钮,如何执行一组操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有用于检测单击鼠标按钮的代码,并且只要单击鼠标按钮就会重复执行一组操作???

为我提供代码。



我尝试过的事情:



我目前正在玩游戏tic tac toe。当且仅当单击鼠标按钮时,我需要执行一组操作。我无法实现它。我需要一个代码像while(!kbhit)

Is there any code for detecting the mouse button clicked and the repeatedly do a set of operation whenever a mouse button is clicked???
Provide me with code.

What I have tried:

I am currently working on the game tic tac toe. I need to do a set of operation if and only if the mouse button is clicked. I could not achieve it. I need a code like while(!kbhit)

推荐答案

参见鼠标输入参考(Windows) [ ^ ]。


这篇关于如果单击鼠标按钮,如何执行一组操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆