2015-03-03 16:10:12 -06:00
|
|
|
import ShtikerPage
|
|
|
|
from direct.gui.DirectGui import *
|
2015-06-23 18:11:48 -05:00
|
|
|
from panda3d.core import *
|
2015-03-03 16:10:12 -06:00
|
|
|
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 14:07:59 -05:00
|
|
|
self.friendPanel = NPCFriendPanel.NPCFriendPanel(parent=self, callable=False)
|
2015-03-03 16:10:12 -06: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 14:07:59 -05:00
|
|
|
self.friendPanel.setFriends(base.localAvatar.NPCFriendsDict)
|
|
|
|
self.friendPanel.update()
|
2015-03-03 16:10:12 -06:00
|
|
|
|
|
|
|
def enter(self):
|
|
|
|
self.updatePage()
|
|
|
|
ShtikerPage.ShtikerPage.enter(self)
|
|
|
|
|
|
|
|
def exit(self):
|
2015-06-16 12:26:44 -05:00
|
|
|
ShtikerPage.ShtikerPage.exit(self)
|