mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Some fixes.
--HG-- branch : dev
This commit is contained in:
@@ -620,7 +620,13 @@ bool UITextView::setAttribute( const NodeAttribute& attribute, const Uint32& sta
|
||||
}
|
||||
|
||||
setFontStyle( flags );
|
||||
} else if ( "wordwrap" == name || "word_wrap" == name ) {
|
||||
if ( attribute.asBool() )
|
||||
mFlags |= UI_WORD_WRAP;
|
||||
else
|
||||
mFlags &= ~UI_WORD_WRAP;
|
||||
|
||||
autoShrink();
|
||||
} else if ( "fontoutlinethickness" == name ) {
|
||||
SAVE_NORMAL_STATE_ATTR( String::toStr( PixelDensity::dpToPx( getOutlineThickness() ) ) )
|
||||
|
||||
|
||||
@@ -699,7 +699,7 @@ bool UIWidget::setAttribute( const NodeAttribute& attribute, const Uint32& state
|
||||
|
||||
if ( String::startsWith( attribute.getValue(), "#" ) ) {
|
||||
setAttribute( NodeAttribute( "backgroundcolor", attribute.getValue() ) );
|
||||
} else if ( NULL != ( res = DrawableSearcher::searchByName( name ) ) ) {
|
||||
} else if ( NULL != ( res = DrawableSearcher::searchByName( attribute.getValue() ) ) ) {
|
||||
setBackgroundDrawable( state, res, res->getDrawableType() == Drawable::SPRITE );
|
||||
}
|
||||
} else if ( "backgroundcolor" == name ) {
|
||||
@@ -897,8 +897,6 @@ bool UIWidget::setAttribute( const NodeAttribute& attribute, const Uint32& state
|
||||
notifyLayoutAttrChange();
|
||||
} else if ( "clip" == cur ) {
|
||||
clipEnable();
|
||||
} else if ( "word_wrap" == cur || "wordwrap" == cur ) {
|
||||
setFlags( UI_WORD_WRAP );
|
||||
} else if ( "multi" == cur ) {
|
||||
setFlags( UI_MULTI_SELECT );
|
||||
} else if ( "auto_padding" == cur || "autopadding" == cur ) {
|
||||
|
||||
@@ -32,12 +32,14 @@
|
||||
|
||||
namespace EE { namespace UI {
|
||||
|
||||
static bool sBaseListCreated = false;
|
||||
|
||||
UIWidgetCreator::WidgetCallbackMap UIWidgetCreator::widgetCallback = UIWidgetCreator::WidgetCallbackMap();
|
||||
|
||||
UIWidgetCreator::RegisteredWidgetCallbackMap UIWidgetCreator::registeredWidget = UIWidgetCreator::RegisteredWidgetCallbackMap();
|
||||
|
||||
void UIWidgetCreator::createBaseWidgetList() {
|
||||
if ( registeredWidget.empty() ) {
|
||||
if ( !sBaseListCreated ) {
|
||||
registeredWidget["widget"] = UIWidget::New;
|
||||
registeredWidget["linearlayout"] = UILinearLayout::NewVertical;
|
||||
registeredWidget["relativelayout"] = UIRelativeLayout::New;
|
||||
@@ -75,6 +77,8 @@ void UIWidgetCreator::createBaseWidgetList() {
|
||||
registeredWidget["vbox"] = UILinearLayout::NewVertical;
|
||||
registeredWidget["input"] = UITextInput::New;
|
||||
registeredWidget["inputpassword"] = UITextInputPassword::New;
|
||||
|
||||
sBaseListCreated = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user