Toggle Navigation
Hatchery
Eggs
Frubar
__init__.py
Users
Badges
Login
Register
MCH2022 badge?
go to mch2022.badge.team
__init__.py
raw
Content
import dialogs, badge, easydraw, time, appglue, ugfx easydraw.msg("","Frubar", True) enabled = badge.nvs_get_u8("frubar","enable", 0) if enabled: if dialogs.prompt_boolean("App active, want to disable?"): enabled = badge.nvs_set_u8("frubar","enable",0) else: if dialogs.prompt_boolean("App disabled, want to enable?"): enabled = badge.nvs_set_u8("frubar","enable",1) ugfx.clear(ugfx.BLACK) ugfx.flush() ugfx.clear(ugfx.WHITE) ugfx.flush() if enabled: savedchoice = badge.nvs_get_str("frubar", "name", "") newchoice = dialogs.prompt_text("Your nickname?", savedchoice) if newchoice: badge.nvs_set_str("frubar", "name", newchoice) ugfx.clear(ugfx.BLACK) ugfx.flush() ugfx.clear(ugfx.WHITE) ugfx.flush() easydraw.msg("Frubar successfully set up!") easydraw.msg("Go back to the splash and wait...") time.sleep(3) appglue.home()