コード例 #1
0
ファイル: MantaStats.cpp プロジェクト: genekogan/of-templates
void MantaStats::draw(int x, int y, int width)
{
    if (!visible)   return;
    this->x = x;
    this->y = y;
    this->width = width;
    mainDrawRect = ofRectangle(x, y, width, width * 310.0 / 400.0);
    
    // draw ofxManta
    ofxManta::draw(x, y, width);
    
    if (px != x || py != y || pwidth != width)
    {
        px = x;
        py = y;
        pwidth = width;
        if (mouseActive) {
            setMouseResponders();
        }
    }
}
コード例 #2
0
ファイル: MantaController.cpp プロジェクト: decebel/OF-tools
void MantaController::draw(int x, int y, int width)
{
    if (!visible)   return;
    this->x = x;
    this->y = y;
    this->width = width;
    
    mainDrawRect = ofRectangle(x, y, width, width * 310.0 / 400.0);
    //paramSwitchDrawRect = ofRectangle(x+mainDrawRect.getWidth()-17, y+2, 14, 14);
    
    //if (viewParameters)
    {
        //drawParametersSelector();
        //drawParametersSelectorButton();
    }
    //else
    {
        ofxManta::draw(x, y, width);
        if (drawHelperLabel && mainDrawRect.inside(ofGetMouseX(), ofGetMouseY()))
        {
            ofPushStyle();
            ofSetColor(255, 125, 0);
            ofDrawBitmapString("Click select. CMD multiple. SHIFT velocity",
                               x+3, y+mainDrawRect.getHeight()*0.22);
            ofPopStyle();
        }
        //drawParametersSelectorButton();
    }
    
    if (px != x || py != y || pwidth != width)
    {
        px = x;
        py = y;
        pwidth = width;
        if (mouseActive) {
            setMouseResponders();
        }
    }
}