BoxSizer to Sizer

This commit is contained in:
2018-08-15 22:04:06 -04:00
parent 353dc21750
commit bd3c111fa1
67 changed files with 369 additions and 308 deletions
@@ -5,9 +5,9 @@ using GUIEngine::cLabel;
/*static*/ const cString cLabel::sNAME = "label";
/*static*/ const GUIHelpers::eLayout cLabel::sLAYOUT = GUIHelpers::eLayout::WRAP_CONTENT;
cLabel::cLabel(cWindow* parent, const signed int id, const cString& label /*= ""*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
cLabel::cLabel( cWindow* parent, const signed int id, const cString& label /*= ""*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
const GUIHelpers::eLayout& layout /*= sLAYOUT*/, const GUIHelpers::Position& pos /*= sPOSITION*/, const GUIHelpers::Size& size /*= sSIZE*/,
const GUIHelpers::Padding& padding /*= sPADDING*/, const cString& name /*= sNAME*/)
const GUIHelpers::Padding& padding /*= sPADDING*/, const cString& name /*= sNAME*/ )
{
mp_text = new TextTypeEngine::cText(label);
Create(parent, id, label, align, layout, pos, size, padding, name);
@@ -20,11 +20,13 @@ cLabel::cLabel(cWindow* parent, const signed int id, const cString& label /*= ""
}
/// Functions
void cLabel::Create(cWindow* parent, const signed int id, const cString& label /*= ""*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
void cLabel::Create( cWindow* parent, const signed int id, const cString& label /*= ""*/, const GUIHelpers::eAlign& align /*= sALIGN*/,
const GUIHelpers::eLayout& layout /*= sLAYOUT*/, const GUIHelpers::Position& pos /*= sPOSITION*/, const GUIHelpers::Size& size /*= sSIZE*/,
const GUIHelpers::Padding& padding /*= sPADDING*/, const cString& name /*= sNAME*/)
const GUIHelpers::Padding& padding /*= sPADDING*/, const cString& name /*= sNAME*/ )
{
cWindow::Create(parent, id, sORIENTATION, align, layout, pos, size, padding, name);
if (layout == GUIHelpers::eLayout::DEFAULT_LAYOUT)
setLayout(sLAYOUT);
if (this->getParent() != nullptr) {
this->getParent()->AddChild(this);
}
@@ -54,12 +56,12 @@ void cLabel::GenerateTexture()
}
/// Sets
void cLabel::setFontColour(const GUIHelpers::RGBA& colour)
void cLabel::setFontColour( const GUIHelpers::RGBA& colour )
{
mp_text->setColour(colour);
}
void cLabel::setFontSize(const unsigned long int size)
void cLabel::setFontSize( const unsigned long int size )
{
mp_text->setSize(size);
SetSize();
@@ -71,7 +73,7 @@ void cLabel::setText(const cString& text)
SetSize();
}
void cLabel::setFont(const TextTypeEngine::cFont* font)
void cLabel::setFont( const TextTypeEngine::cFont* font )
{
mp_text->setFont((TextTypeEngine::cFont**)(&font));
}
@@ -113,7 +115,7 @@ const cString& cLabel::getText() const
// cWindow::RePos();
// }
/*virtual*/ void cLabel::RebuildLayout(const GUIHelpers::eLayout& layout)
/*virtual*/ void cLabel::RebuildLayout( const GUIHelpers::eLayout& layout )
{
SetSize();
}