float transTopMargin = 0.0f;
float transBottomMargin = 0.0f;
float titleHeight = 0.0f;
- float noTitleHeigth = 0.0f;
+ float animationTopMargin = 0.0f;
float animationWidth = 0.0f;
float textTopGap = 0.0f;
float textBottomGap = 0.0f;
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, orientation, transBottomMargin);
- GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, noTitleHeigth);
GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth);
GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, orientation, textTopGap);
GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, orientation, textBottomGap);
- GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
GET_SHAPE_CONFIG(MESSAGEBOX::MIN_HEIGHT, orientation, minHeight);
if (HasTitle())
{
- noTitleHeigth = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
else
{
- titleHeight = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
if (!HasText())
float totalH = titleHeight
- + noTitleHeigth
+ + animationTopMargin
+ animationWidth
+ textTopGap
+ textBottomGap
float defaultWidth = 0.0f;
float titleHeight = 0.0f;
float animationWidth = 0.0f;
- float noTitleProcessTop = 0.0f;
+ float animationTopMargin = 0.0f;
float transTopMargin = 0.0f;
_ControlOrientation orientation;
GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
- GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth);
- GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, noTitleProcessTop);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
if (HasTitle())
{
- animationBounds = FloatRectangle((defaultWidth - animationWidth) / 2.0f, titleHeight + transTopMargin, animationWidth, animationWidth);
+ GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
else if (HasText() || HasButton())
{
- animationBounds = FloatRectangle((defaultWidth - animationWidth) / 2.0f, noTitleProcessTop + transTopMargin, animationWidth, animationWidth);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
else
{
- animationBounds = FloatRectangle((GetBoundsF().width - animationWidth) / 2.0f, noTitleProcessTop + transTopMargin, animationWidth, animationWidth);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
+ animationBounds = FloatRectangle((defaultWidth - animationWidth) / 2.0f,
+ titleHeight + animationTopMargin + transTopMargin,
+ animationWidth, animationWidth);
+
return animationBounds;
}
r = GetLastResult();
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
- if(GetCore().HasTitle() || GetCore().HasText() || GetCore().HasButton())
- {
- float maxHeight = 0.0f;
- float defaultWidth = 0.0f;
+ float maxHeight = 0.0f;
+ float defaultWidth = 0.0f;
- GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight);
- GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
+ GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight);
+ GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
- bounds.width = defaultWidth;
+ bounds.width = defaultWidth;
- float totalH = -1.0f;
- totalH = GetCore().GetTotalHeight();
+ float totalH = -1.0f;
+ totalH = GetCore().GetTotalHeight();
- if (totalH > maxHeight)
- {
- bounds.height = maxHeight;
- }
- else
- {
- bounds.height = totalH;
- }
+ if (totalH > maxHeight)
+ {
+ bounds.height = maxHeight;
+ }
+ else
+ {
+ bounds.height = totalH;
}
}
float animationWidth = 0.0f;
float textTopMargin = 0.0f;
float textBottomMargin = 0.0f;
- float noTitleHeight = 0.0f;
+ float animationTopMargin = 0.0f;
_ControlOrientation orientation;
orientation = __pProgressPopup->GetOrientation();
- GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
- GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, noTitleHeight);
GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
if (__pProgressPopup->HasTitle())
{
- noTitleHeight = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
else
{
- titleHeight = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
if (__pProgressPopup->HasText())
// Calculate Text bounds
__textBounds.SetBounds(textLeftMargin + transLeftMargin,
- titleHeight + textTopMargin + transTopMargin + animationWidth + noTitleHeight,
+ titleHeight + textTopMargin + transTopMargin + animationWidth + animationTopMargin,
defaultWidth - (textLeftMargin + textRightMargin + transLeftMargin + transRightMargin),
maxHeight - titleHeight - bottomHeight - animationWidth);
__pAnimation->GetVisualElement()->SetOpacity(0.6f);
__pAnimation->SetBounds(FloatRectangle(0.0f, 0.0f, animationBounds.width, animationBounds.height));
}
- else //(__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton())
+ else
{
__pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
}
if (__pTitleTextObject != null)
{
r = SetFontInfo(FONT_STYLE_PLAIN, titleTextSize);
- SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Failed to set font.", GetErrorMessage(r));
+ SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
__pTitleTextObject->SetFont(_pFont, 0, __pTitleTextObject->GetTextLength());
__pTitleTextObject->SetBounds(__titleBounds);
__pLabel->SetTextColor(__pProgressPopup->GetTextColor());
}
+ //fall thtrough
+CATCH:
+ delete pCanvas;
+
return;
}
float btnTopMargin = 0.0f;
float transTopMargin = 0.0f;
float animationWidth = 0.0f;
- float noTitleHeight = 0.0f;
+ float animationTopMargin = 0.0f;
float textTopMargin = 0.0f;
float textBottomMargin = 0.0f;
orientation = __pProgressPopup->GetOrientation();
- GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
GET_SHAPE_CONFIG(POPUP::BG_IMAGE_TRANSPARENT_TOP_MARGIN, orientation, transTopMargin);
GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WIDTH, orientation, animationWidth);
- GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, noTitleHeight);
GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_TOP_MARGIN, orientation, textTopMargin);
GET_SHAPE_CONFIG(POPUP::PROCESS_TEXT_BOTTOM_MARGIN, orientation, textBottomMargin);
if (__pProgressPopup->HasTitle())
{
- noTitleHeight = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::TITLE_HEIGHT, orientation, titleHeight);
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
else
{
- titleHeight = 0.0f;
+ GET_SHAPE_CONFIG(POPUP::PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, orientation, animationTopMargin);
}
if (!__pProgressPopup->HasText())
{
textTopMargin = 0.0f;
- textBottomMargin = 0.0f;
+ textBottomMargin = textBottomMargin * 1.5f;
}
width = defaultWidth - (btnSideMargin1 * 2.0f);
y = transTopMargin
+ titleHeight
- + noTitleHeight
+ + animationTopMargin
+ animationWidth
+ textTopMargin
+ textBottomMargin
{
FloatRectangle animationBounds = __pProgressPopup->GetAnimationRect();
- if (__pProgressPopup->HasTitle() || __pProgressPopup->HasText() || __pProgressPopup->HasButton())
+ if (__pAnimation != null)
{
- if (__pAnimation != null)
- {
- __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
- }
+ __pAnimation->SetBounds(FloatRectangle(animationBounds.x, animationBounds.y, animationBounds.width, animationBounds.height));
}
if (__pProgressPopup->HasTitle())
DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 20);
DECLARE_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 21);
DECLARE_SHAPE_CONFIG(BODY_TEXT_HEIGHT, 22);
+ DECLARE_SHAPE_CONFIG(PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, 23);
DECLARE_END_UI_CONFIG(POPUP);
#endif //_FUI_RESOURCE_POPUP_CONFIG_H_
ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WIDTH, 63); //20130403
ADD_SHAPE_CONFIG(PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, 34); //20130403
+ ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WITH_TITLE_TOP_MARGIN, 9); //20130403
ADD_SHAPE_CONFIG(PROCESS_TEXT_TOP_MARGIN, 9); //20130403
ADD_SHAPE_CONFIG(PROCESS_TEXT_BOTTOM_MARGIN, 20); //20121113
ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 16); //20130122
}
END_UI_CONFIG_MODE(720x1280);
-
- START_UI_CONFIG_MODE(1280x720);
- {
- ADD_DIMENSION_CONFIG(MIN_SIZE, 0, 0);
- ADD_DIMENSION_CONFIG(MIN_SIZE_WITH_TITLE, 72, 128); // 20130116
-
- ADD_SHAPE_CONFIG(TITLE_HEIGHT, 78); //20130403
- ADD_SHAPE_CONFIG(TITLE_TEXT_SIZE, 50);
- ADD_SHAPE_CONFIG(TITLE_TEXT_TOP_MARGIN, 20); //20130403
- ADD_SHAPE_CONFIG(TITLE_TEXT_LEFT_MARGIN, 29); //20130403
- ADD_SHAPE_CONFIG(TITLE_TEXT_RIGHT_MARGIN, 29); //20130403
-
- ADD_SHAPE_CONFIG(TOP_BORDER, 6);
- ADD_SHAPE_CONFIG(BOTTOM_BORDER, 30);
- ADD_SHAPE_CONFIG(SIDE_BORDER, 12);
-
- ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_TOP_MARGIN, 14);
- ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_BOTTOM_MARGIN, 34);
- ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_LEFT_MARGIN, 16);
- ADD_SHAPE_CONFIG(BG_IMAGE_TRANSPARENT_RIGHT_MARGIN, 16);
- ADD_SHAPE_CONFIG(OUTLINE_BORDER, 3);
-
- ADD_SHAPE_CONFIG(PROCESS_ANIMATION_WIDTH, 63); //20130403
- ADD_SHAPE_CONFIG(PROCESS_ANIMATION_NO_TITLE_TOP_MARGIN, 34); //20130403
-
- ADD_SHAPE_CONFIG(PROCESS_TEXT_TOP_MARGIN, 9); //20130403
- ADD_SHAPE_CONFIG(PROCESS_TEXT_BOTTOM_MARGIN, 20);
-
- ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_TOP_MARGIN, 14); //20130122
- ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_BOTTOM_MARGIN, 34); //20130122
- ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_LEFT_MARGIN, 16); //20130122
- ADD_SHAPE_CONFIG(BG_OUTLINE_EFFECT_RIGHT_MARGIN, 16); //20130122
- }
- END_UI_CONFIG_MODE(1280x720);
-
}
END_UI_CONFIG(POPUP);