Skip to content

Conversation

@bartez33a
Copy link
Contributor

Created skeleton of menu with different levels (e.g. main menu, options).
At this moment it allows to start the game, go to Options menu (which is empty for now) and exit the game.

bartez33a and others added 30 commits September 20, 2023 21:17
deleted tank_shot.flac. It should be added via git-lfs
added workflow_dispatch
restored to previous state
added .editorconfig to gitignore
- created class GameManager
- created class MainMenu
- created Notes about SFML
- created classes Button, MenuLevel
- modified class MainMenu
- modified class Board
- added Text_fonts notes
- added Graphics module - Shapes - notes
@wrazik
Copy link
Owner

wrazik commented Nov 12, 2023

Great work! I need some time to analyze this PR (especially callback-design, raw pointers etc...). I will check it this week!

@wrazik
Copy link
Owner

wrazik commented Nov 13, 2023

I can't do anything in main menu. How to start a new game?

@bartez33a
Copy link
Contributor Author

bartez33a commented Nov 13, 2023 via email

@wrazik
Copy link
Owner

wrazik commented Nov 13, 2023

It doesn't work on my computer... I tried the version 5fd491a, nothing happens after pressing enter. Event type after pressing Enter is the type 4 (?) (https://github.com/bartez33a/TankBotFight/blob/main/src/MenuLevel.cpp#L8) . I will investigate it further, I have no idea if this is something in my environment or is some sfml-issue.

@wrazik
Copy link
Owner

wrazik commented Nov 13, 2023

It looks like after typing "enter" i receive sf::Event::TextEntered & sf::Keyboard::N (actually I think it should be carriage return) which is super weird. After fixing the code, I'm unable to control the tank... I think I need to spend some time on this (propably week or two), please be patient!

@bartez33a
Copy link
Contributor Author

bartez33a commented Nov 13, 2023 via email

@wrazik
Copy link
Owner

wrazik commented Nov 13, 2023

Arch Linux unfortunately... :(

@bartez33a
Copy link
Contributor Author

bartez33a commented Nov 13, 2023 via email

@wrazik
Copy link
Owner

wrazik commented Nov 13, 2023

sf::Keyboard::Return is the same as sf::Keyboard::Enter. I suspect that this is SFML bug (probably SFML/SFML#2291 ) & it would be simpler to change sf::Keyboard::Enter to sf::Keyboard::Space:

To remind:

It looks like after pressing "enter" i receive sf::Event::TextEntered & sf::Keyboard::N (actually I think it should be carriage return) which is super weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants