2015-03-03 22:10:12 +00:00
|
|
|
import ShtikerPage
|
|
|
|
from direct.gui.DirectGui import *
|
|
|
|
from pandac.PandaModules import *
|
|
|
|
from toontown.toon import NPCFriendPanel
|
|
|
|
from toontown.toonbase import TTLocalizer
|
|
|
|
|
|
|
|
class NPCFriendPage(ShtikerPage.ShtikerPage):
|
|
|
|
|
|
|
|
def __init__(self):
|
|
|
|
ShtikerPage.ShtikerPage.__init__(self)
|
|
|
|
|
|
|
|
def load(self):
|
|
|
|
self.title = DirectLabel(parent=self, relief=None, text=TTLocalizer.NPCFriendPageTitle, text_scale=0.12, textMayChange=0, pos=(0, 0, 0.6))
|
2015-06-01 19:07:59 +00:00
|
|
|
self.friendPanel = NPCFriendPanel.NPCFriendPanel(parent=self, callable=False)
|
2015-03-03 22:10:12 +00:00
|
|
|
self.friendPanel.setScale(0.1225)
|
|
|
|
self.friendPanel.setZ(-0.03)
|
|
|
|
return
|
|
|
|
|
|
|
|
def unload(self):
|
|
|
|
ShtikerPage.ShtikerPage.unload(self)
|
|
|
|
del self.title
|
|
|
|
del self.friendPanel
|
|
|
|
|
|
|
|
def updatePage(self):
|
2015-06-01 19:07:59 +00:00
|
|
|
self.friendPanel.setFriends(base.localAvatar.NPCFriendsDict)
|
|
|
|
self.friendPanel.update()
|
2015-03-03 22:10:12 +00:00
|
|
|
|
|
|
|
def enter(self):
|
|
|
|
self.updatePage()
|
|
|
|
ShtikerPage.ShtikerPage.enter(self)
|
|
|
|
|
|
|
|
def exit(self):
|
2015-06-16 17:26:44 +00:00
|
|
|
ShtikerPage.ShtikerPage.exit(self)
|