コード例 #1
0
void ofxUISuperCanvas::removeWidgets()
{
    ofxUICanvas::removeWidgets();
    headerWidgets.clear();
    
    canvasTitle = new ofxUILabel(rect->getWidth()-widgetSpacing*2, title, size);
    canvasTitle->setEmbedded(true);
    headerWidgets.push_back(canvasTitle);
    addWidgetPosition(canvasTitle, widgetPosition, widgetAlign);
}
コード例 #2
0
ファイル: ofxUISuperCanvas.cpp プロジェクト: dimitre/ofxUI
void ofxUISuperCanvas::removeWidgets()
{
    ofxUICanvas::removeWidgets();
    headerWidgets.clear();
    resetPlacer(); 
    canvasTitle = new ofxUILabel(rect->getWidth()-widgetSpacing*2, title, size);
    canvasTitle->setEmbedded(true);
    headerWidgets.push_back(canvasTitle);
    addWidgetPosition(canvasTitle, OFX_UI_WIDGET_POSITION_DOWN, OFX_UI_ALIGN_FREE);
}
コード例 #3
0
void ofxUISuperCanvas::superInit(string _label, int _size)
{
    size = _size;
    title = _label;
    kind = OFX_UI_WIDGET_SUPERCANVAS;
    canvasTitle = new ofxUILabel(rect->getWidth()-widgetSpacing*2, title, size);
    canvasTitle->setEmbedded(true);
    headerWidgets.push_back(canvasTitle);
    addWidgetPosition(canvasTitle, widgetPosition, widgetAlign);
    deltaTime = .35;
    lastHitTime = ofGetElapsedTimef();
    bIsMinified = false;
    lastHitTime = 0;
    bTitleLabelHit = false;
    hitPoint = ofxUIVec2f(0.0, 0.0);
}
コード例 #4
0
ofxUISuperCanvas::ofxUISuperCanvas(const ofxUISuperCanvas &other)
: size(other.size),
title(other.title),
hitPoint(other.hitPoint),
deltaTime(other.deltaTime),
lastHitTime(other.lastHitTime),
bIsMinified(other.bIsMinified),
bTitleLabelHit(other.bTitleLabelHit)
{
    if (other.canvasTitle) {
        canvasTitle = new ofxUILabel(*other.canvasTitle);
        headerWidgets.push_back(canvasTitle);
        addWidgetPosition(canvasTitle, widgetPosition, widgetAlign);
    }
    else {
        canvasTitle = NULL;
    }
}