Skip to content

Commit

Permalink
set x_offset to always be zero to stop board from dissapearing
Browse files Browse the repository at this point in the history
  • Loading branch information
tarstevs committed May 3, 2022
1 parent b9bebba commit ef6ee49
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/board.cpp
Expand Up @@ -114,15 +114,11 @@ void board::init_() {
*/


if (windowSize.x - windowSize.y < 0) {
y_offset = static_cast<float>(windowSize.y - windowSize.x) / 2.f;
square_size = static_cast<float>(windowSize.x) / 8.f;
render_texture.create(windowSize.x, windowSize.y);
} else {
x_offset = static_cast<float>(windowSize.x - windowSize.y) / 2.f;
square_size = static_cast<float>(windowSize.y) / 8.f;
render_texture.create(windowSize.x, windowSize.y);
}

// x_offset = static_cast<float>(windowSize.x - windowSize.y) / 2.f;
x_offset = 0;
square_size = static_cast<float>(windowSize.y) / 8.f;
render_texture.create(windowSize.x, windowSize.y);

set_open_sans_font();
set_alg_notation_letter_map();
Expand Down

0 comments on commit ef6ee49

Please sign in to comment.