Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - tarstevs

Pages: [1]
1
The below application does nothing but set the initial state for a chess game. Everything works as expected so long as I only resize the window in such a way that the window width >= the window height. My question relates to that resizing. I put the question at the bottom so that I could first share the code and highlight some relevant parts therein.

Here is the full application:
https://github.com/tarstevs/chess

Here are some relevant places in the application:
The initial game state is prepared by drawing to an instance of RenderTexture (see board::render_board in board.cpp).

When everything is ready, the texture is drawn to the window with an instance of RenderWindow (see board::draw_board in board.cpp).

The game loop is in game_loop.cpp. Lines 46 and 49 are the calls to the board::render_board and board::draw_board methods mentioned above.

Here is the question I have:
What can I change so that the chess board doesn't disapear when the window is resized such that the width of the window is less than the height of the window?

Pages: [1]
anything