diff --git a/cocos/2d/CCMenu.cpp b/cocos/2d/CCMenu.cpp index 66c0c4c78e..8427033028 100644 --- a/cocos/2d/CCMenu.cpp +++ b/cocos/2d/CCMenu.cpp @@ -417,7 +417,7 @@ void Menu::alignItemsInColumnsWithArray(const ValueVector& rows) // check if too many rows/columns for available menu items CCASSERT(! columnsOccupied, "columnsOccupied should be 0."); - Size winSize = Director::getInstance()->getWinSize(); + Size winSize = getContentSize(); row = 0; rowHeight = 0; @@ -519,7 +519,7 @@ void Menu::alignItemsInRowsWithArray(const ValueVector& columns) // check if too many rows/columns for available menu items. CCASSERT(! rowsOccupied, "rowsOccupied should be 0."); - Size winSize = Director::getInstance()->getWinSize(); + Size winSize = getContentSize(); column = 0; columnWidth = 0;