Skip to content

Commit

Permalink
Add the images in the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
LupaDevStudio committed Nov 27, 2023
1 parent 1345d2e commit 865cb61
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 9 deletions.
Binary file modified resources/images/tutorial_consequences.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/tutorial_decision.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/tutorial_decree.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/tutorial_end.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/tutorial_event.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/tutorial_frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified resources/images/tutorial_zero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions screens/tutorial.kv
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,13 @@
Image:
id: tutorial_image
source: root.path_tutorial_image
size_hint: 0.6,0.6
size_hint: 0.6, 0.6
pos_hint: {"center_x": 0.75, "center_y": 0.55}
allow_stretch: True
keep_ratio: True
Image:
id: frame
source: PATH_IMAGES + "collection_frame.png"
size_hint: 0.7,0.7
source: PATH_IMAGES + "tutorial_frame.png"
size_hint: 0.67, 0.67
pos_hint: {"center_x": 0.75, "center_y": 0.55}
allow_stretch: True
keep_ratio: True
11 changes: 6 additions & 5 deletions screens/tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

from tools.path import (
PATH_IMAGES,
PATH_TEXT_FONT
PATH_TEXT_FONT,
PATH_IMAGES_TUTORIAL
)
from tools.kivy_tools import (
ImprovedScreen
Expand All @@ -35,10 +36,10 @@ def __init__(self, **kw):
back_image_path=PATH_IMAGES + "tutorial_background.jpg",
font_name=PATH_TEXT_FONT,
**kw)
self.path_tutorial_image = PATH_IMAGES + "ending_paleo_max.jpg"

def on_enter(self, *args):
self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial]
self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0]
self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg"
return super().on_enter(*args)

def go_to_previous_slide(self):
Expand All @@ -60,7 +61,7 @@ def go_to_previous_slide(self):
else:
self.counter_tutorial -= 1
self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0]
self.ids.tutorial_text.source = TEXT.tutorial[self.counter_tutorial][1]
self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg"

def go_to_next_slide(self):
"""
Expand Down Expand Up @@ -91,4 +92,4 @@ def go_to_next_slide(self):

else:
self.ids.tutorial_text.text = TEXT.tutorial[self.counter_tutorial][0]
self.ids.tutorial_text.source = TEXT.tutorial[self.counter_tutorial][1]
self.path_tutorial_image = PATH_IMAGES_TUTORIAL + TEXT.tutorial[self.counter_tutorial][1] + ".jpg"
1 change: 1 addition & 0 deletions tools/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
PATH_MUSICS = PATH_RESOURCES_FOLDER + "musics/"
PATH_FONTS = PATH_RESOURCES_FOLDER + "fonts/"
PATH_GAMEPLAY = PATH_RESOURCES_FOLDER + "gameplay.json"
PATH_IMAGES_TUTORIAL = PATH_IMAGES + "tutorial_"

# Path for the fonts
PATH_TITLE_FONT = PATH_FONTS + "scratched_letters.ttf"
Expand Down

0 comments on commit 865cb61

Please sign in to comment.