I'm coding a game's GUI in SDL2 and c++, I'm using SDL_RenderCopy to load the buttons on to the screen, but don't know how to get buttons in specific spots eg. bottom left corner, slightly below center. How do I achieve this?
You need to manually calculate the positions.
Positioning itself in SDL happens using destination rects.
SDL_RenderCopy takes in a destination rectangle that you can use to scale and translate what you render.
Finding out the correct position is just a matter of math. For centering, you want to render at
(windowWidth / 2.0f - buttonWidth / 2.0f, windowHeight / 2.0f - buttonHeight / 2.0f). Simply offset the Y coordinate if you need to render a button just below. For bottom-left, set the X coordinate to 0, and don't divide the window height.