There are a few additional changes we will need to make to our game.hpp file. In addition to our UIButton class, we will need to add a UISprite class definition file. The UISprite is just a plain, ordinary image drawn in canvas space. It will not have any functionality on top of just being a sprite rendered as a UI element. Here is what the definition looks like:
class UISprite {
public:
bool m_Active;
SDL_Texture *m_SpriteTexture;
SDL_Rect m_dest = {.x = 0, .y = 0, .w = 128, .h = 32 };
UISprite( int x, int y, char* file_name );
void RenderUI();
};
Like the button, it has an active state that's represented by the m_Active attribute. If this value is false, the sprite will not render. It also has a sprite texture and a destination attribute that tells the renderer what to draw and where to draw it:
SDL_Texture *m_SpriteTexture...