mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Add files via upload
This commit is contained in:
parent
083e60aa65
commit
a0b3f41951
1 changed files with 12 additions and 12 deletions
|
|
@ -68,15 +68,17 @@ class Help(PopupWindow):
|
||||||
class SyncConfirmation(PopupWindow):
|
class SyncConfirmation(PopupWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
uiscale = ba.app.ui.uiscale
|
uiscale = ba.app.ui.uiscale
|
||||||
self.width = 1000#h-hhhhhhhhhhh-----to completeh-hh-hhhhh-
|
self.width = 600
|
||||||
self.height = 300
|
self.height = 300
|
||||||
PopupWindow.__init__(self,
|
PopupWindow.__init__(self,
|
||||||
position=(0.0, 0.0),
|
position=(0.0, 0.0),
|
||||||
size=(self.width, self.height),
|
size=(self.width, self.height),
|
||||||
scale=1.2,)
|
scale=1.2,)
|
||||||
ba.containerwidget(edit=self.root_widget, on_outside_click_call=self.close)
|
ba.containerwidget(edit=self.root_widget, on_outside_click_call=self.close)
|
||||||
ba.buttonwidget(parent=self.root_widget,label="cancel",size=e)
|
ba.textwidget(parent=self.root_widget, position=(30, self.height * 0.8),
|
||||||
ba.buttonwidget(parent=self.root_widget,label="continue")
|
text=" Are you sure you want to continue\n\nWARNING:replays with same name in mods folder\n will be overwritten")
|
||||||
|
ba.buttonwidget(parent=self.root_widget,label="CANCEL",size=(200,80),color=red,position=(80,50),on_activate_call=self.close)
|
||||||
|
ba.buttonwidget(parent=self.root_widget,label="continue",size=(200,80),position=(300,50),on_activate_call=SettingWindow.sync)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
ba.playsound(ba.getsound('swish'))
|
ba.playsound(ba.getsound('swish'))
|
||||||
|
|
@ -104,12 +106,12 @@ class SettingWindow():
|
||||||
internal=_internal
|
internal=_internal
|
||||||
if internal==True:
|
if internal==True:
|
||||||
dir_list=listdir(internal_dir)
|
dir_list=listdir(internal_dir)
|
||||||
ba.buttonwidget(edit=self.share_button,label="Export",icon=ba.gettexture("upButton"),)
|
ba.buttonwidget(edit=self.share_button,label="EXPORT",icon=ba.gettexture("upButton"),)
|
||||||
sel=self.internal_tab
|
sel=self.internal_tab
|
||||||
unsel=self.external_tab
|
unsel=self.external_tab
|
||||||
else:
|
else:
|
||||||
dir_list=listdir(external_dir)
|
dir_list=listdir(external_dir)
|
||||||
ba.buttonwidget(edit=self.share_button,label="Import",icon=ba.gettexture("downButton"),)
|
ba.buttonwidget(edit=self.share_button,label="IMPORT",icon=ba.gettexture("downButton"),)
|
||||||
sel= self.external_tab
|
sel= self.external_tab
|
||||||
unsel= self.internal_tab
|
unsel= self.internal_tab
|
||||||
|
|
||||||
|
|
@ -169,7 +171,7 @@ class SettingWindow():
|
||||||
position=internal_tab_pos,
|
position=internal_tab_pos,
|
||||||
size=internal_tab_size,
|
size=internal_tab_size,
|
||||||
button_type="square",
|
button_type="square",
|
||||||
label="internal",
|
label="INTERNAL",
|
||||||
text_scale=2,
|
text_scale=2,
|
||||||
color=blue,
|
color=blue,
|
||||||
texture=ba.gettexture("circleShadow"))
|
texture=ba.gettexture("circleShadow"))
|
||||||
|
|
@ -179,7 +181,7 @@ class SettingWindow():
|
||||||
position=external_tab_pos,
|
position=external_tab_pos,
|
||||||
size=external_tab_size,
|
size=external_tab_size,
|
||||||
button_type="square",
|
button_type="square",
|
||||||
label="external",
|
label="EXTERNAL",
|
||||||
text_scale=2,
|
text_scale=2,
|
||||||
color=blue,
|
color=blue,
|
||||||
texture=ba.gettexture("nub"))
|
texture=ba.gettexture("nub"))
|
||||||
|
|
@ -208,7 +210,7 @@ class SettingWindow():
|
||||||
label="SYNC",
|
label="SYNC",
|
||||||
text_scale=2,
|
text_scale=2,
|
||||||
icon=ba.gettexture("ouyaYButton"),
|
icon=ba.gettexture("ouyaYButton"),
|
||||||
on_activate_call=self.sync)
|
on_activate_call=SyncConfirmation)
|
||||||
|
|
||||||
self.close_button = ba.buttonwidget(
|
self.close_button = ba.buttonwidget(
|
||||||
parent=self.root,
|
parent=self.root,
|
||||||
|
|
@ -237,7 +239,7 @@ class SettingWindow():
|
||||||
|
|
||||||
# image={"texture":ba.gettexture("bombColor"),"tint_texture":None,"tint_color":None,"tint2_color":None})
|
# image={"texture":ba.gettexture("bombColor"),"tint_texture":None,"tint_color":None,"tint2_color":None})
|
||||||
|
|
||||||
def sync(self):
|
def sync(self=""):
|
||||||
internal_list=listdir(internal_dir)
|
internal_list=listdir(internal_dir)
|
||||||
external_list=listdir(external_dir)
|
external_list=listdir(external_dir)
|
||||||
for i in internal_list:
|
for i in internal_list:
|
||||||
|
|
@ -251,12 +253,10 @@ class SettingWindow():
|
||||||
|
|
||||||
def export(self):
|
def export(self):
|
||||||
copy(internal_dir+self.selected_name, external_dir+self.selected_name)
|
copy(internal_dir+self.selected_name, external_dir+self.selected_name)
|
||||||
cprint(internal_dir+self.selected_name)
|
|
||||||
Print(self.selected_name[0:-4]+" exported", top=True, color=pink)
|
Print(self.selected_name[0:-4]+" exported", top=True, color=pink)
|
||||||
|
|
||||||
def importx(self):
|
def importx(self):
|
||||||
copy(external_dir+self.selected_name, internal_dir+self.selected_name)
|
copy(external_dir+self.selected_name, internal_dir+self.selected_name)
|
||||||
cprint(external_dir+self.selected_name)
|
|
||||||
Print(self.selected_name[0:-4]+" imported", top=True, color=green)
|
Print(self.selected_name[0:-4]+" imported", top=True, color=green)
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue