From 74bacc470f9442edad227cb9163abda6f7ba4f10 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Mon, 9 Jun 2003 18:58:37 +0000 Subject: mouse-fixes, note that: buttonPressed() keeping track of a repeated push DOES NOT WORK YET, _bMouseB gets cleared elsewhere, so we obviously need to come up with something else. and we still need a wait_relative equivalent to have a proper fnLookAt() ...hmm...this commit message is starting to look like a todo list. oh, well. :) svn-id: r8419 --- sky/mouse.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sky/mouse.cpp') diff --git a/sky/mouse.cpp b/sky/mouse.cpp index 88dc5260e8..7461fca586 100644 --- a/sky/mouse.cpp +++ b/sky/mouse.cpp @@ -172,7 +172,7 @@ void SkyMouse::drawNewMouse() { } void SkyMouse::waitMouseNotPressed(void) { - while (_mouseB != 0) ; + while (_mouseB) ; _bMouseB = 0; } @@ -273,6 +273,16 @@ void SkyMouse::pointerEngine(void) { } } +void SkyMouse::buttonPressed(uint8 button) { + if (_bMouseB == button) + _mouseB = 1; + else + _mouseB = 0; + + _bMouseB = button; + +} + void SkyMouse::buttonEngine1(void) { //checks for clicking on special item //"compare the size of this routine to S1 mouse_button" -- cgit v1.2.3