Amegma / Galaxy-Attack

An inspiration of the original Atari Space Invaders game built in pygame :space_invader: :video_game:
MIT License
40 stars 20 forks source link

feat(#19): Add support for toggle full screen mode #23

Closed lyu4321 closed 2 years ago

lyu4321 commented 2 years ago

Closes #19

This PR adds the option to toggle between the default size (750 x 750) and full screen mode by pressing [f].

Mayank0255 commented 2 years ago

In the mouse when I play the game in fullscreen it get's out of the screen a little and the pixels of the ship get stuck there, as you can see in the image below,

This thing works fine with the keyboard as you cannot go beyond the frame for a millisecond. image Other thing is that the toggle works perfectly but I want you to put the toggle in the maximize/minimize button on the application instead of using another key.

Let me know if you get stuck somewhere, if you want to discuss about this or anything else then you can ping me here or on my discord (Shadowsaver#9665)

lyu4321 commented 2 years ago

@Mayank0255 Thanks for the feedback! For the maximize/minimize button, do you mean here?

image

Because the problem is that this bar won't show in full screen mode.

Or should I add a button to the screen? If so, where would you like it to be placed?

Mayank0255 commented 2 years ago

@lyu4321 for that the general scenario is that when the game is in small screen then the you can use the button to maximize it, then when a user wants to exit the fullscreen and go back to the small screen then the [esc] key should be enabled to just going to small screen from fullscreen

lyu4321 commented 2 years ago

@Mayank0255 Hi I've added a fix for the pixels issue and as we discussed previously, I'll be creating a separate issue for the maximize/minimize implementation. Please let me know if there's anything else to be changed, thank you!

Mayank0255 commented 2 years ago

@lyu4321 actually my laptop is not working suddenly, so I won't be able to test it out but I think you might have done the job so I will be merging it

Mayank0255 commented 2 years ago

@lyu4321,

I had a request to make that as Hacktoberfest has only one week left, I am planning to do a tweet on twitter at the end of the month congratulating all the contributors and giving them a special mention for there efforts,

To do this I would like you to do the steps below so that it becomes easy for me to document,

  1. Follow me on Mayank0255
  2. Text me on twitter itself so that I have your twitter handles.
  3. In the text mention three things-
    • GitHub Handle Link
    • Name of the project you worked with me

I hope to receive a favorable reply 🎉

lyu4321 commented 2 years ago

@Mayank0255 Thanks for merging the changes. Unfortunately, I don't have a Twitter account :( If you want, you could mention my GitHub name.