//
// Asura_Text_Output.h
//
// Created by Kevin Lea - 12/06/2001 11:06:11
// 
// Copyright (C) 2001 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
    #pragma once
#endif

#ifndef __ASURA_TEXT_OUTPUT_H__
#define __ASURA_TEXT_OUTPUT_H__

#include "Core/Asura_Handle.h"

#define ASURA_TEXT_FORMAT_LEFTJUSTIFIED 0
#define ASURA_TEXT_FORMAT_RIGHTJUSTIFIED 1
#define ASURA_TEXT_FORMAT_CENTREJUSTIFIED 2
#define ASURA_TEXT_FORMAT_SMALLFONT 4 //use a smaller font system font instead

#define ASURA_CHAR_TICK 6

#define ASURA_TEXT_OUTPUT_FONT_WIDTH  (10.0f)
#define ASURA_TEXT_OUTPUT_FONT_HEIGHT (14.0f)

class Asura_Text_Output
{
	public:
		static void Initialise(void);
		static bool IsInitialised();

		static void Print(float x, float y, unsigned int colour, int formatflags, const char* string, ...);
		static void ConvertPixelsToPrintCoords(float& x, float& y);

		static int LengthOfString(const char* string, ...);

		static float WidthOfString(const char* pszString,int iFormat);
		static float HeightOfString(const char* pszString,int iFormat);

		static Asura_Handle GetSmallFontHandle(){return s_iSmallFontHandle;}

		static void LoadFonts();


	private:

		static int FontTextureIndex;
		static Asura_Handle s_iSmallFontHandle;


};

#endif//__ASURA_TEXT_OUTPUT_H__
