Skip to content

Commit

Permalink
- cardset prepare option changes (android build)
Browse files Browse the repository at this point in the history
- action against occasional black screen on android resume
- startup phase cosmetics
  • Loading branch information
lufebe16 committed Feb 14, 2024
1 parent b42a43f commit cba1fd8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 2 additions & 0 deletions buildozer/minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cardset-dojouji-3x3
cardset-dondorf
cardset-eternal-dragon-10x10
cardset-gnome-mahjongg-1
cardset-gpl
cardset-hanafuda-200-years
cardset-hexadeck
cardset-hofamterspiel-9x9
Expand All @@ -30,3 +31,4 @@ cardset-tuxedo
cardset-uni-mahjongg
cardset-victoria-falls-5x5
cardset-vienna-2k
cardset-z_minimal
4 changes: 2 additions & 2 deletions buildozer/mkcards
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#set -eux

#loadmode="forge"
loadmode=""
loadmode=" "

rm -rf cardsets

Expand Down Expand Up @@ -46,7 +46,7 @@ else
pushd repo
git init
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git
git fetch --depth 1 origin b153255935a5376da6151b55bc8044f1131c7950
git fetch --depth 1 origin 9b63a583dc3e770fa9bf8f2378c37a064aa4969c
git checkout -q FETCH_HEAD
popd

Expand Down
4 changes: 2 additions & 2 deletions buildozer/resizecards
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import math

carddir = ""
filename = ""
maxw = 120
maxh = 180
maxw = 100
maxh = 150

# arguments:
# 1: cardset directory
Expand Down
21 changes: 12 additions & 9 deletions pysollib/kivy/LApp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1854,8 +1854,8 @@ def update_rect(self, *args):
self.rect.pos = self.pos
self.rect.size = self.size

self.startLabel = MyLabel(text="PySolFC", color=[0.9,0.9,0.9,1]) # noqa
self.baseWindow.add_widget(self.startLabel)
#self.startLabel = MyLabel(text="PySolFC", color=[0.9,0.9,0.9,1]) # noqa
#self.baseWindow.add_widget(self.startLabel)

return self.baseWindow

Expand Down Expand Up @@ -1887,11 +1887,10 @@ def app_start(self, *args):
logging.info("LApp: app_start processed, returned to kivy mainloop")

self.baseWindow.add_widget(self.mainWindow,index=1) # noqa
anim = Animation(opacity=0,duration=0.5) # noqa
anim.start(self.startLabel)
Clock.schedule_once(lambda dt:
self.baseWindow.remove_widget(self.startLabel),1.0) # noqa
Clock.schedule_once(lambda dt: set_fullscreen(True),2.0) # noqa
self.baseWindow.opacity = 0
anim = Animation(opacity=1,duration=0.7) # noqa
Clock.schedule_once(lambda dt: anim.start(self.baseWindow),0.3) # noqa
Clock.schedule_once(lambda dt: set_fullscreen(True),0.0) # noqa

def on_start(self):
logging.info("LApp: on_start")
Expand Down Expand Up @@ -2040,8 +2039,12 @@ def on_resume(self):
# einwandfrei. Daher versuchen wir ... um den graphik context
# wieder zu aktivieren/auszurichten:

Clock.schedule_once(lambda dt: self.mainWindow.rebuildContainer(), 1.0)
Clock.schedule_once(lambda dt: set_fullscreen(True),2.0) # noqa
# gemäss einer neueren Antwort auf kivy issue 3671 gehört auch
# update-viewport zu den nützlichen massnahmen.

Clock.schedule_once(lambda dt: Window.update_viewport(),0.0) # noqa
Clock.schedule_once(lambda dt: self.mainWindow.rebuildContainer(), 0.5)
Clock.schedule_once(lambda dt: set_fullscreen(True),1.0) # noqa

# Pause modus abschalten nach resume:
if app.game.pause:
Expand Down

0 comments on commit cba1fd8

Please sign in to comment.