+ // Third column hack!
+ // This fixes the position of the "DROP" item in the inventory menu.
+ if (selected % cols == 2) {
+ cursorOffset += geometry::Vector<int>(font->CharWidth(), 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
+ - geometry::Vector<int>(selectedCursor->Width(), 0));
+ if (secondarySelection >= start && secondarySelection <= end) {
+ geometry::Vector<int> secondaryOffset(
+ (secondarySelection % cols) * (ColWidth() + colGap) - cursor->Width(),
+ ((secondarySelection - start) / cols) * RowHeight());
+ selectedCursor->Draw(dest, position + secondaryOffset);
+ }
+ break;
+ }