View Single Post
Old 11-18-2017, 02:01 AM   #6
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 273
Default

I change bitmaps and locations on the fly. My plugin has several models, and while they mostly use the same set of controls, they look different. I pre-cache (LoadIBitmap) all the bitmaps, for a quick and smooth change of models.

My knobs (I call IMutableKnobControl) inherit from IKnobMultiControl (well, I have an in-between, too, a non-mutable highlight control, which also uses bitmaps). To change the knob bitmap and location, basically this method (in my actual one, I also manage a highlight bitmap, so a few more lines):

Code:
    void ChangeKnob(int x, int y, IBitmap* pBitmap) {
        mBitmap = *pBitmap;
        mRECT = mTargetRECT = IRECT(x, y, pBitmap);
    }
earlevel is offline   Reply With Quote