- u32 stateIdx = (u32)state;
- if (m_foreground_images[stateIdx].Texture)
- m_foreground_images[stateIdx].Texture->drop();
-
- m_foreground_images[stateIdx].Texture = image;
- m_foreground_images[stateIdx].SourceRect = sourceRect;
-
- EGUI_BUTTON_IMAGE_STATE imageState = getImageState(isPressed(), m_foreground_images);
- if (imageState == stateIdx)
- m_image->setImage(image);
-}
-
-void GUIButtonImage::setForegroundImage(video::ITexture *image)
-{
- setForegroundImage(gui::EGBIS_IMAGE_UP, image);
-}
-
-void GUIButtonImage::setForegroundImage(video::ITexture *image, const core::rect<s32> &pos)
-{
- setForegroundImage(gui::EGBIS_IMAGE_UP, image, pos);
-}
-
-void GUIButtonImage::setPressedForegroundImage(video::ITexture *image)
-{
- setForegroundImage(gui::EGBIS_IMAGE_DOWN, image);
-}