Updating easy_connect.py to api 9

This commit is contained in:
Vishal 2025-01-22 22:52:46 +05:30 committed by GitHub
parent 15822ff10c
commit 4396cc1c0b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 7 deletions

View file

@ -680,6 +680,7 @@
} }
], ],
"versions": { "versions": {
"3.0.0": null,
"2.0.0": { "2.0.0": {
"api_version": 8, "api_version": 8,
"commit_sha": "0c5ce76", "commit_sha": "0c5ce76",

View file

@ -1,12 +1,12 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# ba_meta require api 8 # ba_meta require api 9
''' =========================================== ''' ===========================================
EasyConnect by Mr.Smoothy | EasyConnect by Mr.Smoothy |
verion 1.7 | verion 1.7 |
https://discord.gg/ucyaesh | https://discord.gg/ucyaesh |
Serverconnector X IPPORTRevealer | Serverconnector X IPPORTRevealer |
for bombsquad v1.7.20+ | for bombsquad v1.7.37+ |
============================================== ==============================================
''' '''
@ -26,9 +26,9 @@
# https://discord.gg/ucyaesh # https://discord.gg/ucyaesh
# REQUIREMENTS # REQUIREMENTS
# built for bs 1.7.20 and above # built for bs 1.7.37 and above
# by Mr.Smoothy for Bombsquad version 1.7.20+ # by Mr.Smoothy for Bombsquad version 1.7.37+
import _babase import _babase
import babase import babase
@ -40,7 +40,7 @@ from bauiv1lib import popup
from dataclasses import dataclass from dataclasses import dataclass
import random import random
from enum import Enum from enum import Enum
from bauiv1lib.popup import PopupMenuWindow, PopupWindow from bauiv1lib.popup import PopupMenuWindow
from typing import Any, Optional, Callable from typing import Any, Optional, Callable
from bauiv1lib.gather.publictab import PublicGatherTab from bauiv1lib.gather.publictab import PublicGatherTab
import json import json
@ -114,12 +114,12 @@ class _HostLookupThread(threading.Thread):
from_other_thread=True) from_other_thread=True)
def newbuild_favorites_tab(self, region_height: float) -> None: def newbuild_favorites_tab(self, region_width: float, region_height: float) -> None:
c_height = region_height - 20 c_height = region_height - 20
v = c_height - 35 - 25 - 30 v = c_height - 35 - 25 - 30
self.retry_inter = 0.0 self.retry_inter = 0.0
uiscale = bui.app.ui_v1.uiscale uiscale = bui.app.ui_v1.uiscale
self._width = 1240 if uiscale is babase.UIScale.SMALL else 1040 self._width = region_width
x_inset = 100 if uiscale is babase.UIScale.SMALL else 0 x_inset = 100 if uiscale is babase.UIScale.SMALL else 0
self._height = (578 if uiscale is babase.UIScale.SMALL else self._height = (578 if uiscale is babase.UIScale.SMALL else
670 if uiscale is babase.UIScale.MEDIUM else 800) 670 if uiscale is babase.UIScale.MEDIUM else 800)
@ -241,6 +241,23 @@ def newbuild_favorites_tab(self, region_height: float) -> None:
border=2, border=2,
margin=0, margin=0,
claims_left_right=True) claims_left_right=True)
self._no_parties_added_text = bui.textwidget(
parent=self._container,
size=(0, 0),
h_align='center',
v_align='center',
text='',
color=(0.6, 0.6, 0.6),
scale=1.2,
position=(
(
(240 if uiscale is bui.UIScale.SMALL else 225)
+ sub_scroll_width * 0.5
),
v + sub_scroll_height * 0.5,
),
glow_type='uniform',
)
self._favorite_selected = None self._favorite_selected = None
self._refresh_favorites() self._refresh_favorites()