-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhanced the UI and added Keyboard Support for options #14
base: master
Are you sure you want to change the base?
Conversation
- shifted both by 70px (measured via photoshop) - they were shifted such that they appear on the ground rather than floating on top of it
- added a generic class which acts as the button for the options to selct from - it has rounded corners and is similar to the button class in objects
- the self.buttons array now contains the new option_buttons - the drawing method has been updated for self.buttons - A,B,C,D are now added to each option
- now an option can be selected using the keyboard keys A, B, C, D and 1, 2, 3 ,4
Even after updating the sugargmae, Keyboard keys still seems to not work on some version of pygame, Tested with |
Issue: Key events where not detectable Fix: Add `self._pygamecanvas.grab_focus()` to math_hurdlerActivity.py
Made a pull request to your patch-ui branch to fix issue. |
Fix key events
@chimosky @sourabhaa You can review this now |
Reviewed ddcb7cf, not tested. |
@chimosky Thanks for the review, made the requested changes. |
Reminder for testing 👀 |
Reviewed and tested with python3.7.3, pygame 2.4. |
math_hurdler.py
Outdated
|
||
self.buttons[self.question.answer_index].set_color( | ||
Color.GREEN, False) | ||
|
||
Color.GREEN) | ||
|
||
while self.running: | ||
# Processing Gtk Events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this wasn't your change but could you please remove redundant comments like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes yes, sure
Tested ba76b93, the answers seem to collide and aren't visible. |
Is the issue reproducible with a specific screen size? |
I see, Will look into it |
Tested on a 1024x768 screen. |
The text inside the Hurdle's window also cuts of in smaller resolutions |
Making the following font sizes adapt to screen size would probably fix the issue.
|
No description provided.