const Vector4 DEFAULT_POPUP_BACKGROUND( Vector4( .20f, 0.29f, 0.44f, 1.0f ) );
const Vector4 DEFAULT_POPUP_BUTTON_PRESSED( Vector4( 0.07f, 0.10f, 0.17f, 1.0f ) );
const Vector4 DEFAULT_BORDER_COLOR( Vector4( 0.36f, 0.45f, 0.59f, 1.0f ) );
-const Vector3 POPUP_BORDER( Vector3(1.0f, 1.0f, 0.0f) );
+const Vector4 DEFAULT_POPUP_ICON( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
+const Vector4 DEFAULT_POPUP_ICON_PRESSED( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
+const Vector4 DEFAULT_POPUP_TEXT( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
+const Vector4 DEFAULT_POPUP_TEXT_PRESSED( Vector4( 1.0f, 1.0f, 1.0f, 1.0f ) );
+const Vector3 POPUP_BORDER( Vector3( 1.0f, 1.0f, 0.0f ) );
/* Functionality in place to have the end buttons using different images to inner button.
* Supply a centre image and then a left and right image, the centre image can have straight ends while
// Popup: Tails
const char* DEFAULT_POPUP_TAIL_BOTTOM( DALI_IMAGE_DIR "popup_bubble_tail_bottom.png" );
const char* DEFAULT_POPUP_TAIL_BOTTOM_OUTLINE( DALI_IMAGE_DIR "popup_bubble_tail_bottom_line.png" );
+const float TAIL_Y_POSITION( -1.5f );
// Popup: Vertical Constraint
// TODO: Remove - this should come from application - it is not possible to get the
mCutPasteButtonsColor( DEFAULT_POPUP_BACKGROUND ),
mCutPasteButtonsPressedColor( DEFAULT_POPUP_BUTTON_PRESSED ),
mBorderColor( DEFAULT_BORDER_COLOR ),
+ mCutPasteIconsColor( DEFAULT_POPUP_ICON ),
+ mCutPasteIconsPressedColor( DEFAULT_POPUP_ICON_PRESSED ),
+ mCutPasteTextsColor( DEFAULT_POPUP_TEXT ),
+ mCutPasteTextsPressedColor( DEFAULT_POPUP_TEXT_PRESSED ),
mSelectOptionPriority(1),
mSelectAllOptionPriority(2),
mCutOptionPriority(3),
return label;
}
-ImageActor TextInputPopup::CreateOptionIcon( Image iconImage )
+ImageActor TextInputPopup::CreateOptionIcon( Image iconImage, const Vector4& color )
{
ImageActor icon = ImageActor::New( iconImage );
icon.SetParentOrigin( ParentOrigin::TOP_CENTER );
icon.SetAnchorPoint( AnchorPoint::TOP_CENTER );
icon.SetPosition( 0.0f, ICON_POSITION_OFFSET );
+ icon.SetColor( color );
return icon;
}
divider.SetParentOrigin( ParentOrigin::TOP_LEFT );
divider.SetAnchorPoint( AnchorPoint::TOP_LEFT );
divider.SetPosition( Vector3( mContentSize.width, POPUP_TEXT_OFFSET.y, 0.0f ) );
+ divider.SetColor( mBorderColor );
// Keep track of all the dividers. As their height's need to be updated to the max. of all
// buttons currently added.
mDividerContainer.push_back(divider);
// 1. Add text.
TextStyle style;
style.SetFontPointSize( PointSize( DEFAULT_UI_FONT_SIZE ) );
+ style.SetTextColor( mCutPasteTextsColor );
MarkupProcessor::StyledTextArray styledCaption;
styledCaption.push_back( MarkupProcessor::StyledText( Text( caption ), style ) );
Toolkit::TextView label = CreateOptionText( styledCaption );
button.SetPosition( Vector3( mContentSize.width, POPUP_BORDER.y, 0.0f ) );
// 2. Add icon
- ImageActor icon = CreateOptionIcon( iconImage );
+ ImageActor icon = CreateOptionIcon( iconImage, mCutPasteIconsColor );
iconTextContainer.Add( icon );
Actor iconPressedTextContainer = Actor::New();
iconPressedTextContainer.SetDrawMode( DrawMode::OVERLAY );
+ style.SetTextColor( mCutPasteTextsPressedColor );
+ styledCaption.clear();
+ styledCaption.push_back( MarkupProcessor::StyledText( Text( caption ), style ) );
Toolkit::TextView pressedLabel = CreateOptionText( styledCaption );
pressedLabel.SetSize( Min( buttonSize, TEXT_LABEL_MAX_SIZE ) );
- ImageActor pressedIcon = CreateOptionIcon( iconImage );
+ ImageActor pressedIcon = CreateOptionIcon( iconImage, mCutPasteIconsPressedColor );
iconPressedTextContainer.Add( pressedImageBg );
iconPressedTextContainer.Add( pressedLabel );
{
mRootActor.SetSensitive( true );
- mTail.SetPosition(Vector3( mPopupTailXPosition, 0.0f, 0.0f));
+ mTail.SetPosition(Vector3( mPopupTailXPosition, TAIL_Y_POSITION, 0.0f));
if(mAnimation)
{
return mCutPasteButtonsPressedColor;
}
+void TextInputPopup::SetCutPastePopUpBorderColor( const Vector4& color )
+{
+ mBorderColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpBorderColor() const
+{
+ return mBorderColor;
+}
+
+void TextInputPopup::SetCutPastePopUpIconColor( const Vector4& color )
+{
+ mCutPasteIconsColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpIconColor() const
+{
+ return mCutPasteIconsColor;
+}
+
+void TextInputPopup::SetCutPastePopUpIconPressedColor( const Vector4& color )
+{
+ mCutPasteIconsPressedColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpIconPressedColor()
+{
+ return mCutPasteIconsPressedColor;
+}
+
+void TextInputPopup::SetCutPastePopUpTextColor( const Vector4& color )
+{
+ mCutPasteTextsColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpTextColor()
+{
+ return mCutPasteTextsColor;
+}
+
+void TextInputPopup::SetCutPastePopUpTextPressedColor( const Vector4& color )
+{
+ mCutPasteTextsPressedColor = color;
+}
+
+const Vector4& TextInputPopup::GetCutPastePopUpTextPressedColor()
+{
+ return mCutPasteTextsPressedColor;
+}
+
void TextInputPopup::TogglePopUpButtonOnOff( TextInputPopup::Buttons requiredButton, bool enable )
{
bool match ( false );
mRootActor.Add( mTail );
Self().Add(mLayer);
+
+ mLayer.Lower();
}
void TextInputPopup::SetPopupBoundary( const Rect<float>& boundingRectangle )