diff options
author | Tim Angus <tim@ngus.net> | 2004-05-19 22:42:02 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-05-19 22:42:02 +0000 |
commit | 8f6fba34633ee7039655cb60497c3d71c629b2ff (patch) | |
tree | 408c21910315c44c8bd4aedd958402f6c43ee1b6 /src | |
parent | 95bc884481782639f876671336e404a1b83f5d8c (diff) |
* Fix to the "can't select last menu item" bug
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/ui_shared.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c index 002d9219..8bc2c1d4 100644 --- a/src/ui/ui_shared.c +++ b/src/ui/ui_shared.c @@ -3953,13 +3953,13 @@ void Item_ListBox_Paint(itemDef_t *item) { DC->drawRect(x, y, listPtr->elementWidth-1, listPtr->elementHeight-1, item->window.borderSize, item->window.borderColor); } + listPtr->endPos++; size -= listPtr->elementWidth; if (size < listPtr->elementWidth) { listPtr->drawPadding = size; //listPtr->elementWidth - size; break; } x += listPtr->elementWidth; - listPtr->endPos++; // fit++; } } else { @@ -4067,19 +4067,19 @@ void Item_ListBox_Paint(itemDef_t *item) { DC->fillRect(x + 2, y + 2, item->window.rect.w - SCROLLBAR_SIZE - 4, listPtr->elementHeight, item->window.outlineColor); } + listPtr->endPos++; size -= listPtr->elementHeight; if (size < listPtr->elementHeight) { listPtr->drawPadding = listPtr->elementHeight - size; break; } - listPtr->endPos++; y += listPtr->elementHeight; // fit++; } } } - //TA: fix to off-by-one bug + //TA: FIXME: hacky fix to off-by-one bug listPtr->endPos--; } |