mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2025-01-09 17:53:50 +00:00
Add toon model into the detail panel
This commit is contained in:
parent
68c2369e8d
commit
b14505435c
2 changed files with 14 additions and 2 deletions
|
@ -1018,7 +1018,7 @@ class CatalogScreen(DirectFrame):
|
||||||
def __makeFFlist(self):
|
def __makeFFlist(self):
|
||||||
for id, handle in base.cr.friendsMap.items():
|
for id, handle in base.cr.friendsMap.items():
|
||||||
if isinstance(handle, FriendHandle.FriendHandle):
|
if isinstance(handle, FriendHandle.FriendHandle):
|
||||||
self.ffList.append((id, handle.getName(), NametagGlobals.getFriendColor(handle)))
|
self.ffList.append((id, handle.getName(), None))#NametagGlobals.getFriendColor(handle)))
|
||||||
|
|
||||||
def __makeScrollList(self):
|
def __makeScrollList(self):
|
||||||
for ff in self.ffList:
|
for ff in self.ffList:
|
||||||
|
|
|
@ -11,6 +11,7 @@ import ToonTeleportPanel
|
||||||
from toontown.toonbase import TTLocalizer
|
from toontown.toonbase import TTLocalizer
|
||||||
from toontown.hood import ZoneUtil
|
from toontown.hood import ZoneUtil
|
||||||
from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels
|
from toontown.toonbase.ToontownBattleGlobals import Tracks, Levels
|
||||||
|
from toontown.toon import Toon
|
||||||
globalAvatarDetail = None
|
globalAvatarDetail = None
|
||||||
|
|
||||||
def showAvatarDetail(avId, avName):
|
def showAvatarDetail(avId, avName):
|
||||||
|
@ -76,7 +77,6 @@ class ToonAvatarDetailPanel(DirectFrame):
|
||||||
self.fsm.request('begin')
|
self.fsm.request('begin')
|
||||||
buttons.removeNode()
|
buttons.removeNode()
|
||||||
gui.removeNode()
|
gui.removeNode()
|
||||||
return
|
|
||||||
|
|
||||||
def cleanup(self):
|
def cleanup(self):
|
||||||
if self.fsm:
|
if self.fsm:
|
||||||
|
@ -165,10 +165,22 @@ class ToonAvatarDetailPanel(DirectFrame):
|
||||||
else:
|
else:
|
||||||
text = TTLocalizer.AvatarDetailPanelOffline % {'identifier': identifier}
|
text = TTLocalizer.AvatarDetailPanelOffline % {'identifier': identifier}
|
||||||
self.dataText['text'] = text
|
self.dataText['text'] = text
|
||||||
|
self.__addToonModel()
|
||||||
self.__updateTrackInfo()
|
self.__updateTrackInfo()
|
||||||
self.__updateTrophyInfo()
|
self.__updateTrophyInfo()
|
||||||
self.__updateLaffInfo()
|
self.__updateLaffInfo()
|
||||||
|
|
||||||
|
def __addToonModel(self):
|
||||||
|
toon = Toon.Toon()
|
||||||
|
toon.setDNA(self.avatar.style)
|
||||||
|
toon.reparentTo(self)
|
||||||
|
toon.setPos(0.45, 0, 0.3)
|
||||||
|
toon.setH(180)
|
||||||
|
toon.setScale(0.11)
|
||||||
|
toon.loop('neutral')
|
||||||
|
toon.setDepthWrite(True)
|
||||||
|
toon.setDepthTest(True)
|
||||||
|
|
||||||
def __updateLaffInfo(self):
|
def __updateLaffInfo(self):
|
||||||
avatar = self.avatar
|
avatar = self.avatar
|
||||||
messenger.send('updateLaffMeter', [avatar, avatar.hp, avatar.maxHp])
|
messenger.send('updateLaffMeter', [avatar, avatar.hp, avatar.maxHp])
|
||||||
|
|
Loading…
Reference in a new issue