Skip to content

Commit

Permalink
Default controls are set to 'yes' on game start.
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterLicht committed Jan 21, 2017
1 parent 78c0c36 commit 3fffb78
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/controlSettingScreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, screen):
#Selection icon
self.selectedIm = pygame.sprite.Sprite()
self.selectedIm.image = pygame.image.load("data/ui_selected.png").convert_alpha()
self.selectedIm.rect = self.selectedIm.image.get_rect(center = (70, 199))
self.selectedIm.rect = self.selectedIm.image.get_rect(center = (590, 399)) #default controls
self.icon_list.add(self.selectedIm)
#Jump icon
self.jumpIm = pygame.sprite.Sprite()
Expand Down Expand Up @@ -126,15 +126,14 @@ def __init__(self, screen):
self.defaultIm.image = pygame.image.load("data/ui_default.png").convert()
self.defaultIm.rect = self.defaultIm.image.get_rect(center = (590, 399))
self.icon_list.add(self.defaultIm)
self.toggle_default_btn()
#Done icon
self.doneIm = pygame.sprite.Sprite()
self.doneIm.image = pygame.Surface([214, 64])
self.doneIm.image.fill(RED)
self.doneIm.image.set_alpha(0)
self.doneIm.rect = self.doneIm.image.get_rect(center = (666, 522))
self.icon_list.add(self.doneIm)
self.currently_selected = SelectedUI.JUMP
self.currently_selected = SelectedUI.USE_DEFAULT_CONTROLS

def hit_ui_element(self, (x, y)):
"""Returns enum of hit UI element or none if mouse hits no UI.
Expand Down
2 changes: 1 addition & 1 deletion src/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def __init__(self, screen, event_manager):
self.use_mouse_to_aim_and_fire = False
self.use_hat_to_aim = -1
self.use_hat_to_move = -1
self.use_default_controls = False
self.use_default_controls = True
self.controls_ready = False
self.control_setting_screen = controlSettingScreen.ControlSettingScreen(screen)
#Register game pads that are connected
Expand Down

0 comments on commit 3fffb78

Please sign in to comment.