Oh sweetie, I'm so sorry.
Lots of hugs and love to Rocky as you make all the time with him fun and comfortable.
Shadow takes pain pills sometimes because she has arthritis, and benign fatty tumor in what remains of her hind leg muscle (she's like skin and bone in her rear end.) For a long time she was not only limping a lot, but she was frantically pacing and not able to lie down, kind of like what you mentioned with Rocky. She'd come and put her head on your knee. We kind of figured out over time that this was her "I'm in pain!" signal. Now when she starts acting anxious we'll give her a pain pill and once it kicks in, it seems to help her feel better. So I'm very hopeful that it will alleviate some of the discomfort that Rocky is feeling.
It's really hard to have an older dog who can't enjoy all of the same things as before (for Shadow, running around and chasing the hose, chasing bubbles, and long walks are out now, and she's lost her hearing so singing to her in a funny voice doesn't do it anymore), but I've realized over time that there are still a lot of things that do make her feel loved and happy (stroking her, the whole family being in the same room together, funny body language that seems to make her amused, large visual signals to make up for the verbal commands she can no longer hear.) That's awesome that swimming is still enjoyable and is easier than walking.
I hope that you have a long time with Rocky, but I know that he will feel loved no matter how long you are together.