//------------------------------------------------------------------------------------
// irr::gui::IGUIButton wrappers
// do not delete a pointer to this
//------------------------------------------------------------------------------------

extern "C" 
{
	
	bool IrrGUI_IGUIButton_isPressed(IGUIButton* btn)
	{
		if (btn)
			return btn->isPressed();
		else return false;
	}
	
	void IrrGUI_IGUIButton_setPressed(IGUIButton* btn,bool pressed = true)
	{
		if (btn)
			btn->setPressed(pressed);
	}
	
	void IrrGUI_IGUIButton_setIsPushButton(IGUIButton* btn,bool isPushButton = true)
	{
		if (btn)
			btn->setIsPushButton(isPushButton);
	}
	
	void IrrGUI_IGUIButton_setOverrideFont(IGUIButton* btn,IGUIFont* font = 0)
	{
		if (btn)
			btn->setOverrideFont(font);
	}
	
	void IrrGUI_IGUIButton_setImage(IGUIButton* btn,ITexture* image = 0)
	{
		if (btn)
			btn->setImage(image);
	}
	
	void IrrGUI_IGUIButton_setImageFromSegment(IGUIButton* btn,ITexture* image,rect<s32>* pos)
	{
		if (btn)
			btn->setImage(image,*pos);
	}
	
	void IrrGUI_IGUIButton_setPressedImage(IGUIButton* btn,ITexture* image = 0)
	{
		if (btn)
			btn->setPressedImage(image);
	}
	
	void IrrGUI_IGUIButton_setPressedImageFromSegment(IGUIButton* btn,ITexture* image,rect<s32>* pos)
	{
		if (btn)
			btn->setPressedImage(image,*pos);
	}
	
	void IrrGUI_IGUIButton_setUseAlphaChannel(IGUIButton* btn,bool useAlphaChannel = true)
	{
		if (btn)
			btn->setUseAlphaChannel(useAlphaChannel);
	}
	
	bool IrrGUI_IGUIButton_isAlphaChannelUsed(IGUIButton* btn)
	{
		if (btn)
			return btn->isAlphaChannelUsed();
		else return false;
	}
	
	void IrrGUI_IGUIButton_setSpriteBank(IGUIButton* btn,IGUISpriteBank* bank = 0)
	{
		if (btn)
			btn->setSpriteBank(bank);
	}
	
	void IrrGUI_IGUIButton_setSprite(IGUIButton* btn,EGUI_BUTTON_STATE state, s32 index, 
			video::SColor* color=0, bool loop=false)
	{
		bool delColor=false;
		
		if (!color) {
			delColor=true;
			color=new SColor(255,255,255,255);
		}
		
		if (btn)
			btn->setSprite(state,index,*color,loop);
			
		if (delColor) delete color;
	}
	
	void IrrGUI_IGUIButton_setDrawBorder(IGUIButton* btn,bool border = true)
	{
		if (btn)
			btn->setDrawBorder(border);
	}

	bool IrrGUI_IGUIButton_isPushButton(IGUIButton* btn)
	{
		if (btn)
			return btn->isPushButton();
		else return false;
	}

	bool IrrGUI_IGUIButton_isDrawingBorder(IGUIButton* btn)
	{
		if (btn)
			return btn->isDrawingBorder();
		else return false;
	}

	void IrrGUI_IGUIButton_setScaleImage(IGUIButton* btn, bool scaleImage = true) {
		if (btn)
			btn->setScaleImage(scaleImage);
	}

	bool IrrGUI_IGUIButton_isScalingImage(IGUIButton* btn) {
		if (btn) 
			return btn->isScalingImage();
		else return false;
	}


/*
 
*/

}