fix screensho
This commit is contained in:
parent
6e9c653b7d
commit
1dd8470924
|
@ -13,7 +13,7 @@ Oh no, my os doesn't comme with minesweeper preinstalled, let's make it myself.
|
|||
- b : switch to beginner difficulty
|
||||
- i : switch to intermediate difficulty
|
||||
- e : switch to expert difficulty
|
||||
- s : take a screenshot (not working everywhere, not sure why)
|
||||
- s : take a screenshot
|
||||
|
||||
# building
|
||||
|
||||
|
|
16
main.c
16
main.c
|
@ -271,10 +271,16 @@ int main(void)
|
|||
|
||||
fill_game();
|
||||
|
||||
int take_screenshot = 0;
|
||||
while (!WindowShouldClose()) {
|
||||
if (IsWindowResized())
|
||||
screen_resize_handle();
|
||||
|
||||
if (take_screenshot) {
|
||||
TakeScreenshot("minesweeper-screenshot.png");
|
||||
take_screenshot = 0;
|
||||
}
|
||||
|
||||
BeginDrawing();
|
||||
{
|
||||
ClearBackground((Color) {
|
||||
|
@ -282,15 +288,15 @@ int main(void)
|
|||
});
|
||||
|
||||
|
||||
if (IsKeyPressed(KEY_S)) {
|
||||
TakeScreenshot("minesweeper-screenshot.png");
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_A)) {
|
||||
CloseWindow();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
if (IsKeyPressed(KEY_S)) {
|
||||
take_screenshot = 1;
|
||||
}
|
||||
|
||||
int resize = 0;
|
||||
if (IsKeyPressed(KEY_I)) {
|
||||
current_game_type = INTERMEDIATE;
|
||||
|
@ -467,7 +473,7 @@ int main(void)
|
|||
if (collision(camera_coord, camera_texture,
|
||||
mouse_x, mouse_y))
|
||||
{
|
||||
TakeScreenshot("minesweeper-screenshot.png");
|
||||
take_screenshot = 1;
|
||||
}
|
||||
if (collision(diff_button[0], fixed_tile_texture,
|
||||
mouse_x, mouse_y))
|
||||
|
|
Loading…
Reference in New Issue