2024-05-16 18:44:57 +03:00
|
|
|
# ba_meta require api 8
|
|
|
|
|
import bascenev1 as bs
|
|
|
|
|
from babase import Plugin as v
|
2024-05-16 16:07:23 +00:00
|
|
|
from bauiv1 import buttonwidget as z, gettexture as x
|
2024-05-16 18:44:57 +03:00
|
|
|
from bauiv1lib.mainmenu import MainMenuWindow as m
|
|
|
|
|
|
2024-05-16 16:07:23 +00:00
|
|
|
m.i = m.p = 0
|
|
|
|
|
k = bs.connect_to_party
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def j(address, port=43210, print_progress=False):
|
|
|
|
|
try:
|
|
|
|
|
bs.disconnect_from_host()
|
|
|
|
|
except:
|
|
|
|
|
pass
|
|
|
|
|
m.i = address
|
|
|
|
|
m.p = port
|
|
|
|
|
k(m.i, m.p, print_progress)
|
|
|
|
|
|
|
|
|
|
|
2024-05-16 18:44:57 +03:00
|
|
|
def R(s):
|
2024-05-16 16:07:23 +00:00
|
|
|
def w(t, *f, **g):
|
|
|
|
|
z(parent=t._root_widget, size=(23, 26), icon=x('replayIcon'),
|
|
|
|
|
on_activate_call=bs.Call(j, m.i, m.p))
|
|
|
|
|
return s(t, *f, **g)
|
2024-05-16 18:44:57 +03:00
|
|
|
return w
|
|
|
|
|
|
|
|
|
|
# ba_meta export plugin
|
2024-05-16 16:07:23 +00:00
|
|
|
|
|
|
|
|
|
2024-05-16 18:44:57 +03:00
|
|
|
class byBordd(v):
|
|
|
|
|
def __init__(s):
|
2024-05-16 16:07:23 +00:00
|
|
|
m._refresh_in_game = R(m._refresh_in_game)
|
|
|
|
|
bs.connect_to_party = j
|