2 changed files with 58 additions and 0 deletions
@ -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
|
@ -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…
Reference in new issue