Browse Source

Add hide cursor on start and show on edit modes

master
Krisjanis Rijnieks 11 years ago
parent
commit
193bb8764a
  1. 50
      example/bin/data/surfaces.xml
  2. 7
      src/ofxSurfaceManagerGui.cpp

50
example/bin/data/surfaces.xml

@ -16,36 +16,36 @@
</vertices>
<texCoords>
<texCoord>
<x>0.500000000</x>
<y>0.000000000</y>
<x>0.101999998</x>
<y>0.335999995</y>
</texCoord>
<texCoord>
<x>0.000000000</x>
<y>1.000000000</y>
<x>0.328000009</x>
<y>0.689999998</y>
</texCoord>
<texCoord>
<x>1.000000000</x>
<y>1.000000000</y>
<x>0.705999970</x>
<y>0.393999994</y>
</texCoord>
</texCoords>
<source>
<source-type>image</source-type>
<source-name>none</source-name>
<source-name>image1.jpg</source-name>
</source>
</surface>
<surface>
<vertices>
<vertex>
<x>162.000000000</x>
<y>23.000000000</y>
<x>160.000000000</x>
<y>28.000000000</y>
</vertex>
<vertex>
<x>219.000000000</x>
<y>183.000000000</y>
<x>260.000000000</x>
<y>209.000000000</y>
</vertex>
<vertex>
<x>22.000000000</x>
<y>196.000000000</y>
<x>42.000000000</x>
<y>206.000000000</y>
</vertex>
</vertices>
<texCoords>
@ -104,30 +104,30 @@
<surface>
<vertices>
<vertex>
<x>487.148498535</x>
<y>299.815002441</y>
<x>527.148498535</x>
<y>277.815002441</y>
</vertex>
<vertex>
<x>280.170959473</x>
<y>483.102355957</y>
<x>320.170959473</x>
<y>461.102355957</y>
</vertex>
<vertex>
<x>252.250427246</x>
<y>248.424682617</y>
<x>285.250427246</x>
<y>209.424682617</y>
</vertex>
</vertices>
<texCoords>
<texCoord>
<x>0.063067839</x>
<y>0.981202126</y>
<x>0.031067841</x>
<y>0.511202157</y>
</texCoord>
<texCoord>
<x>0.064178742</x>
<y>0.652164280</y>
<x>0.450178742</x>
<y>0.116164304</y>
</texCoord>
<texCoord>
<x>0.925386906</x>
<y>0.977848232</y>
<x>0.543386877</x>
<y>0.609848201</y>
</texCoord>
</texCoords>
<source>

7
src/ofxSurfaceManagerGui.cpp

@ -6,6 +6,7 @@ ofxSurfaceManagerGui::ofxSurfaceManagerGui()
guiMode = ofxGuiMode::NONE;
bDrag = false;
registerMouseEvents();
ofHideCursor();
}
ofxSurfaceManagerGui::~ofxSurfaceManagerGui()
@ -182,6 +183,12 @@ void ofxSurfaceManagerGui::setMode(int newGuiMode)
throw std::runtime_error("Trying to set invalid mode.");
}
if ( newGuiMode == ofxGuiMode::NONE ) {
ofHideCursor();
} else {
ofShowCursor();
}
guiMode = newGuiMode;
if ( guiMode == ofxGuiMode::SOURCE_SELECTION ) {

Loading…
Cancel
Save