Thread: [Opentnl-cvs] tnl/zap main.cpp,1.3,1.4
Brought to you by:
mark_frohnmayer,
s_alanet
From: Ben G. <s_a...@us...> - 2004-04-20 23:44:33
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24625/zap Modified Files: main.cpp Log Message: Fixed mouse code, only left clicks count, no possibility of hosed firing state. Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.cpp 20 Apr 2004 23:37:26 -0000 1.3 --- main.cpp 20 Apr 2004 23:44:25 -0000 1.4 *************** *** 85,92 **** void mouse(int button, int state, int x, int y) { ! static int mouseState=0; ! logprintf("button=%d state=%d", button, state); ! if(UserInterface::current) if(state==1 && !mouseState) { --- 85,93 ---- void mouse(int button, int state, int x, int y) { ! // This is pretty gross. We need a trigger system. - BJG ! static int mouseState = 0; ! if(UserInterface::current && button == 0) ! { if(state==1 && !mouseState) { *************** *** 99,102 **** --- 100,104 ---- UserInterface::current->onMouseDown(x, y); } + } } |