From 66d0558dfaa7512fd5307bc8fbbc7459058947a1 Mon Sep 17 00:00:00 2001 From: cuu Date: Mon, 9 Dec 2019 06:19:23 +0000 Subject: [PATCH] Add open pico8 and tic80 in gamestore --- Menu/GameShell/21_GameStore/__init__.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Menu/GameShell/21_GameStore/__init__.py b/Menu/GameShell/21_GameStore/__init__.py index 00543fb..710a91f 100644 --- a/Menu/GameShell/21_GameStore/__init__.py +++ b/Menu/GameShell/21_GameStore/__init__.py @@ -14,7 +14,7 @@ from libs.roundrects import aa_round_rect from UI.constants import Width,Height,ICON_TYPES,RESTARTUI from UI.page import Page,PageSelector from UI.label import Label -from UI.util_funcs import midRect,FileExists,ArmSystem,reconstruct_broken_string +from UI.util_funcs import midRect,FileExists,ArmSystem from UI.keys_def import CurKeys, IsKeyStartOrA, IsKeyMenuOrB from UI.scroller import ListScroller from UI.icon_pool import MyIconPool @@ -429,8 +429,20 @@ class GameStorePage(Page): #game_sh = reconstruct_broken_string( game_sh) print("run game: ",game_sh, os.path.exists( game_sh)) self._Screen.RunEXE(game_sh) - - + + if cur_li._Value["type"]=="pico8" and cur_li._ReadOnly == False: + if os.path.exists("/home/cpi/games/PICO-8/pico-8/pico8") == True: + game_sh = "/home/cpi/launcher/Menu/GameShell/50_PICO-8/PICO-8.sh" + self._Screen.RunEXE(game_sh) + else: + self._Screen._MsgBox.SetText("Purchase pico8") + self._Screen._MsgBox.Draw() + self._Screen.SwapAndShow() + + if cur_li._Value["type"]=="tic80" and cur_li._ReadOnly == False: + game_sh = "/home/cpi/apps/Menu/51_TIC-80/TIC-80.sh" + self._Screen.RunEXE(game_sh) + def OnLoadCb(self): self._Scrolled = 0 self._PosY = 0