From b76413137ecd12f554836e158024940c27214b28 Mon Sep 17 00:00:00 2001 From: Aloshi Date: Fri, 23 Aug 2013 11:21:00 -0500 Subject: [PATCH] Hopefully fix trying to showing too many entries in TextListComponent. --- src/components/TextListComponent.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/TextListComponent.h b/src/components/TextListComponent.h index 7de53ce8d..1c1f13f52 100644 --- a/src/components/TextListComponent.h +++ b/src/components/TextListComponent.h @@ -125,9 +125,8 @@ void TextListComponent::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);