_ControlManager* pControlManager = _ControlManager::GetInstance();
SysTryReturnResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "Failed to get root.");
+
+ _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+ if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+ {
+ if (pCurrentFrame)
+ {
+ SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "Frame is null");
+ }
+ return r;
+ }
+
FloatDimension screenSize;
FloatRectangle commandButtonBounds(0.0f, 0.0f, 0.0f, 0.0f);
return;
}
+ _ControlManager* pControlManager = _ControlManager::GetInstance();
+ SysTryReturnVoidResult(NID_UI_CTRL, pControlManager, E_SYSTEM, "[E_SYSTEM] Failed to get root.");
+
+ _Frame* pCurrentFrame = dynamic_cast<_Frame*>(pControlManager->GetCurrentFrame());
+ if (!pCurrentFrame || (pCurrentFrame && pCurrentFrame->GetShowMode() != FRAME_SHOW_MODE_FULL_SCREEN))
+ {
+ if (pCurrentFrame)
+ {
+ SysLog(NID_UI_CTRL, "FrameShowMode[%d]", pCurrentFrame->GetShowMode());
+ }
+ else
+ {
+ SysLog(NID_UI_CTRL, "Frame is null");
+ }
+ return;
+ }
+
float initialParentHeight = __initialParentHeight;
if (__pResizedPanel != __pParentPanel)
{
FloatRectangle scrollPanelBounds = __pParentPanel->GetBoundsF();
float gapY = 0.0f;
- _ControlManager* pControlManager = _ControlManager::GetInstance();
float displayedPanelHeight = 0.0f;
FloatDimension screenSize;
return;
}
- SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------.");
+ //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation starts~!!!!--------------------------.");
FloatRectangle absPanelRect = __pParentPanel->GetAbsoluteBoundsF(true);
FloatRectangle absEditRect = __pEdit->GetAbsoluteBoundsF(true);
if (__pEdit->GetEditStyle() & EDIT_STYLE_SINGLE_LINE)
{
newScrollPosition = scrollPosition -(absPanelRect.y -absEditRect.y);
- SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit.");
+ //SysLog(NID_UI_CTRL, "[single line edit] Move up till top boundary of edit.");
}
else
{
newScrollPosition = scrollPosition -(absPanelRect.y -absCursorBounds.y);
- SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
+ //SysLog(NID_UI_CTRL, "[multi-line edit] Move up till up position of cursor.");
}
- SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
+ //SysLog(NID_UI_CTRL, "move up scroll position from %f to %f", scrollPosition, newScrollPosition);
}
else
{
{
if ((absPanelRect.y + absPanelRect.height) > (absEditRect.y + absEditRect.height))
{
- SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region.");
+ //SysLog(NID_UI_CTRL, "[single line edit] already exists in exposed region.");
return;
}
{
if ((absCursorBounds.y + absCursorBounds.height) < (absPanelRect.y + absPanelRect.height))
{
- SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region.");
+ //SysLog(NID_UI_CTRL, "[multi-line edit]Cursor already exist in exposed region.");
return;
}
newScrollPosition = scrollPosition + ((absCursorBounds.y + absCursorBounds.height) -(absPanelRect.y + absPanelRect.height));
- SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
+ //SysLog(NID_UI_CTRL, "Move down till down position of cursor.");
}
- SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
+ //SysLog(NID_UI_CTRL, "move down scroll position from %f to %f", scrollPosition, newScrollPosition);
}
__pParentPanel->SetScrollPosition(newScrollPosition);
__pParentPanel->Invalidate();
- SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------.");
+ //SysLog(NID_UI_CTRL, "------------------------ScrollPosition recalculation Ends!!!!--------------------------.");
return;
}