Add project files.
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
#ifndef _CGUI_HPP_
|
||||
#define _CGUI_HPP_
|
||||
|
||||
/*** SDL Header Files ***/
|
||||
#include <SDL.h>
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "../TextTypeEngine/cFont.hpp"
|
||||
#include "../MathEngine/iVector/iVector4.hpp"
|
||||
|
||||
#include "cWindow.hpp"
|
||||
|
||||
/*** DLL Header File ***/
|
||||
#include "dllExport.h"
|
||||
|
||||
/*** Custom Header Files ***/
|
||||
#include "../UtilityEngine/cString.hpp"
|
||||
#include "../MathEngine/iVector/iVector2.hpp"
|
||||
|
||||
using UtilityEngine::cString;
|
||||
|
||||
namespace GUIEngine {
|
||||
/* Singleton */
|
||||
class EXPORT_FROM_MYDLL cGUI
|
||||
{
|
||||
private:
|
||||
cGUI();
|
||||
~cGUI();
|
||||
|
||||
public:
|
||||
enum EXPORT_FROM_MYDLL eGUIEventType: unsigned int
|
||||
{
|
||||
MouseButton1 = 0,
|
||||
MouseButton2,
|
||||
MouseButton3,
|
||||
Keyboard
|
||||
};
|
||||
///Functions
|
||||
static cGUI& Inst();
|
||||
static void Delete();
|
||||
|
||||
const bool Initialize( const cString& filename, const cString& dir = "", const unsigned long int size = 16 );
|
||||
|
||||
void Event(const MathEngine::iVector2& location, const eGUIEventType& type);
|
||||
const MathEngine::iVector2 DisplayArea() const;
|
||||
|
||||
void AddObject(cWindow* obj);
|
||||
|
||||
void Display();
|
||||
|
||||
///Sets
|
||||
void setFont( TextTypeEngine::cFont* font );
|
||||
void setFont( const cString& filename, const cString& dir = "", const unsigned long int size = 16 );
|
||||
|
||||
void setTextColour( const GUIHelpers::RBGA& colour );
|
||||
void setTextColour( const unsigned long int red = 0, const unsigned long int green = 0, const unsigned long int blue = 0 );
|
||||
|
||||
void setPadding( const GUIHelpers::Padding& padding );
|
||||
void setPadding( const unsigned int top = 5, const unsigned int right = 5, const unsigned int bottom = 5, const unsigned int left = 5 );
|
||||
|
||||
void setAlign( const GUIHelpers::eAlign& align = GUIHelpers::eAlign::CENTER );
|
||||
|
||||
///Gets
|
||||
TextTypeEngine::cFont* getFont();
|
||||
|
||||
const GUIHelpers::RBGA& getTextColour() const;
|
||||
void getTextColour( unsigned long int& red, unsigned long int& green, unsigned long int& blue ) const;
|
||||
|
||||
const GUIHelpers::Padding& getPadding() const;
|
||||
void getPadding( unsigned int& top, unsigned int& right, unsigned int& bottom, unsigned int& left ) const;
|
||||
|
||||
const GUIHelpers::eAlign& getAlign() const;
|
||||
|
||||
const bool IsInit() const;
|
||||
|
||||
private:
|
||||
static cGUI* sp_inst;// = nullptr
|
||||
|
||||
bool m_inited;// = false
|
||||
|
||||
/* default GUI font */
|
||||
TextTypeEngine::cFont* mp_font;// = nullptr
|
||||
|
||||
/* default GUI text colour black*/
|
||||
//GUIHelpers::RBGA m_textColour;// = { 0, 0, 0 }
|
||||
|
||||
/* default GUI padding */
|
||||
//GUIHelpers::Padding m_padding;// = { 5, 5, 5, 5 }
|
||||
|
||||
/* default GUI align */
|
||||
//GUIHelpers::eAlign m_align;// = GUIHelpers::eAlign::CENTER
|
||||
|
||||
std::vector<cWindow*> m_guiObjects;
|
||||
};/// END CLASS DEFINITION cGUI
|
||||
}/// END NAMESPACE DEFINITION GUIEngine
|
||||
#endif/// END IFNDEF _CGUI_HPP_
|
||||
Reference in New Issue
Block a user