cButton Texture Generate

This commit is contained in:
2018-08-30 09:16:39 -04:00
parent 30416b0334
commit 335166ea00
24 changed files with 163 additions and 174 deletions
@@ -4,7 +4,6 @@
#include "../../UtilityEngine/cUtility.hpp"
#include "../cGUI.hpp"
#include "../cLayout.hpp"
using GUIHelpers::cXMLoader;
@@ -66,6 +65,8 @@ void cXMLoader::GetElement( tinyxml2::XMLElement& element, GUIEngine::cWindow* p
tmp = LabelBuild(element, parent);
if (name == "sizer")
tmp = SizerBuild(element, parent);
if (name == "button")
tmp = ButtonBuild(element, parent);
tinyxml2::XMLElement* child = element.FirstChildElement();
if (child != nullptr)
@@ -93,7 +94,7 @@ const cString cXMLoader::GetAttribute( const tinyxml2::XMLElement& element, cons
return rtn;
}
void cXMLoader::Include(const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent) const
void cXMLoader::Include( const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent ) const
{
cString dir = getDir(element);
cString filename = getFileName(element);
@@ -133,7 +134,7 @@ void cXMLoader::Debug(const tinyxml2::XMLElement& element)
GUIEngine::cGUI::Inst().setDebugLevel(debug);
}
GUIEngine::cPanel* cXMLoader::PanelBuild(const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent) const
GUIEngine::cPanel* cXMLoader::PanelBuild( const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent ) const
{
signed long int id = getID(element);
GUIHelpers::eOrientation orientation = getOrientation(element);
@@ -193,7 +194,7 @@ GUIEngine::cLabel* cXMLoader::LabelBuild( const tinyxml2::XMLElement& element, G
return rtn;
}
GUIEngine::cSizer* cXMLoader::SizerBuild(const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent) const
GUIEngine::cSizer* cXMLoader::SizerBuild( const tinyxml2::XMLElement& element, GUIEngine::cWindow* parent ) const
{
signed long int id = getID(element);
//GUIHelpers::eOrientation orientation = getOrientation(element);
@@ -210,12 +211,30 @@ GUIEngine::cSizer* cXMLoader::SizerBuild(const tinyxml2::XMLElement& element, GU
return rtn;
}
const cString cXMLoader::getDir(const tinyxml2::XMLElement& element) const
GUIEngine::cButton * cXMLoader::ButtonBuild( const tinyxml2::XMLElement & element, GUIEngine::cWindow* parent ) const
{
signed long int id = getID(element);
GUIHelpers::eOrientation orientation = getOrientation(element);
GUIHelpers::eAlign align = getAlign(element);
GUIHelpers::eLayout layout = getLayout(element);
GUIHelpers::Position pos = getPosition(element);
GUIHelpers::Size size = getSize(element);
GUIHelpers::Padding pad = getPadding(element);
GUIEngine::cButton* rtn = new GUIEngine::cButton(parent, id, align, layout, pos, size, pad);
if (parent == nullptr)
GUIEngine::cGUI::Inst().AddObject(rtn);
return rtn;
}
const cString cXMLoader::getDir( const tinyxml2::XMLElement& element ) const
{
return GetAttribute(element, "dir");
}
const cString cXMLoader::getFileName(const tinyxml2::XMLElement& element) const
const cString cXMLoader::getFileName( const tinyxml2::XMLElement& element ) const
{
return GetAttribute(element, "filename");
}
@@ -240,7 +259,7 @@ const unsigned long int cXMLoader::getDebug( const tinyxml2::XMLElement& element
return rtn;
}
const bool cXMLoader::getDebugXML(const tinyxml2::XMLElement& element) const
const bool cXMLoader::getDebugXML( const tinyxml2::XMLElement& element ) const
{
bool rtn = false;
cString str = GetAttribute(element, "xml").lower();