Skip to content

Commit

Permalink
Hopefully fix trying to showing too many entries in TextListComponent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Aloshi committed Aug 23, 2013
1 parent c7a1500 commit b764131
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/TextListComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ void TextListComponent<T>::render(const Eigen::Affine3f& parentTrans)
int startEntry = 0;

//number of entries that can fit on the screen simultaniously
int screenCount = (Renderer::getScreenHeight() - cutoff) / entrySize;
screenCount -= 1;

int screenCount = (int)mSize.y() / entrySize;

if((int)mRowVector.size() >= screenCount)
{
startEntry = mSelection - (int)(screenCount * 0.5);
Expand Down

0 comments on commit b764131

Please sign in to comment.