Update browser.py

This commit is contained in:
Vishal 2023-11-24 18:32:33 +05:30 committed by GitHub
parent 426798a9d9
commit c646868a3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -394,6 +394,12 @@ class ProfileBrowserWindow(bui.Window):
if p_name == '__account__' if p_name == '__account__'
else bui.app.classic.get_player_profile_icon(p_name) + p_name else bui.app.classic.get_player_profile_icon(p_name) + p_name
) )
try:
char_index = spazzes.index(p_info['character'])
except Exception:
char_index = spazzes.index('Spaz')
assert isinstance(tval, str) assert isinstance(tval, str)
character = bui.buttonwidget( character = bui.buttonwidget(
parent=self._subcontainer, parent=self._subcontainer,
@ -404,12 +410,8 @@ class ProfileBrowserWindow(bui.Window):
mask_texture=bui.gettexture('characterIconMask'), mask_texture=bui.gettexture('characterIconMask'),
tint_color=color, tint_color=color,
tint2_color=_highlight, tint2_color=_highlight,
texture=icon_textures[ texture=icon_textures[char_index],
spazzes.index(p_info['character']) tint_texture=icon_tint_textures[char_index],
],
tint_texture=icon_tint_textures[
spazzes.index(p_info['character'])
],
selectable=False, selectable=False,
) )
txtw = bui.textwidget( txtw = bui.textwidget(