Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

s: show/hide mouse

  • Loading branch information...
commit bc7d7840dd3d04ac43f26c632d722999e760aa49 1 parent 88f8be8
@timgarbos timgarbos authored
Showing with 25 additions and 2 deletions.
  1. +3 −1 code/GameBlock.h
  2. +21 −1 code/testApp.cpp
  3. +1 −0  code/testApp.h
View
4 code/GameBlock.h
@@ -32,7 +32,9 @@ enum BlockAnimationType {
S_waterplant=15,
S_waterplantTrunk=16,
S_branchLeft=18,
- S_branchRight=19
+ S_branchRight=19,
+ S_vineBranchLeft=20,
+ S_vineBranchRight=21
};
const double BlockFadeTime = 0.8;
View
22 code/testApp.cpp
@@ -43,6 +43,16 @@ void testApp::draw(){
//--------------------------------------------------------------
void testApp::keyPressed(int key){
+ if(key=='s')
+ {
+ showMouse = !showMouse;
+
+ if(showMouse)
+ ofShowCursor();
+ else
+ ofHideCursor();
+ }
+
game.keyPressed(key);
tracker.keyPressed(key);
@@ -66,20 +76,30 @@ void testApp::mouseMoved(int x, int y ){
//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
+ if(showMouse)
+ {
tracker.mouseDragged(x, y, button);
+ }
}
//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
- tracker.mousePressed(x, y, button);
+ if(showMouse)
+ {
+ tracker.mousePressed(x, y, button);
game.mousePressed(x,y,button);
+ }
+
}
//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
+ if(showMouse)
+ {
tracker.mouseReleased(x, y, button);
+ }
}
View
1  code/testApp.h
@@ -23,6 +23,7 @@ class testApp : public ofBaseApp{
//---------------------
bool trackerDebug;
+ bool showMouse;
//---------------------
Please sign in to comment.
Something went wrong with that request. Please try again.