Browse Source

Integrate TexturehighlightWidget into Application

master
Krisjanis Rijnieks 9 years ago
parent
commit
3edbda77a3
  1. 4
      src/Application/Gui.cpp
  2. 3
      src/Application/Gui.h
  3. 3
      src/Application/TextureMappingState.cpp

4
src/Application/Gui.cpp

@ -92,6 +92,10 @@ SurfaceHighlightWidget & Gui::getSurfaceHighlightWidget(){
return _surfaceHighlightWidget;
}
TextureHighlightWidget & Gui::getTextureHighlightWidget(){
return _textureHighlightWidget;
}
void Gui::onScaleWidgetEvent(GuiWidgetEvent & event){
GuiEvent e;
e.args = event.args;

3
src/Application/Gui.h

@ -7,6 +7,7 @@
#include "ScaleWidget.h"
#include "LayerPanelWidget.h"
#include "SurfaceHighlightWidget.h"
#include "TextureHighlightWidget.h"
namespace ofx {
namespace piMapper {
@ -65,6 +66,7 @@ class Gui {
ScaleWidget & getScaleWidget();
LayerPanelWidget & getLayerPanelWidget();
SurfaceHighlightWidget & getSurfaceHighlightWidget();
TextureHighlightWidget & getTextureHighlightWidget();
void onMousePressed(ofMouseEventArgs & args);
void onMouseReleased(ofMouseEventArgs & args);
@ -83,6 +85,7 @@ class Gui {
ScaleWidget _scaleWidget;
LayerPanelWidget _layerPanelWidget;
SurfaceHighlightWidget _surfaceHighlightWidget;
TextureHighlightWidget _textureHighlightWidget;
};
} // piMapper

3
src/Application/TextureMappingState.cpp

@ -17,6 +17,9 @@ void TextureMappingState::draw(Application * app){
Gui::instance()->getSurfaceHighlightWidget().setSurfaceManager(app->getSurfaceManager());
Gui::instance()->getSurfaceHighlightWidget().draw();
Gui::instance()->getTextureHighlightWidget().setSurfaceManager(app->getSurfaceManager());
Gui::instance()->getTextureHighlightWidget().draw();
}
void TextureMappingState::onKeyPressed(Application * app, ofKeyEventArgs & args){

Loading…
Cancel
Save