mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
More work
This commit is contained in:
parent
c568a632f1
commit
fa24711bc8
4 changed files with 31 additions and 42 deletions
|
@ -14,7 +14,7 @@ from toontown.toonbase import ToontownGlobals
|
|||
from toontown.toon import Toon
|
||||
import FriendHandle
|
||||
from otp.otpbase import OTPGlobals
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag import NametagGlobals
|
||||
|
||||
class FriendsListManager:
|
||||
notify = DirectNotifyGlobal.directNotify.newCategory('FriendsListManager')
|
||||
|
@ -47,7 +47,7 @@ class FriendsListManager:
|
|||
self.accept('openFriendsList', self.__openFriendsList)
|
||||
self.accept('clickedNametag', self.__handleClickedNametag)
|
||||
base.localAvatar.setFriendsListButtonActive(1)
|
||||
NametagGlobals.setWantActiveNametags(True)
|
||||
NametagGlobals.setMasterNametagsActive(1)
|
||||
self.accept('gotoAvatar', self.__handleGotoAvatar)
|
||||
self.accept('friendAvatar', self.__handleFriendAvatar)
|
||||
self.accept('avatarDetails', self.__handleAvatarDetails)
|
||||
|
@ -65,7 +65,7 @@ class FriendsListManager:
|
|||
self.ignore('openFriendsList')
|
||||
self.ignore('clickedNametag')
|
||||
base.localAvatar.setFriendsListButtonActive(0)
|
||||
NametagGlobals.setWantActiveNametags(False)
|
||||
NametagGlobals.setMasterNametagsActive(0)
|
||||
if self.avatarPanel:
|
||||
self.avatarPanel.cleanup()
|
||||
self.avatarPanel = None
|
||||
|
|
|
@ -8,14 +8,12 @@ from direct.gui.DirectGui import DirectFrame, DirectButton, DirectLabel, DirectS
|
|||
from direct.showbase import DirectObject
|
||||
from direct.showbase import PythonUtil
|
||||
from panda3d.core import *
|
||||
from pandac.PandaModules import Vec3, Vec4, Point3, TextNode, VBase4
|
||||
|
||||
from otp.otpbase import OTPGlobals
|
||||
from otp.otpbase import OTPLocalizer
|
||||
from toontown.nametag.Nametag import Nametag
|
||||
from toontown.nametag.NametagFloat2d import *
|
||||
from toontown.nametag import NametagGlobals
|
||||
from toontown.nametag.NametagGroup import NametagGroup
|
||||
from otp.nametag.NametagGroup import NametagGroup
|
||||
from otp.nametag.Nametag import Nametag
|
||||
from otp.nametag.NametagFloat2d import *
|
||||
from toontown.parties import PartyGlobals
|
||||
from toontown.parties import PartyUtils
|
||||
from toontown.parties.CalendarGuiMonth import CalendarGuiMonth
|
||||
|
@ -278,41 +276,33 @@ class PartyPlanner(DirectFrame, FSM):
|
|||
def __createNametag(self, parent):
|
||||
if self.nametagGroup == None:
|
||||
self.nametagGroup = NametagGroup()
|
||||
interfaceFont = OTPGlobals.getInterfaceFont()
|
||||
self.nametagGroup.setFont(interfaceFont)
|
||||
self.nametagGroup.setChatFont(interfaceFont)
|
||||
self.nametagGroup.setActive(False)
|
||||
self.nametagGroup.setFont(ToontownGlobals.getToonFont())
|
||||
self.nametagGroup.setSpeechFont(ToontownGlobals.getToonFont())
|
||||
self.nametagGroup.setActive(0)
|
||||
self.nametagGroup.setAvatar(self.partyPlannerHead)
|
||||
self.nametagGroup.manage(base.marginManager)
|
||||
nametagColor = NametagGlobals.NametagColors[NametagGlobals.CCNonPlayer]
|
||||
self.nametagGroup.setNametagColor(nametagColor)
|
||||
chatColor = NametagGlobals.ChatColors[NametagGlobals.CCNonPlayer]
|
||||
self.nametagGroup.setChatColor(chatColor)
|
||||
nametag2d = self.nametagGroup.getNametag2d()
|
||||
nametag2d.hideNametag()
|
||||
nametag2d.hideChat()
|
||||
self.nametagGroup.setColorCode(self.nametagGroup.CCNonPlayer)
|
||||
self.nametagGroup.getNametag2d().setContents(0)
|
||||
self.nametagNode = NametagFloat2d()
|
||||
self.nametagNode.hideChat()
|
||||
self.nametagGroup.add(self.nametagNode)
|
||||
self.nametagGroup.setText(base.cr.partyManager.getPartyPlannerName())
|
||||
self.nametagNode.setContents(Nametag.CName)
|
||||
self.nametagGroup.addNametag(self.nametagNode)
|
||||
self.nametagGroup.setName(base.cr.partyManager.getPartyPlannerName())
|
||||
self.nametagNP = parent.attachNewNode(self.nametagNode)
|
||||
nametagPos = self.gui.find('**/step_01_partymanPeteNametag_locator').getPos()
|
||||
self.nametagNP.setPosHprScale(nametagPos[0], 0, nametagPos[2], 0, 0, 0, 0.1, 1, 0.1)
|
||||
self.chatNode = NametagFloat2d()
|
||||
self.chatNode.hideNametag()
|
||||
self.chatNode.showThought()
|
||||
self.nametagGroup.add(self.chatNode)
|
||||
self.nametagGroup.setChatText(TTLocalizer.PartyPlannerInstructions)
|
||||
self.chatNode.setContents(Nametag.CSpeech | Nametag.CThought)
|
||||
self.nametagGroup.addNametag(self.chatNode)
|
||||
self.nametagGroup.setChat(TTLocalizer.PartyPlannerInstructions, CFSpeech)
|
||||
self.chatNP = parent.attachNewNode(self.chatNode)
|
||||
chatPos = self.gui.find('**/step_01_partymanPeteText_locator').getPos()
|
||||
self.chatNP.setPosHprScale(chatPos[0], 0, chatPos[2], 0, 0, 0, 0.08, 1, 0.08)
|
||||
self.nametagGroup.updateAll()
|
||||
|
||||
def clearNametag(self):
|
||||
if self.nametagGroup != None:
|
||||
self.nametagGroup.unmanage(base.marginManager)
|
||||
self.nametagGroup.remove(self.nametagNode)
|
||||
self.nametagGroup.remove(self.chatNode)
|
||||
self.nametagGroup.removeNametag(self.nametagNode)
|
||||
self.nametagGroup.removeNametag(self.chatNode)
|
||||
self.nametagNP.removeNode()
|
||||
self.chatNP.removeNode()
|
||||
del self.nametagNP
|
||||
|
@ -690,7 +680,7 @@ class PartyPlanner(DirectFrame, FSM):
|
|||
goingBackAllowed = False
|
||||
self.confirmTitleLabel['text'] = TTLocalizer.PartyPlannerConfirmationErrorTitle
|
||||
confirmRecapText = TTLocalizer.PartyPlannerConfirmationTooManyText
|
||||
self.nametagGroup.setChatText(confirmRecapText)
|
||||
self.nametagGroup.setChat(confirmRecapText, CFSpeech)
|
||||
self.request('Farewell', goingBackAllowed)
|
||||
|
||||
def __acceptExit(self):
|
||||
|
|
|
@ -3,8 +3,8 @@ from panda3d.core import *
|
|||
|
||||
import ToonHead
|
||||
from toontown.distributed import DelayDelete
|
||||
from toontown.nametag.Nametag import Nametag
|
||||
from toontown.nametag.NametagFloat2d import NametagFloat2d
|
||||
from otp.nametag.Nametag import Nametag
|
||||
from otp.nametag.NametagFloat2d import NametagFloat2d
|
||||
from toontown.toonbase import ToontownGlobals
|
||||
|
||||
|
||||
|
@ -22,14 +22,13 @@ class ToonHeadFrame(DirectFrame):
|
|||
self.headModel.setupHead(self.av.style, forGui=1)
|
||||
self.headModel.reparentTo(self.head)
|
||||
self.tag1Node = NametagFloat2d()
|
||||
self.tag1Node.hideNametag()
|
||||
self.tag1Node.showThought()
|
||||
self.av.nametag.add(self.tag1Node)
|
||||
self.tag1Node.setContents(Nametag.CSpeech | Nametag.CThought)
|
||||
self.av.nametag.addNametag(self.tag1Node)
|
||||
self.tag1 = self.attachNewNode(self.tag1Node)
|
||||
self.tag1.setPosHprScale(-0.16, 0, -0.09, 0, 0, 0, 0.055, 0.055, 0.055)
|
||||
self.tag2Node = NametagFloat2d()
|
||||
self.tag2Node.hideChat()
|
||||
self.av.nametag.add(self.tag2Node)
|
||||
self.tag2Node.setContents(Nametag.CName)
|
||||
self.av.nametag.addNametag(self.tag2Node)
|
||||
self.tag2 = self.attachNewNode(self.tag2Node)
|
||||
self.tag2.setPosHprScale(-0.27, 10.0, 0.16, 0, 0, 0, 0.05, 0.05, 0.05)
|
||||
self.extraData = DirectLabel(parent=self, relief=None, pos=(0.0, 0.0, 0.06), scale=1.0, text='', text0_fg=(0.3, 0.2, 1, 1), text_scale=(0.14, 0.06), text_pos=(0, -0.01))
|
||||
|
@ -42,8 +41,8 @@ class ToonHeadFrame(DirectFrame):
|
|||
self.head.removeNode()
|
||||
del self.head
|
||||
if not self.av.isEmpty():
|
||||
self.av.nametag.remove(self.tag1Node)
|
||||
self.av.nametag.remove(self.tag2Node)
|
||||
self.av.nametag.removeNametag(self.tag1Node)
|
||||
self.av.nametag.removeNametag(self.tag2Node)
|
||||
self.tag1.removeNode()
|
||||
self.tag2.removeNode()
|
||||
del self.tag1
|
||||
|
|
|
@ -19,7 +19,7 @@ from toontown.toon.Toon import teleportDebug
|
|||
from toontown.estate import HouseGlobals
|
||||
from toontown.toonbase import TTLocalizer
|
||||
from direct.interval.IntervalGlobal import *
|
||||
from toontown.nametag import NametagGlobals
|
||||
from otp.nametag import NametagGlobals
|
||||
|
||||
visualizeZones = base.config.GetBool('visualize-zones', 0)
|
||||
|
||||
|
@ -104,7 +104,7 @@ class Street(BattlePlace.BattlePlace):
|
|||
base.localAvatar.setGeom(self.loader.geom)
|
||||
base.localAvatar.setOnLevelGround(1)
|
||||
self._telemLimiter = TLGatherAllAvs('Street', RotationLimitToH)
|
||||
NametagGlobals.setWant2dNametags(arrowsOn)
|
||||
NametagGlobals.setMasterArrowsOn(arrowsOn)
|
||||
self.zone = ZoneUtil.getBranchZone(requestStatus['zoneId'])
|
||||
|
||||
def __lightDecorationOn__():
|
||||
|
@ -147,7 +147,7 @@ class Street(BattlePlace.BattlePlace):
|
|||
light.reparentTo(hidden)
|
||||
|
||||
newsManager = base.cr.newsManager
|
||||
NametagGlobals.setWant2dNametags(False)
|
||||
NametagGlobals.setMasterArrowsOn(0)
|
||||
self.loader.hood.stopSky()
|
||||
self.loader.music.stop()
|
||||
base.localAvatar.setGeom(render)
|
||||
|
|
Loading…
Reference in a new issue