+ // This fixes the position of the third column of the inventory and capsule menus.
+ if (thirdColumnHack && selected % cols == 2) {
+ cursorOffset += math::Vector<int>(font->CharWidth() * thirdColumnHack, 0);
+ }
+ switch (state) {
+ case STATE_INACTIVE:
+ break;
+ case STATE_ACTIVE:
+ cursor->Draw(dest, position + cursorOffset);
+ break;
+ case STATE_SELECTED:
+ selectedCursor->Draw(dest, position + cursorOffset);
+ break;
+ case STATE_DUAL:
+ cursor->Draw(dest, position + cursorOffset
+ - math::Vector<int>(selectedCursor->Width(), 0));
+ if (secondarySelection >= start && secondarySelection <= end) {
+ math::Vector<int> secondaryOffset(
+ (secondarySelection % cols) * (ColWidth() + colGap) - cursor->Width(),
+ ((secondarySelection - start) / cols) * RowHeight());
+ selectedCursor->Draw(dest, position + secondaryOffset);
+ }
+ break;
+ }