fix menus with only one entry

This commit is contained in:
Glenn Maynard
2004-01-23 08:13:44 +00:00
parent c681f61af9
commit 08430d2123
+5 -1
View File
@@ -70,7 +70,11 @@ ScreenMiniMenu::ScreenMiniMenu( Menu* pDef, ScreenMessage SM_SendOnOK, ScreenMes
MenuRowInternal& line = m_Def.rows[i];
m_iCurAnswers[i] = 0;
float fY = SCALE( i, 0.f, m_Def.rows.size()-1.f, CENTER_Y-fHeightOfAll/2, CENTER_Y+fHeightOfAll/2 );
float fY;
if( m_Def.rows.size() > 1 )
fY = SCALE( i, 0.f, m_Def.rows.size()-1.f, CENTER_Y-fHeightOfAll/2, CENTER_Y+fHeightOfAll/2 );
else
fY = CENTER_Y;
m_textLabel[i].LoadFromFont( THEME->GetPathToF("Common normal") );
m_textLabel[i].SetText( line.name );