{
SysTryReturnVoidResult(NID_UI_CTRL, _pDimmingLayer != null, E_SYSTEM, "[E_SYSTEM] There is no Dimming Layer.");
- result r = E_SUCCESS;
-
- r = __pMsgboxPresenter->OnChangeLayout(orientation);
+ result r = __pMsgboxPresenter->OnChangeLayout(orientation);
SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
r = _pDimmingLayer->Rearrange();
float tempHeight = 0.0f;
GET_SHAPE_CONFIG(MESSAGEBOX::DEFAULT_WIDTH, orientation, defaultWidth);
- GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight);
GET_SHAPE_CONFIG(MESSAGEBOX::BOTTOM_HEIGHT, orientation, bottomHeight);
GET_SHAPE_CONFIG(MESSAGEBOX::MAX_HEIGHT, orientation, maxHeight);
// TitleText
if (__pMessageBox->HasTitle() == true)
{
+ GET_SHAPE_CONFIG(MESSAGEBOX::TITLE_HEIGHT, orientation, titleHeight);
__titleBounds.width = __textBounds.width;
__pTitleTextObject->SetBounds(__titleBounds);
__titleBounds.height = __pTitleTextObject->GetTotalHeightF();
}
- else
- {
- titleHeight = 0;
- }
// Text
__pBodyTextObject->SetBounds(__textBounds);
totalHeightExceptTextObj = titleHeight + (textTopMargin * 2.0f) + bottomHeight + (transTopMargin + transBottomMargin);
tempHeight = maxHeight - (totalHeightExceptTextObj + __textObjHeight);
- __textObjHeight = (tempHeight > 0.0f) ? __textObjHeight : __textObjHeight + tempHeight;
+ if (tempHeight < 0.0f)
+ {
+ __textObjHeight += tempHeight;
+ }
__textBounds.height = __textObjHeight;
{
float maxH = __pBodyTextObject->GetTotalHeightF();
- if (__pScroll != null)
- {
- __pMessageBox->AttachSystemChild(*__pScroll);
- }
- else
+ if (__pScroll == null)
{
__pScroll = _Scroll::CreateScrollN(*__pMessageBox,
SCROLL_DIRECTION_VERTICAL,
else if (__pScroll != null)
{
__pMessageBox->DetachSystemChild(*__pScroll);
- //delete __pScroll;
- //__pScroll = null;
+ delete __pScroll;
+ __pScroll = null;
}
for (int i = 0; i < __buttonNum; i++)
if (pButtonCore != null)
{
pButtonCore->SetTouchPressThreshold(0.16);
- __pMessageBox->AttachChild(pImpl->GetCore());
+ __pMessageBox->AttachChild(*pButtonCore);
}
}