decompilation: Fix toontown.toon.PlayerInfoPanel decompilation.
This commit is contained in:
parent
4c76fb74ca
commit
de2ee16cb8
1 changed files with 189 additions and 43 deletions
|
@ -64,7 +64,10 @@ class PlayerInfoPanel(AvatarPanelBase.AvatarPanelBase):
|
|||
onlineButtonState = DGG.DISABLED
|
||||
base.localAvatar.obscureFriendsListButton(1)
|
||||
gui = loader.loadModel('phase_3.5/models/gui/avatar_panel_gui')
|
||||
self.frame = DirectFrame(image=gui.find('**/avatar_panel'), relief=None, pos=(1.1, 100, 0.525))
|
||||
self.frame = DirectFrame(
|
||||
image=gui.find('**/avatar_panel'),
|
||||
relief=None,
|
||||
pos=(1.1, 100, 0.525))
|
||||
disabledImageColor = Vec4(1, 1, 1, 0.4)
|
||||
text0Color = Vec4(1, 1, 1, 1)
|
||||
text1Color = Vec4(0.5, 1, 0.5, 1)
|
||||
|
@ -79,61 +82,204 @@ class PlayerInfoPanel(AvatarPanelBase.AvatarPanelBase):
|
|||
model = loader.loadModel(GAME_LOGO_FILE)
|
||||
logoImage = model.find('**/' + logoImageName)
|
||||
del model
|
||||
self.outsideLogo = DirectLabel(parent=self.frame, relief=None, image=logoImage, pos=(0.0125, 0.0, 0.25), image_color=(1.0, 1.0, 1.0, 1), scale=(0.175, 1, 0.175))
|
||||
self.outsideLogo = DirectLabel(
|
||||
parent=self.frame,
|
||||
relief=None,
|
||||
image=logoImage,
|
||||
pos=(0.0125, 0.0, 0.25),
|
||||
image_color=(1.0, 1.0, 1.0, 1),
|
||||
scale=(0.175, 1, 0.175))
|
||||
font = ToontownGlobals.getInterfaceFont()
|
||||
textScale = 0.047
|
||||
textWrap = 7.5
|
||||
textAlign = TextNode.ACenter
|
||||
textPos = (0, 0)
|
||||
self.nameLabel = DirectLabel(parent=self.frame, pos=(0.0125, 0, 0.385), relief=None, text=self.listName, text_font=font, text_fg=Vec4(0, 0, 0, 1), text_pos=textPos, text_scale=textScale, text_wordwrap=textWrap, text_align=textAlign, text_shadow=(1, 1, 1, 1))
|
||||
self.nameLabel = DirectLabel(
|
||||
parent=self.frame,
|
||||
pos=(0.0125, 0, 0.385),
|
||||
relief=None,
|
||||
text=self.listName,
|
||||
text_font=font,
|
||||
text_fg=Vec4(0, 0, 0, 1),
|
||||
text_pos=textPos,
|
||||
text_scale=textScale,
|
||||
text_wordwrap=textWrap,
|
||||
text_align=textAlign,
|
||||
text_shadow=(1, 1, 1, 1))
|
||||
if self.accountText:
|
||||
self.accountLabel = DirectLabel(parent=self.frame, pos=(0.0125, 0, 0.385), text=self.accountText, relief=None, text_font=font, text_fg=Vec4(0, 0, 0, 1), text_pos=textPos, text_scale=textScale, text_wordwrap=textWrap, text_align=textAlign, text_shadow=(1, 1, 1, 1))
|
||||
self.accountLabel = DirectLabel(
|
||||
parent=self.frame,
|
||||
pos=(0.0125, 0, 0.385),
|
||||
text=self.accountText,
|
||||
relief=None,
|
||||
text_font=font,
|
||||
text_fg=Vec4(0, 0, 0, 1),
|
||||
text_pos=textPos,
|
||||
text_scale=textScale,
|
||||
text_wordwrap=textWrap,
|
||||
text_align=textAlign,
|
||||
text_shadow=(1, 1, 1, 1))
|
||||
self.accountLabel.show()
|
||||
self.closeButton = DirectButton(parent=self.frame, image=(gui.find('**/CloseBtn_UP'),
|
||||
gui.find('**/CloseBtn_DN'),
|
||||
gui.find('**/CloseBtn_Rllvr'),
|
||||
gui.find('**/CloseBtn_UP')), relief=None, pos=(0.157644, 0, -0.379167), command=self.__handleClose)
|
||||
self.friendButton = DirectButton(parent=self.frame, image=(gui.find('**/Frnds_Btn_UP'),
|
||||
gui.find('**/Frnds_Btn_DN'),
|
||||
gui.find('**/Frnds_Btn_RLVR'),
|
||||
gui.find('**/Frnds_Btn_UP')), image3_color=disabledImageColor, image_scale=0.9, relief=None, text=TTLocalizer.AvatarPanelFriends, text_scale=0.06, pos=(-0.103, 0, 0.133), text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_pos=(0.06, -0.02), text_align=TextNode.ALeft, state=avButtonState, command=self.__handleFriend)
|
||||
self.closeButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/CloseBtn_UP'),
|
||||
gui.find('**/CloseBtn_DN'),
|
||||
gui.find('**/CloseBtn_Rllvr'),
|
||||
gui.find('**/CloseBtn_UP')),
|
||||
relief=None,
|
||||
pos=(0.157644, 0, -0.379167),
|
||||
command=self.__handleClose)
|
||||
self.friendButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/Frnds_Btn_UP'),
|
||||
gui.find('**/Frnds_Btn_DN'),
|
||||
gui.find('**/Frnds_Btn_RLVR'),
|
||||
gui.find('**/Frnds_Btn_UP')),
|
||||
image3_color=disabledImageColor,
|
||||
image_scale=0.9,
|
||||
relief=None,
|
||||
text=TTLocalizer.AvatarPanelFriends,
|
||||
text_scale=0.06,
|
||||
pos=(-0.103, 0, 0.133),
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_pos=(0.06, -0.02),
|
||||
text_align=TextNode.ALeft,
|
||||
state=avButtonState,
|
||||
command=self.__handleFriend)
|
||||
self.friendButton['state'] = DGG.DISABLED
|
||||
self.goToButton = DirectButton(parent=self.frame, image=(gui.find('**/Go2_Btn_UP'),
|
||||
gui.find('**/Go2_Btn_DN'),
|
||||
gui.find('**/Go2_Btn_RLVR'),
|
||||
gui.find('**/Go2_Btn_UP')), image3_color=disabledImageColor, image_scale=0.9, relief=None, pos=(-0.103, 0, 0.045), text=TTLocalizer.AvatarPanelGoTo, text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_scale=0.06, text_pos=(0.06, -0.015), text_align=TextNode.ALeft, state=avButtonState, command=self.__handleGoto)
|
||||
self.goToButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/Go2_Btn_UP'),
|
||||
gui.find('**/Go2_Btn_DN'),
|
||||
gui.find('**/Go2_Btn_RLVR'),
|
||||
gui.find('**/Go2_Btn_UP')),
|
||||
image3_color=disabledImageColor,
|
||||
image_scale=0.9,
|
||||
relief=None,
|
||||
pos=(-0.103, 0, 0.045),
|
||||
text=TTLocalizer.AvatarPanelGoTo,
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_scale=0.06,
|
||||
text_pos=(0.06, -0.015),
|
||||
text_align=TextNode.ALeft,
|
||||
state=avButtonState,
|
||||
command=self.__handleGoto)
|
||||
self.goToButton['state'] = DGG.DISABLED
|
||||
self.whisperButton = DirectButton(parent=self.frame, image=(gui.find('**/ChtBx_ChtBtn_UP'),
|
||||
gui.find('**/ChtBx_ChtBtn_DN'),
|
||||
gui.find('**/ChtBx_ChtBtn_RLVR'),
|
||||
gui.find('**/ChtBx_ChtBtn_UP')), image3_color=disabledImageColor, relief=None, image_scale=0.9, pos=(-0.103, 0, -0.0375), text=TTLocalizer.AvatarPanelWhisper, text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_scale=TTLocalizer.PIPwisperButton, text_pos=(0.06, -0.0125), text_align=TextNode.ALeft, state=onlineButtonState, command=self.__handleWhisper)
|
||||
self.secretsButton = DirectButton(parent=self.frame, image=(gui.find('**/ChtBx_ChtBtn_UP'),
|
||||
gui.find('**/ChtBx_ChtBtn_DN'),
|
||||
gui.find('**/ChtBx_ChtBtn_RLVR'),
|
||||
gui.find('**/ChtBx_ChtBtn_UP')), image3_color=disabledImageColor, image_scale=0.9, relief=None, pos=(-0.103, 0, -0.13), text=TTLocalizer.AvatarPanelSecrets, text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_scale=TTLocalizer.PIPsecretsButton, text_pos=(0.055, -0.01), text_align=TextNode.ALeft, state=avButtonState, command=self.__handleSecrets)
|
||||
self.whisperButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/ChtBx_ChtBtn_UP'),
|
||||
gui.find('**/ChtBx_ChtBtn_DN'),
|
||||
gui.find('**/ChtBx_ChtBtn_RLVR'),
|
||||
gui.find('**/ChtBx_ChtBtn_UP')),
|
||||
image3_color=disabledImageColor,
|
||||
relief=None,
|
||||
image_scale=0.9,
|
||||
pos=(-0.103, 0, -0.0375),
|
||||
text=TTLocalizer.AvatarPanelWhisper,
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_scale=TTLocalizer.PIPwisperButton,
|
||||
text_pos=(0.06, -0.0125),
|
||||
text_align=TextNode.ALeft,
|
||||
state=onlineButtonState,
|
||||
command=self.__handleWhisper)
|
||||
self.secretsButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/ChtBx_ChtBtn_UP'),
|
||||
gui.find('**/ChtBx_ChtBtn_DN'),
|
||||
gui.find('**/ChtBx_ChtBtn_RLVR'),
|
||||
gui.find('**/ChtBx_ChtBtn_UP')),
|
||||
image3_color=disabledImageColor,
|
||||
image_scale=0.9,
|
||||
relief=None,
|
||||
pos=(-0.103, 0, -0.13),
|
||||
text=TTLocalizer.AvatarPanelSecrets,
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_scale=TTLocalizer.PIPsecretsButton,
|
||||
text_pos=(0.055, -0.01),
|
||||
text_align=TextNode.ALeft,
|
||||
state=avButtonState,
|
||||
command=self.__handleSecrets)
|
||||
self.secretsButton['state'] = DGG.DISABLED
|
||||
if not base.localAvatar.isTeleportAllowed():
|
||||
self.goToButton['state'] = DGG.DISABLED
|
||||
ignoreStr, ignoreCmd, ignoreSize = self.getIgnoreButtonInfo()
|
||||
self.ignoreButton = DirectButton(parent=self.frame, image=(gui.find('**/Ignore_Btn_UP'),
|
||||
gui.find('**/Ignore_Btn_DN'),
|
||||
gui.find('**/Ignore_Btn_RLVR'),
|
||||
gui.find('**/Ignore_Btn_UP')), image3_color=disabledImageColor, image_scale=0.9, relief=None, pos=(-0.103697, 0, -0.21), text=ignoreStr, text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_scale=ignoreSize, text_pos=(0.06, -0.015), text_align=TextNode.ALeft, state=avButtonState, command=ignoreCmd)
|
||||
if base.cr.productName not in ['JP',
|
||||
'DE',
|
||||
'BR',
|
||||
'FR']:
|
||||
self.reportButton = DirectButton(parent=self.frame, image=(gui.find('**/report_BtnUP'),
|
||||
gui.find('**/report_BtnDN'),
|
||||
gui.find('**/report_BtnRLVR'),
|
||||
gui.find('**/report_BtnUP')), image3_color=disabledImageColor, image_scale=0.65, relief=None, pos=(-0.103, 0, -0.29738), text=TTLocalizer.AvatarPanelReport, text0_fg=text0Color, text1_fg=text1Color, text2_fg=text2Color, text3_fg=text3Color, text_scale=0.06, text_pos=(0.06, -0.015), text_align=TextNode.ALeft, command=self.handleReport)
|
||||
self.detailButton = DirectButton(parent=self.frame, image=(gui.find('**/ChtBx_BackBtn_UP'),
|
||||
gui.find('**/ChtBx_BackBtn_DN'),
|
||||
gui.find('**/ChtBx_BackBtn_Rllvr'),
|
||||
gui.find('**/ChtBx_BackBtn_UP')), relief=None, text=('',
|
||||
TTLocalizer.PlayerPanelDetail,
|
||||
TTLocalizer.PlayerPanelDetail,
|
||||
''), text_fg=text2Color, text_shadow=(0, 0, 0, 1), text_scale=TTLocalizer.PIPdetailButton, text_pos=(0.085, 0.055), text_align=TextNode.ACenter, pos=(-0.133773, 0, -0.387132), state=DGG.NORMAL, command=self.__handleDetails)
|
||||
self.ignoreButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/Ignore_Btn_UP'),
|
||||
gui.find('**/Ignore_Btn_DN'),
|
||||
gui.find('**/Ignore_Btn_RLVR'),
|
||||
gui.find('**/Ignore_Btn_UP')),
|
||||
image3_color=disabledImageColor,
|
||||
image_scale=0.9,
|
||||
relief=None,
|
||||
pos=(-0.103697, 0, -0.21),
|
||||
text=ignoreStr,
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_scale=ignoreSize,
|
||||
text_pos=(0.06, -0.015),
|
||||
text_align=TextNode.ALeft,
|
||||
state=avButtonState,
|
||||
command=ignoreCmd)
|
||||
if base.cr.productName not in ['JP', 'DE', 'BR', 'FR']:
|
||||
self.reportButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/report_BtnUP'),
|
||||
gui.find('**/report_BtnDN'),
|
||||
gui.find('**/report_BtnRLVR'),
|
||||
gui.find('**/report_BtnUP')),
|
||||
image3_color=disabledImageColor,
|
||||
image_scale=0.65,
|
||||
relief=None,
|
||||
pos=(-0.103, 0, -0.29738),
|
||||
text=TTLocalizer.AvatarPanelReport,
|
||||
text0_fg=text0Color,
|
||||
text1_fg=text1Color,
|
||||
text2_fg=text2Color,
|
||||
text3_fg=text3Color,
|
||||
text_scale=0.06,
|
||||
text_pos=(0.06, -0.015),
|
||||
text_align=TextNode.ALeft,
|
||||
command=self.handleReport)
|
||||
self.detailButton = DirectButton(
|
||||
parent=self.frame,
|
||||
image=(
|
||||
gui.find('**/ChtBx_BackBtn_UP'),
|
||||
gui.find('**/ChtBx_BackBtn_DN'),
|
||||
gui.find('**/ChtBx_BackBtn_Rllvr'),
|
||||
gui.find('**/ChtBx_BackBtn_UP')),
|
||||
relief=None,
|
||||
text=('', TTLocalizer.PlayerPanelDetail,
|
||||
TTLocalizer.PlayerPanelDetail, ''),
|
||||
text_fg=text2Color,
|
||||
text_shadow=(0, 0, 0, 1),
|
||||
text_scale=TTLocalizer.PIPdetailButton,
|
||||
text_pos=(0.085, 0.055),
|
||||
text_align=TextNode.ACenter,
|
||||
pos=(-0.133773, 0, -0.387132),
|
||||
state=DGG.NORMAL,
|
||||
command=self.__handleDetails)
|
||||
gui.removeNode()
|
||||
menuX = -0.05
|
||||
menuScale = 0.064
|
||||
|
|
Loading…
Reference in a new issue