apply button bitmap maker
authorMyung Jin Kim <critical.kim@samsung.com>
Thu, 30 May 2013 10:48:08 +0000 (19:48 +0900)
committerMyung Jin Kim <critical.kim@samsung.com>
Thu, 30 May 2013 10:48:08 +0000 (19:48 +0900)
Change-Id: I59645d54a0904afc888d630c3e95fe5912c41859

src/ui/controls/FUiCtrl_ButtonImpl.cpp

index bad3b60..4c34840 100644 (file)
@@ -778,6 +778,36 @@ protected:
                        }
                }
 
+               if (pControl->GetElement(L"HighlightedBitmapPath", elementString))
+               {
+                       Bitmap* pHighlightedBitmap = null;
+                       FloatPoint position;
+                       pHighlightedBitmap = LoadBitmapN(elementString);
+                       if (pControl->GetElement(L"HighlightedBitmapX", elementString))
+                       {
+                               position.x = _CoordinateSystemUtils::ConvertToFloat(elementString);
+                               if ((position.x < 0.0f) || (position.x > ((Control*) (GetContainer()))->GetBoundsF().width - ((Control*) (GetContainer()))->GetBoundsF().x))
+                               {
+                                       position.x = 0.0f;
+                               }
+                       }
+
+                       if (pControl->GetElement(L"HighlightedBitmapY", elementString))
+                       {
+                               position.y = _CoordinateSystemUtils::ConvertToFloat(elementString);
+                               if (position.y < 0.0f || (position.y > ((Control*) (GetContainer()))->GetBoundsF().height - ((Control*) (GetContainer()))->GetBoundsF().y))
+                               {
+                                       position.y = 0.0f;
+                               }
+                       }
+
+                       if (pHighlightedBitmap != null)
+                       {
+                               pButton->SetHighlightedBitmap(position, *pHighlightedBitmap);
+                               delete pHighlightedBitmap;
+                       }
+               }
+
                if (pControl->GetElement(L"NormalBGBitmapPath", elementString))
                {
                        Bitmap* pNormalBGBitmap = null;
@@ -811,6 +841,17 @@ protected:
                        }
                }
 
+               if (pControl->GetElement(L"DisabledBGBitmapPath", elementString))
+               {
+                       Bitmap* pDisabledBGBitmap = null;
+                       pDisabledBGBitmap = LoadBitmapN(elementString);
+                       if (pDisabledBGBitmap != null)
+                       {
+                               pButton->SetDisabledBackgroundBitmap(*pDisabledBGBitmap);
+                               delete pDisabledBGBitmap;
+                       }
+               }
+
                if (pControl->GetElement(L"highlightedTextColor", elementString))
                {
                        ConvertStringToColor(elementString, color);