-
Notifications
You must be signed in to change notification settings - Fork 0
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
Select track UI implemented #19
base: master
Are you sure you want to change the base?
Conversation
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.
Like I said on Discord, I can't see right arrow, both tracks are represented by the same picture and track choice doesn't affect play and train windows.
src/view/options_menu.py
Outdated
self.divider = 0.4 | ||
self.selected_action: Optional[Action] = None | ||
self.img = pygame.image.load("resources/graphics/track1.jpg") | ||
self.logo_image = pygame.image.load("resources/graphics/logo.png") | ||
|
||
def draw(self, destination: Surface, events: List[EventType]) -> Optional[Action]: |
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.
It's a very long method, maybe we can split it?
0d91676
to
f99928b
Compare
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.
Beautiful menu :P
But there is no fourth track and previews for second and third tracks are not corresponding to actual tracks.
src/main.py
Outdated
tv1 = TrackView(Track.from_points(tracks[1]["points"])) | ||
tv2 = TrackView(Track.from_points(tracks[3]["points"])) | ||
tv3 = TrackView(Track.from_points(tracks[4]["points"])) | ||
|
||
track_options = { | ||
"Track1": Action(ActionType.CHANGE_VIEW, 2), | ||
"Track2": Action(ActionType.CHANGE_VIEW, 3), | ||
"Track3": Action(ActionType.CHANGE_VIEW, 4), | ||
} | ||
track_images = [ | ||
pygame.image.load("resources/graphics/track1.jpg"), | ||
pygame.image.load("resources/graphics/track2.jpg"), | ||
pygame.image.load("resources/graphics/track3.jpg") | ||
] | ||
options_menu = OptionsMenu(tracks=track_options, tracks_thumbnails=track_images) | ||
options_menu.background_image = pygame.image.load( | ||
"resources/graphics/menu-background.png" | ||
) | ||
|
||
window.add_view(menu, 0, True) | ||
window.add_view(tv1, 1) | ||
window.add_view(tv2, 2) | ||
window.add_view(tv1, 2) | ||
window.add_view(tv2, 3) | ||
window.add_view(tv3, 4) | ||
window.add_view(options_menu, 1) |
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.
Previews for second and third tracks are not corresponding to actual tracks. Please fix it and add the forth track also. Furthermore, we can give them nicer names like "DNA", "Straight", "Loop" and so on.
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.
To be fixed when last two tracks will be merged
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.
Some changes should be added, especially when it comes to loading track thumbnails, but nothing of a critical concern.
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.
Needs small fix to show all the tracks on the menu correctly.
No description provided.