Add project files.
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
#ifndef _CTEXT_HPP_
|
||||
#define _CTEXT_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
#include <SDL_ttf.h>
|
||||
|
||||
/*** VideoEngine ***/
|
||||
#include "../VideoEngine/cImage.hpp"
|
||||
|
||||
/*** TextTypeEngine ***/
|
||||
#include "cFont.hpp"
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "../UtilityEngine/cString.hpp"
|
||||
|
||||
using UtilityEngine::cString;
|
||||
|
||||
namespace TextTypeEngine {
|
||||
class EXPORT_FROM_MYDLL cText : public VideoEngine::cImage
|
||||
{
|
||||
public:
|
||||
enum eRender: unsigned int
|
||||
{
|
||||
Solid = 0,
|
||||
Shaded,
|
||||
Blended
|
||||
};
|
||||
public:
|
||||
cText( const cString& text, const unsigned long int size = 16 );
|
||||
cText( SDL_Colour& colour, TextTypeEngine::cFont** font = nullptr, const cString& text = "", const unsigned long int size = 16, const eRender& render = eRender::Solid );
|
||||
cText( TextTypeEngine::cFont** font = nullptr, const cString& text = "", const unsigned long int size = 16,
|
||||
const unsigned long int red = 0, const unsigned long int green = 0, const unsigned long int blue = 0, const eRender& render = eRender::Solid );
|
||||
cText( const cText& copy );
|
||||
~cText();
|
||||
|
||||
|
||||
///Function
|
||||
|
||||
/* Change the colour of the text to White */
|
||||
void White();
|
||||
/* Change the colour of the text to Black */
|
||||
void Black();
|
||||
/* Change the colour of the text to Blue */
|
||||
void Blue();
|
||||
/* Change the colour of the text to Green */
|
||||
void Green();
|
||||
/* Change the colour of the text to Red */
|
||||
void Red();
|
||||
|
||||
///Sets
|
||||
/* Sets the Size */
|
||||
void setSize( const unsigned long int size = 16 );
|
||||
void setFont( cFont** font );
|
||||
/* Sets the text to be printed */
|
||||
void setText( const cString& text );
|
||||
/* Sets the colour of the text via SDL_Colour. */
|
||||
void setColour( const SDL_Colour& colour );
|
||||
/* Sets the colour of the text via RGB. Default is Black */
|
||||
void setColour( const unsigned long int red = 0, const unsigned long int green = 0, const unsigned long int blue = 0, unsigned long int alpha = 255 );
|
||||
/* Sets the render of the text. Default is Solid */
|
||||
void setRender( const eRender& render = eRender::Solid );
|
||||
|
||||
///Gets
|
||||
/* Gets the Size */
|
||||
const unsigned long int getSize() const;
|
||||
cFont* getFont() const;
|
||||
/* Gets the text to be printed. */
|
||||
const cString& getText() const;
|
||||
/* Gets the SDL_Colour of the text */
|
||||
const SDL_Colour& getColour() const;
|
||||
/* Gets the RGB of the text. */
|
||||
void getColour( unsigned long int& red, unsigned long int& green, unsigned long int& blue, unsigned long int& alpha ) const;
|
||||
/* Gets the render of the text. */
|
||||
const eRender& getRender() const;
|
||||
|
||||
private:
|
||||
void Text();
|
||||
|
||||
private:
|
||||
TextTypeEngine::cFont** mpp_font;
|
||||
cString m_text;// = ""
|
||||
|
||||
unsigned long int m_size;// = 16
|
||||
SDL_Colour m_colour;// = nullptr
|
||||
eRender m_render;// = Solid
|
||||
};/// END CLASS DEFINITION cText
|
||||
}/// END NAMESPACE DEFINITION TextTypeEngine
|
||||
#endif/// END IFNDEF _CTEXT_HPP_
|
||||
Reference in New Issue
Block a user