Browse Source

Remove TextureEditor::enable() disable() etc...

master
Krisjanis Rijnieks 9 years ago
parent
commit
3b202bd270
  1. 3
      src/Surfaces/SurfaceManagerGui.cpp
  2. 21
      src/UserInterface/TextureEditor.cpp
  3. 5
      src/UserInterface/TextureEditor.h

3
src/Surfaces/SurfaceManagerGui.cpp

@ -64,10 +64,7 @@ void SurfaceManagerGui::setMode(int newGuiMode){
} }
if(guiMode == GuiMode::TEXTURE_MAPPING){ if(guiMode == GuiMode::TEXTURE_MAPPING){
textureEditor.enable();
textureEditor.setSurface(surfaceManager->getSelectedSurface()); textureEditor.setSurface(surfaceManager->getSelectedSurface());
}else{
textureEditor.disable();
} }
if(guiMode == GuiMode::PROJECTION_MAPPING){ if(guiMode == GuiMode::PROJECTION_MAPPING){

21
src/UserInterface/TextureEditor.cpp

@ -5,31 +5,10 @@ namespace piMapper {
TextureEditor::TextureEditor(){ TextureEditor::TextureEditor(){
clear(); clear();
enable();
} }
TextureEditor::~TextureEditor(){ TextureEditor::~TextureEditor(){
clear(); clear();
disable();
}
void TextureEditor::registerKeyEvents(){
//ofAddListener(ofEvents().keyPressed, this, &TextureEditor::keyPressed);
//ofAddListener(ofEvents().keyReleased, this, &TextureEditor::keyReleased);
}
void TextureEditor::unregisterKeyEvents(){
//ofRemoveListener(ofEvents().keyPressed, this, &TextureEditor::keyPressed);
//ofRemoveListener(ofEvents().keyReleased, this, &TextureEditor::keyReleased);
}
void TextureEditor::enable(){
registerKeyEvents();
bShiftKeyDown = false;
}
void TextureEditor::disable(){
unregisterKeyEvents();
} }
void TextureEditor::update(){ void TextureEditor::update(){

5
src/UserInterface/TextureEditor.h

@ -16,11 +16,6 @@ class TextureEditor {
TextureEditor(); TextureEditor();
~TextureEditor(); ~TextureEditor();
void registerKeyEvents();
void unregisterKeyEvents();
void enable();
void disable();
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 keyPressed(ofKeyEventArgs & args);
void keyReleased(ofKeyEventArgs & args); void keyReleased(ofKeyEventArgs & args);

Loading…
Cancel
Save