mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-20 16:08:44 +00:00
A little bit of refactoring.
--HG-- branch : dfighter-tools
This commit is contained in:
parent
8c3702f826
commit
0af278e50a
1 changed files with 6 additions and 31 deletions
|
@ -518,13 +518,12 @@ namespace GUIEditor
|
||||||
return;
|
return;
|
||||||
std::string type = itr->second;
|
std::string type = itr->second;
|
||||||
|
|
||||||
|
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
||||||
|
if( e == NULL )
|
||||||
|
return;
|
||||||
|
|
||||||
if( type == "button_type" )
|
if( type == "button_type" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v;
|
std::string v;
|
||||||
v = NelButtonType::toString( value );
|
v = NelButtonType::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
|
@ -535,10 +534,6 @@ namespace GUIEditor
|
||||||
else
|
else
|
||||||
if( type == "text_justification" )
|
if( type == "text_justification" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v;
|
std::string v;
|
||||||
v = NelTxtJustification::toString( value );
|
v = NelTxtJustification::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
|
@ -549,10 +544,6 @@ namespace GUIEditor
|
||||||
else
|
else
|
||||||
if( type == "posref" )
|
if( type == "posref" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v = NelPosRef::toString( value );
|
std::string v = NelPosRef::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
return;
|
return;
|
||||||
|
@ -562,10 +553,6 @@ namespace GUIEditor
|
||||||
else
|
else
|
||||||
if( type == "posreftt" )
|
if( type == "posreftt" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v = NelPosRefTT::toString( value );
|
std::string v = NelPosRefTT::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
return;
|
return;
|
||||||
|
@ -612,10 +599,6 @@ namespace GUIEditor
|
||||||
else
|
else
|
||||||
if( type == "tooltip_parent" )
|
if( type == "tooltip_parent" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v = NelTTParent::toString( value );
|
std::string v = NelTTParent::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
return;
|
return;
|
||||||
|
@ -625,10 +608,6 @@ namespace GUIEditor
|
||||||
else
|
else
|
||||||
if( type == "bitmap_align" )
|
if( type == "bitmap_align" )
|
||||||
{
|
{
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
|
||||||
if( e == NULL )
|
|
||||||
return;
|
|
||||||
|
|
||||||
std::string v = NelBMAlign::toString( value );
|
std::string v = NelBMAlign::toString( value );
|
||||||
if( v.empty() )
|
if( v.empty() )
|
||||||
return;
|
return;
|
||||||
|
@ -637,13 +616,9 @@ namespace GUIEditor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CInterfaceElement *e = CWidgetManager::getInstance()->getElementFromId( currentElement );
|
CInterfaceGroup *g = e->getParent();
|
||||||
if( e != NULL )
|
if( g != NULL )
|
||||||
{
|
g->updateCoords();
|
||||||
CInterfaceGroup *g = e->getParent();
|
|
||||||
if( g != NULL )
|
|
||||||
g->updateCoords();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue