Hello people, I developed a chess game using SFML and now I'm stuck on trying to add a menu bar at the top (with buttons). I am asking you guys for help on how should I approach this problem.
From my understanding, I need an extra panel on top of my preexisting window, wherein I will add the buttons under a certain layout. So maybe extend the height of my window, and draw my chess board with a vertical offset downwards? But then, in my chess game I use the
event.mouseButton.y
coordinates all the time so will I have to subtract the height offset? That seems like an incorrect approach.
What is a good approach to this problem, can anyone guide me? I used
RenderWindow window(VideoMode(640,640), "Chess Game", style::Titlebar | Style::Close)
to generate my window object.