view LightClone/Source/GuiLabel.h @ 75:57c0ce406a68 tip

Add main menu
author koryspansel <koryspansel@bendbroadband.com>
date Tue, 18 Oct 2011 17:08:17 -0700
parents 3507bd831c7f
children
line wrap: on
line source

/*
 * GuiLabel
 */

#ifndef __GUILABEL_H__
#define __GUILABEL_H__

#include "Core.h"
#include "GuiElement.h"
#include "FixedString.h"

/*
 * GuiLabelFlag
 */
enum
{
	GuiLabelFlag_CenterX	= (1 << 0),
	GuiLabelFlag_CenterY	= (1 << 1),
};

/*
 * GuiLabel
 */
class GuiLabel : public GuiElement
{
	/*
	 * pFont
	 */
	ID3DXFont* pFont;

	/*
	 * kLabel
	 */
	FixedString<> kLabel;

	/*
	 * nLabelFlags
	 */
	uint32 nLabelFlags;

public:

	/*
	 * GuiLabel
	 */
	GuiLabel();

	/*
	 * Initialize
	 */
	virtual ErrorCode Initialize(ServiceProvider* pServiceProvider);

	/*
	 * Render
	 */
	virtual void Render(GuiRenderContext& kContext);

	/*
	 * SetFont
	 */
	ErrorCode SetFont(const char* pName, uint32 nSize, uint32 nHeight = FW_NORMAL);

	/*
	 * SetText
	 */
	ErrorCode SetText(const char* pText);

	/*
	 * SetLabelFlag
	 */
	ErrorCode SetLabelFlag(uint32 nFlag);

	/*
	 * ClearLabelFlag
	 */
	ErrorCode ClearLabelFlag(uint32 nFlag);
};

#endif //__GUILABEL_H__