+void Font::DrawNumberRight(int number, SDL_Surface *dest, const Vector<int> &positionIn, int digits) const {
+ if (!sprite) return;
+
+ Vector<int> position(positionIn);
+ if (digits > 0) {
+ position.X() -= digits * CharWidth();
+ } else if (number == 0) {
+ position.X() -= CharWidth();
+ } else {
+ for (int i = number; i > 0; i /= 10) {
+ position.X() -= CharWidth();
+ }
+ }
+
+ DrawNumber(number, dest, position, digits);
+}
+