Browse Source

Remove keyPressed() and keyReleased() from TextureEditor

master
Krisjanis Rijnieks 9 years ago
parent
commit
d0164813be
  1. 42
      src/UserInterface/TextureEditor.cpp
  2. 2
      src/UserInterface/TextureEditor.h

42
src/UserInterface/TextureEditor.cpp

@ -79,48 +79,6 @@ void TextureEditor::update(){
} // else } // else
} }
void TextureEditor::keyPressed(ofKeyEventArgs & args){
int key = args.key;
float moveStep;
if(bShiftKeyDown){
moveStep = 10.0f;
}else{
moveStep = 0.5f;
}
switch(key){
case OF_KEY_LEFT:
moveSelection(ofVec2f(-moveStep, 0.0f));
break;
case OF_KEY_RIGHT:
moveSelection(ofVec2f(moveStep, 0.0f));
break;
case OF_KEY_UP:
moveSelection(ofVec2f(0.0f, -moveStep));
break;
case OF_KEY_DOWN:
moveSelection(ofVec2f(0.0f, moveStep));
break;
case OF_KEY_SHIFT:
bShiftKeyDown = true;
break;
}
}
void TextureEditor::keyReleased(ofKeyEventArgs & args){
int key = args.key;
switch(key){
case OF_KEY_SHIFT:
bShiftKeyDown = false;
break;
}
}
void TextureEditor::mousePressed(ofMouseEventArgs & args){ void TextureEditor::mousePressed(ofMouseEventArgs & args){
for(unsigned int i = 0; i < joints.size(); ++i){ for(unsigned int i = 0; i < joints.size(); ++i){
joints[i]->mousePressed(args); joints[i]->mousePressed(args);

2
src/UserInterface/TextureEditor.h

@ -17,8 +17,6 @@ class TextureEditor {
~TextureEditor(); ~TextureEditor();
void update(); // Maybe the Application pointer would make sense there. Not sure yet. void update(); // Maybe the Application pointer would make sense there. Not sure yet.
void keyPressed(ofKeyEventArgs & args);
void keyReleased(ofKeyEventArgs & args);
void mousePressed(ofMouseEventArgs & args); void mousePressed(ofMouseEventArgs & args);
void mouseDragged(ofMouseEventArgs & args); void mouseDragged(ofMouseEventArgs & args);
void draw(); void draw();

Loading…
Cancel
Save