Skip to content

Commit

Permalink
Merge pull request #24 from LupaDevStudio/9-adapt-design-for-mobile
Browse files Browse the repository at this point in the history
9 adapt design for mobile
  • Loading branch information
LupaDevStudio committed Nov 22, 2023
2 parents 5b99ca1 + bee6ef1 commit 46e2f77
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
20 changes: 14 additions & 6 deletions screens/game.kv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#:set center_img_width 0.5
#:set center_img_center_y 0.7
#:set side_img_width 0.3
#:set side_img_height 0.2
#:set side_img_height 0.25
#:set side_img_center_x 0.175
#:set side_img_center_y 0.25
#:set text_filling_ratio 0.85
Expand Down Expand Up @@ -309,15 +309,23 @@
text_color: TEXT_FONT_COLOR

# Decree background
ImageWithText:
id: decree_center
Image:
id: decree_center_bg
source: PATH_IMAGES + "decree_background.png"
size_hint: center_img_width, center_img_height
pos_hint: {"center_x": 0.5, "center_y": center_img_center_y}
allow_stretch: True
keep_ratio: False
text_font_name: root.font_name
text_color: TEXT_FONT_COLOR
Label:
id: decree_center
size_hint: 0.35, center_img_height
text_size: self.size
pos_hint: {"center_x": 0.5, "center_y": center_img_center_y}
font_name: root.font_name
color: TEXT_FONT_COLOR
halign: "center"
valign:"middle"
font_size: 15*root.font_ratio

# Decree left
ImageWithTextButton:
Expand Down Expand Up @@ -348,7 +356,7 @@
id: decree_down
source: PATH_IMAGES + "decree_choice_background.png"
size_hint: side_img_width, side_img_height
pos_hint: {"center_x": 0.5, "center_y": 0.15}
pos_hint: {"center_x": 0.5, "center_y": 0.175}
allow_stretch: True
keep_ratio: False
text_font_name: root.font_name
Expand Down
6 changes: 4 additions & 2 deletions screens/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def __init__(self, **kw):
self.decree_cards = ["decree_center",
"decree_left",
"decree_right",
"decree_down"]
"decree_down",
"decree_center_bg"]

self.event_cards = ["event", "next_button"]

Expand Down Expand Up @@ -173,7 +174,8 @@ def hide_cards(self, *_):
"plus_weapons",
"minus_weapons",
"plus_tools",
"minus_tools"]
"minus_tools",
"decree_center_bg"]

for card in cards_list:
self.disable_widget(card)
Expand Down
4 changes: 2 additions & 2 deletions screens/settings.kv
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

Label:
text: root.sound_volume_label
pos_hint: {"center_x":0.75, "center_y": 0.55}
pos_hint: {"center_x":0.75, "center_y": 0.58}
font_size: 25*root.font_ratio
color: TEXT_FONT_COLOR
outline_width: 2
Expand All @@ -41,7 +41,7 @@

Label:
text: root.music_volume_label
pos_hint: {"center_x":0.75, "center_y": 0.75}
pos_hint: {"center_x":0.75, "center_y": 0.78}
font_size: 25*root.font_ratio
color: TEXT_FONT_COLOR
outline_width: 2
Expand Down

0 comments on commit 46e2f77

Please sign in to comment.