From dd3b95b3f5427c711f0760d467f6d9d3c76f4164 Mon Sep 17 00:00:00 2001 From: cuu Date: Wed, 5 Dec 2018 20:17:22 +0800 Subject: [PATCH] switch to launchego --- .../10_Settings/LauncherGo/__init__.py | 34 +++++++++++++++++++ Menu/GameShell/10_Settings/list_page.py | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 Menu/GameShell/10_Settings/LauncherGo/__init__.py diff --git a/Menu/GameShell/10_Settings/LauncherGo/__init__.py b/Menu/GameShell/10_Settings/LauncherGo/__init__.py new file mode 100644 index 0000000..d509724 --- /dev/null +++ b/Menu/GameShell/10_Settings/LauncherGo/__init__.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +import os +import pygame +#import math +#mport subprocess +import glob +#from beeprint import pp +from libs.roundrects import aa_round_rect + +## local UI import +from UI.lang_manager import MyLangManager + +class APIOBJ(object): + + _Page = None + + def __init__(self): + pass + def Init(self,main_screen): + pass + def API(self,main_screen): + if main_screen !=None: + main_screen._MsgBox.SetText("Rebooting to LauncherGo") + main_screen._MsgBox.Draw() + main_screen.SwapAndShow() + pygame.time.delay(300) + os.system("sed -i s/launcher/launchergo/g ~/.bashrc" ) + os.system("sudo reboot") + +OBJ = APIOBJ() +def Init(main_screen): + OBJ.Init(main_screen) +def API(main_screen): + OBJ.API(main_screen) diff --git a/Menu/GameShell/10_Settings/list_page.py b/Menu/GameShell/10_Settings/list_page.py index 75f629a..cb56e83 100644 --- a/Menu/GameShell/10_Settings/list_page.py +++ b/Menu/GameShell/10_Settings/list_page.py @@ -65,7 +65,8 @@ class ListPage(Page): ["","Update", ""], ["","About", "About"], ["","PowerOFF","Power off"], - ["","ButtonsLayout","Buttons Layout"],] + ["","ButtonsLayout","Buttons Layout"], + ["","LauncherGo","Switch to LauncherGo"]] start_x = 0 start_y = 0