Browse Source

Add TextureHighlightWidget

master
Krisjanis Rijnieks 9 years ago
parent
commit
03b3cd0e48
  1. 28
      src/Application/TextureHighlightWidget.cpp
  2. 30
      src/Application/TextureHighlightWidget.h

28
src/Application/TextureHighlightWidget.cpp

@ -0,0 +1,28 @@
#include "TextureHighlightWidget.h"
namespace ofx {
namespace piMapper {
TextureHighlightWidget::TextureHighlightWidget(){
_sm = 0;
}
void TextureHighlightWidget::draw(){
if(_sm == 0){
return;
}
if(_sm->getSelectedSurface() == 0){
return;
}
ofPolyline line = _sm->getSelectedSurface()->getTextureHitArea();
ofPushStyle();
ofSetLineWidth(2);
ofSetColor(0, 255, 255);
line.draw();
ofPopStyle();
}
} // namespace piMapper
} // namespace ofx

30
src/Application/TextureHighlightWidget.h

@ -0,0 +1,30 @@
#pragma once
#include "GuiBaseWidget.h"
#include "SurfaceManager.h"
namespace ofx {
namespace piMapper {
class TextureHighlightWidget : public GuiBaseWidget {
public:
TextureHighlightWidget();
void setup(){}
void update(){}
void draw();
void onMousePressed(ofMouseEventArgs & args){}
void onMouseReleased(ofMouseEventArgs & args){}
void onMouseDragged(ofMouseEventArgs & args){}
bool inside(float x, float y){ return false; }
void setSurfaceManager(SurfaceManager * sm){ _sm = sm; }
private:
SurfaceManager * _sm;
};
} // namespace piMapper
} // namespace ofx
Loading…
Cancel
Save