示例#1
0
CListviewColumn::CListviewColumn(CListview *parent, const std::string &text, int width)
{
	cParent = parent;
	sText = text;
	iWidth = (width > 0) ? width : getAutoWidth();
	iSortDirection = sort_None;
	bMouseOver = bMouseDown = false;
}
示例#2
0
////////////////
// Create
CListviewColumn::CListviewColumn(CListview *parent)
{
	cParent = parent;
	sText = "";
	iWidth = getAutoWidth();
	iSortDirection = sort_None;
	bMouseOver = bMouseDown = false;
	
}
void UINodeCheckbox::setBackground (const std::string& background)
{
	_checkboxOn = loadTexture(background + "-on");
	_checkboxOff = loadTexture(background + "-off");
	updateImage();
	float w = getWidth();
	if (w <= 0.0f)
		w = getAutoWidth();
	float h = getHeight();
	if (h <= 0.0f)
		h = getAutoHeight();
	setSize(w, h);
}
示例#4
0
const TexturePtr& UINode::setImage (const std::string& texture)
{
	_texture = loadTexture(texture);
	if (!hasImage())
		return _texture;

	float w = getWidth();
	if (w <= 0.0f) {
		w = getAutoWidth();
	}
	float h = getHeight();
	if (h <= 0.0f) {
		h = getAutoHeight();
	}
	setSize(w, h);
	updateAlignment();

	return _texture;
}