void GuiBitmapCtrl::setBitmapHandle(GFXTexHandle handle, bool resize) { mTextureObject = handle; mBitmapName = String("texhandle"); // Resize the control to fit the bitmap if (resize) { setExtent(mTextureObject->getWidth(), mTextureObject->getHeight()); updateSizing(); } }
void GuiBitmapCtrl::setBitmap( const char *name, bool resize ) { mBitmapName = name; if ( !isAwake() ) return; if ( mBitmapName.isNotEmpty() ) { if ( !mBitmapName.equal("texhandle", String::NoCase) ) mTextureObject.set( mBitmapName, &GFXDefaultGUIProfile, avar("%s() - mTextureObject (line %d)", __FUNCTION__, __LINE__) ); // Resize the control to fit the bitmap if ( mTextureObject && resize ) { setExtent( mTextureObject->getWidth(), mTextureObject->getHeight() ); updateSizing(); } } else mTextureObject = NULL; setUpdate(); }
void update() { src = owner.getCurrentSnapshot(); updateSizing(); }
void resized() override { updateSizing(); }
void resized() { updateSizing(); }