/*
 * Copyright (c) 2016-2020 Marco Hladik <marco@icculus.org>
 *
 * Permission to use, copy, modify, and distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
 * IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

enumflags
{
	IMAGE_VISIBLE
};

class CUIPic:CUIWidget
{
	vector m_vecSize;
	string m_strImage;
	
	void(void) CUIPic;
	
	virtual void(vector) SetSize;
	virtual vector() GetSize;
	
	virtual void(string) SetImage;
	virtual string() GetImage;
	
	virtual void(void) Draw;
	virtual void(float, float, float, float) Input;
};

void CUIPic::CUIPic(void)
{
	m_vecSize = [16,16];
	m_iFlags = IMAGE_VISIBLE;
}

void CUIPic::Draw(void)
{
	if (m_strImage) {
		drawpic(m_parent.m_vecOrigin + m_vecOrigin, m_strImage, m_vecSize, [1,1,1], 1.0f, 0);
	}
}

void CUIPic::Input (float flEVType, float flKey, float flChar, float flDevID)
{
}

void CUIPic::SetSize (vector vecSize)
{
	m_vecSize = vecSize;
}
vector CUIPic::GetSize(void)
{
	return m_vecSize;
}

void CUIPic::SetImage (string strName)
{
	m_strImage = strName;
}
string CUIPic::GetImage(void)
{
	return m_strImage;
}
