Example #1
0
    def load(self):
        base.cr.renderFrame()
        base.camLens.setMinFov(CIGlobals.DefaultCameraFov / (4.0 / 3.0))
        self.__setupStageToon()
        self.world = loader.loadModel('phase_9/models/cogHQ/SellbotHQExterior.bam')
        self.world.reparentTo(base.render)
        self.world.setPos(0, 227.09, -25.36)
        self.sky = loader.loadModel('phase_9/models/cogHQ/cog_sky.bam')
        self.sky.setScale(1)
        self.sky.reparentTo(base.render)
        self.sky.find('**/InnerGroup').removeNode()
        self.fog = Fog('charSelectFog')
        self.fog.setColor(0.2, 0.2, 0.2)
        self.fog.setExpDensity(0.003)
        base.render.setFog(self.fog)
        self.title = DirectLabel(text=self.TITLE, text_font=CIGlobals.getMickeyFont(), text_fg=(1, 0.9, 0.1, 1), relief=None, text_scale=0.13, pos=(0, 0, 0.82))
        self.charNameLabel = OnscreenText(text='', font=CIGlobals.getMickeyFont(), pos=(-0.25, 0.5, 0), fg=(1, 0.9, 0.1, 1.0))
        self.charNameLabel.hide()
        self.playOrCreateButton = DirectButton(text='', pos=(0.8125, 0, -0.735), command=self.__action, geom=CIGlobals.getDefaultBtnGeom(), text_scale=0.06, relief=None, text_pos=(0, -0.01))
        self.playOrCreateButton.hide()
        self.deleteButton = DirectButton(text='Delete', pos=(0.8125, 0, -0.835), command=self.__action, extraArgs=['delete'], geom=CIGlobals.getDefaultBtnGeom(), text_scale=0.06, relief=None, text_pos=(0, -0.01))
        self.deleteButton.hide()
        self.quitButton = DirectButton(text='Quit', pos=(-1.1, 0, -0.925), command=self.__action, extraArgs=['quit'], text_scale=0.06, geom=CIGlobals.getDefaultBtnGeom(), relief=None, text_pos=(0, -0.01))
        textRolloverColor = Vec4(1, 1, 0, 1)
        textDownColor = Vec4(0.5, 0.9, 1, 1)
        textDisabledColor = Vec4(0.4, 0.8, 0.4, 1)
        for slot in range(6):
            if self.avChooser.hasToonInSlot(slot):
                choice = self.avChooser.getAvChoiceBySlot(slot)
                text = choice.name
            else:
                text = self.NO_TOON
            btn = DirectButton(relief=None, text=text, text_scale=0.06, text_align=TextNode.ALeft, text1_bg=textDownColor, text2_bg=textRolloverColor, text3_fg=textDisabledColor, textMayChange=0, command=self.__handleCharButton, extraArgs=[slot], text_pos=(0, 0, 0.0))
            btn.setPythonTag('slot', slot)
            self.charButtons.append(btn)
            btn['state'] = DGG.NORMAL

        gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui.bam')
        listXorigin = -0.02
        listFrameSizeX = 0.625
        listZorigin = -0.96
        listFrameSizeZ = 1.04
        arrowButtonScale = 1.3
        itemFrameXorigin = -0.237
        itemFrameZorigin = 0.365
        buttonXstart = itemFrameXorigin + 0.293
        self.charList = DirectScrolledList(relief=None, pos=(0.75, 0, 0.08), incButton_image=(gui.find('**/FndsLst_ScrollUp'),
         gui.find('**/FndsLst_ScrollDN'),
         gui.find('**/FndsLst_ScrollUp_Rllvr'),
         gui.find('**/FndsLst_ScrollUp')), incButton_relief=None, incButton_scale=(arrowButtonScale, arrowButtonScale, -arrowButtonScale), incButton_pos=(buttonXstart, 0, itemFrameZorigin - 0.999), incButton_image3_color=Vec4(1, 1, 1, 0.2), decButton_image=(gui.find('**/FndsLst_ScrollUp'),
         gui.find('**/FndsLst_ScrollDN'),
         gui.find('**/FndsLst_ScrollUp_Rllvr'),
         gui.find('**/FndsLst_ScrollUp')), decButton_relief=None, decButton_scale=(arrowButtonScale, arrowButtonScale, arrowButtonScale), decButton_pos=(buttonXstart, 0, itemFrameZorigin + 0.125), decButton_image3_color=Vec4(1, 1, 1, 0.2), itemFrame_pos=(itemFrameXorigin, 0, itemFrameZorigin), itemFrame_scale=1.0, itemFrame_relief=DGG.SUNKEN, itemFrame_frameSize=(listXorigin,
         listXorigin + listFrameSizeX,
         listZorigin,
         listZorigin + listFrameSizeZ), itemFrame_frameColor=(0.85, 0.95, 1, 1), itemFrame_borderWidth=(0.01, 0.01), numItemsVisible=15, forceHeight=0.075, items=self.charButtons)
        base.camera.setPos(75.12, 63.22, -23)
        base.camera.setHpr(26.57, 9.62, 0)
        return
    def loadInvitations(self):
        EventsPage.notify.debug('loadInvitations')
        self.selectedInvitationItem = None
        self.invitationPartyList.removeAndDestroyAllItems()
        self.invitationActivityList.removeAndDestroyAllItems()
        self.invitePartyGoButton['state'] = DirectGuiGlobals.DISABLED
        for partyInfo in base.localAvatar.partiesInvitedTo:
            if partyInfo.status == PartyGlobals.PartyStatus.Cancelled or partyInfo.status == PartyGlobals.PartyStatus.Finished:
                continue
            inviteInfo = None
            for inviteInfo in base.localAvatar.invites:
                if partyInfo.partyId == inviteInfo.partyId:
                    break

            if inviteInfo is None:
                EventsPage.notify.error('No invitation info for party id %d' % partyInfo.partyId)
                return
            if inviteInfo.status == PartyGlobals.InviteStatus.NotRead:
                continue
            hostName = self.getToonNameFromAvId(partyInfo.hostId)
            item = DirectButton(relief=None, text=hostName, text_align=TextNode.ALeft, text_bg=Vec4(0.0, 0.0, 0.0, 0.0), text_scale=0.045, textMayChange=True, command=self.invitePartyClicked)
            PartyUtils.truncateTextOfLabelBasedOnWidth(item, hostName, PartyGlobals.EventsPageHostNameMaxWidth)
            item['extraArgs'] = [item]
            item.setPythonTag('activityIds', partyInfo.getActivityIds())
            item.setPythonTag('partyStatus', partyInfo.status)
            item.setPythonTag('hostId', partyInfo.hostId)
            item.setPythonTag('startTime', partyInfo.startTime)
            self.invitationPartyList.addItem(item)

        return
Example #3
0
 def drawCard(self, id):
     card = self.getCard(UGG.cardId2cardTex[id])
     card.setScale(0.225, 0.3, 0.3)
     card.setR(-90)
     cardBtn = DirectButton(geom=card,
                            relief=None,
                            scale=(0.3, 0.3, 0.23),
                            command=self.placeCard)
     cardBtn.setPythonTag('id', id)
     cardBtn['extraArgs'] = [id, cardBtn]
     cardBtn['state'] = DGG.DISABLED
     if not self.deck:
         self.generate()
     self.deck.addItem(cardBtn)
     self.cardBtns.append(cardBtn)
     self.enableAll(self.unoGame.cardToFollow)
     # Scroll to the card we just added to the deck.
     self.deck.scrollTo(len(self.cardBtns))
     card.removeNode()
     del card
Example #4
0
    def loadInvitations(self):
        EventsPage.notify.debug('loadInvitations')
        self.selectedInvitationItem = None
        self.invitationPartyList.removeAndDestroyAllItems()
        self.invitationActivityList.removeAndDestroyAllItems()
        self.invitePartyGoButton['state'] = DirectGuiGlobals.DISABLED
        for partyInfo in base.localAvatar.partiesInvitedTo:
            if partyInfo.status == PartyGlobals.PartyStatus.Cancelled or partyInfo.status == PartyGlobals.PartyStatus.Finished:
                continue
            inviteInfo = None
            for inviteInfo in base.localAvatar.invites:
                if partyInfo.partyId == inviteInfo.partyId:
                    break

            if inviteInfo is None:
                EventsPage.notify.error('No invitation info for party id %d' %
                                        partyInfo.partyId)
                return
            if inviteInfo.status == PartyGlobals.InviteStatus.NotRead:
                continue
            hostName = self.getToonNameFromAvId(partyInfo.hostId)
            item = DirectButton(relief=None,
                                text=hostName,
                                text_align=TextNode.ALeft,
                                text_bg=Vec4(0.0, 0.0, 0.0, 0.0),
                                text_scale=0.045,
                                textMayChange=True,
                                command=self.invitePartyClicked)
            PartyUtils.truncateTextOfLabelBasedOnWidth(
                item, hostName, PartyGlobals.EventsPageHostNameMaxWidth)
            item['extraArgs'] = [item]
            item.setPythonTag('activityIds', partyInfo.getActivityIds())
            item.setPythonTag('partyStatus', partyInfo.status)
            item.setPythonTag('hostId', partyInfo.hostId)
            item.setPythonTag('startTime', partyInfo.startTime)
            self.invitationPartyList.addItem(item)

        return
    def refresh(self, partyInfoTupleList):
        PublicPartyGui.notify.debug('refresh : partyInfoTupleList = %s' %
                                    partyInfoTupleList)
        self.selectedItem = None
        self.partyList.removeAndDestroyAllItems()
        self.activityList.removeAndDestroyAllItems()
        self.partyStartButton['state'] = DirectGuiGlobals.DISABLED
        sortedList = partyInfoTupleList[:]

        def cmp(left, right):
            if left[2] < right[2]:
                return -1
            if left[2] == right[2]:
                if len(left[4]) < len(right[4]):
                    return -1
                elif len(left[4]) == len(right[4]):
                    return 0
                else:
                    return 1
            else:
                return 1

        sortedList.sort(cmp, reverse=True)
        indexToCut = -1
        for index, partyTuple in enumerate(sortedList):
            numberOfGuests = partyTuple[2]
            if numberOfGuests < PartyGlobals.MaxToonsAtAParty:
                indexToCut = index
                break

        if indexToCut > 0:
            sortedList = sortedList[indexToCut:] + sortedList[:indexToCut]
        for index, partyTuple in enumerate(sortedList):
            shardId = partyTuple[0]
            zoneId = partyTuple[1]
            numberOfGuests = partyTuple[2]
            hostName = partyTuple[3]
            activityIds = partyTuple[4]
            minLeft = partyTuple[5]
            item = DirectButton(relief=DGG.RIDGE,
                                borderWidth=(0.01, 0.01),
                                frameSize=(-0.01, 0.45, -0.015, 0.04),
                                frameColor=self.normalFrameColor,
                                text=hostName,
                                text_align=TextNode.ALeft,
                                text_bg=Vec4(0.0, 0.0, 0.0, 0.0),
                                text_scale=0.045,
                                command=self.partyClicked)
            otherInfoWidth = 0.08
            numActivities = len(activityIds)
            PartyUtils.truncateTextOfLabelBasedOnWidth(
                item, hostName, PartyGlobals.EventsPageGuestNameMaxWidth)
            num = DirectLabel(relief=DGG.RIDGE,
                              borderWidth=(0.01, 0.01),
                              frameSize=(0.0, otherInfoWidth, -0.015, 0.04),
                              frameColor=self.normalFrameColor,
                              text='%d' % numberOfGuests,
                              text_align=TextNode.ALeft,
                              text_scale=0.045,
                              text_pos=(0.01, 0, 0),
                              pos=(0.45, 0.0, 0.0))
            num.reparentTo(item)
            item.numLabel = num
            actLabelPos = num.getPos()
            actLabelPos.setX(actLabelPos.getX() + otherInfoWidth)
            actLabel = DirectLabel(relief=DGG.RIDGE,
                                   borderWidth=(0.01, 0.01),
                                   frameSize=(0.0, otherInfoWidth, -0.015,
                                              0.04),
                                   frameColor=self.normalFrameColor,
                                   text='%d' % numActivities,
                                   text_align=TextNode.ALeft,
                                   text_scale=0.045,
                                   text_pos=(0.01, 0, 0),
                                   pos=actLabelPos)
            actLabel.reparentTo(item)
            item.actLabel = actLabel
            minLabelPos = actLabel.getPos()
            minLabelPos.setX(minLabelPos.getX() + otherInfoWidth)
            minLabel = DirectLabel(relief=DGG.RIDGE,
                                   borderWidth=(0.01, 0.01),
                                   frameSize=(0.0, otherInfoWidth, -0.015,
                                              0.04),
                                   frameColor=self.normalFrameColor,
                                   text='%d' % minLeft,
                                   text_align=TextNode.ALeft,
                                   text_scale=0.045,
                                   text_pos=(0.01, 0, 0),
                                   pos=minLabelPos)
            minLabel.reparentTo(item)
            item.minLabel = minLabel
            item['extraArgs'] = [item]
            item.setPythonTag('shardId', shardId)
            item.setPythonTag('zoneId', zoneId)
            item.setPythonTag('activityIds', activityIds)
            self.partyList.addItem(item)
    def refresh(self, partyInfoTupleList):
        PublicPartyGui.notify.debug('refresh : partyInfoTupleList = %s' % partyInfoTupleList)
        self.selectedItem = None
        self.partyList.removeAndDestroyAllItems()
        self.activityList.removeAndDestroyAllItems()
        self.partyStartButton['state'] = DirectGuiGlobals.DISABLED
        sortedList = partyInfoTupleList[:]

        def cmp(left, right):
            if left[2] < right[2]:
                return -1
            elif left[2] == right[2]:
                if len(left[4]) < len(right[4]):
                    return -1
                elif len(left[4]) == len(right[4]):
                    return 0
                else:
                    return 1
            else:
                return 1

        sortedList.sort(cmp, reverse=True)
        indexToCut = -1
        for index, partyTuple in enumerate(sortedList):
            numberOfGuests = partyTuple[2]
            if numberOfGuests < PartyGlobals.MaxToonsAtAParty:
                indexToCut = index
                break

        if indexToCut > 0:
            sortedList = sortedList[indexToCut:] + sortedList[:indexToCut]
        for index, partyTuple in enumerate(sortedList):
            shardId = partyTuple[0]
            zoneId = partyTuple[1]
            numberOfGuests = partyTuple[2]
            hostName = partyTuple[3]
            activityIds = partyTuple[4]
            minLeft = partyTuple[5]
            item = DirectButton(relief=DGG.RIDGE, borderWidth=(0.01, 0.01), frameSize=(-0.01,
             0.45,
             -0.015,
             0.04), frameColor=self.normalFrameColor, text=hostName, text_align=TextNode.ALeft, text_bg=Vec4(0.0, 0.0, 0.0, 0.0), text_scale=0.045, command=self.partyClicked)
            otherInfoWidth = 0.08
            numActivities = len(activityIds)
            PartyUtils.truncateTextOfLabelBasedOnWidth(item, hostName, PartyGlobals.EventsPageGuestNameMaxWidth)
            num = DirectLabel(relief=DGG.RIDGE, borderWidth=(0.01, 0.01), frameSize=(0.0,
             otherInfoWidth,
             -0.015,
             0.04), frameColor=self.normalFrameColor, text='%d' % numberOfGuests, text_align=TextNode.ALeft, text_scale=0.045, text_pos=(0.01, 0, 0), pos=(0.45, 0.0, 0.0))
            num.reparentTo(item)
            item.numLabel = num
            actLabelPos = num.getPos()
            actLabelPos.setX(actLabelPos.getX() + otherInfoWidth)
            actLabel = DirectLabel(relief=DGG.RIDGE, borderWidth=(0.01, 0.01), frameSize=(0.0,
             otherInfoWidth,
             -0.015,
             0.04), frameColor=self.normalFrameColor, text='%d' % numActivities, text_align=TextNode.ALeft, text_scale=0.045, text_pos=(0.01, 0, 0), pos=actLabelPos)
            actLabel.reparentTo(item)
            item.actLabel = actLabel
            minLabelPos = actLabel.getPos()
            minLabelPos.setX(minLabelPos.getX() + otherInfoWidth)
            minLabel = DirectLabel(relief=DGG.RIDGE, borderWidth=(0.01, 0.01), frameSize=(0.0,
             otherInfoWidth,
             -0.015,
             0.04), frameColor=self.normalFrameColor, text='%d' % minLeft, text_align=TextNode.ALeft, text_scale=0.045, text_pos=(0.01, 0, 0), pos=minLabelPos)
            minLabel.reparentTo(item)
            item.minLabel = minLabel
            item['extraArgs'] = [item]
            item.setPythonTag('shardId', shardId)
            item.setPythonTag('zoneId', zoneId)
            item.setPythonTag('activityIds', activityIds)
            self.partyList.addItem(item)

        return
Example #7
0
    def refresh(self, partyInfoTupleList):
        """
        Called when the public party gui is shown.  partyInfoTupleList is a list
        of tuples of the form:
        ( shardId, zoneId, numberOfGuests, hostName, activityIds, lane )
        """
        PublicPartyGui.notify.debug("refresh : partyInfoTupleList = %s" %
                                    partyInfoTupleList)
        self.selectedItem = None
        self.partyList.removeAndDestroyAllItems()
        self.activityList.removeAndDestroyAllItems()
        self.partyStartButton["state"] = DirectGuiGlobals.DISABLED
        # put parties with most toons at the top
        sortedList = partyInfoTupleList[:]

        #for i in xrange(20):
        #    sortedList.append((202000000, 61000, i+2, "Good ol' Knuckles CrunchenGrooven", [0, 1, 2, 4, 5, 7], 30-i))

        def cmp(left, right):
            if left[2] < right[2]:
                return -1
            elif left[2] == right[2]:
                if len(left[4]) < len(right[4]):
                    return -1
                elif len(left[4]) == len(right[4]):
                    return 0
                else:
                    return 1
            else:
                return 1

        sortedList.sort(cmp, reverse=True)

        # put parties with 20 or more toons on the bottom
        indexToCut = -1
        for index, partyTuple in enumerate(sortedList):
            numberOfGuests = partyTuple[2]
            if numberOfGuests < PartyGlobals.MaxToonsAtAParty:
                indexToCut = index
                break
        if indexToCut > 0:
            sortedList = sortedList[indexToCut:] + sortedList[:indexToCut]

        for index, partyTuple in enumerate(sortedList):
            shardId = partyTuple[0]
            zoneId = partyTuple[1]
            numberOfGuests = partyTuple[2]
            hostName = partyTuple[3]
            if GMUtils.testGMIdentity(hostName):
                hostName = GMUtils.handleGMName(hostName)
            activityIds = partyTuple[4]
            minLeft = partyTuple[5]
            item = DirectButton(
                relief=DGG.RIDGE,
                borderWidth=(0.01, 0.01),
                frameSize=(-0.01, 0.45, -0.015, 0.04),
                frameColor=self.normalFrameColor,
                text=hostName,
                text_align=TextNode.ALeft,
                text_bg=Vec4(0.0, 0.0, 0.0, 0.0),
                text_scale=0.045,
                command=self.partyClicked,
            )
            otherInfoWidth = 0.08
            numActivities = len(activityIds)
            PartyUtils.truncateTextOfLabelBasedOnWidth(
                item, hostName, PartyGlobals.EventsPageGuestNameMaxWidth)
            num = DirectLabel(
                relief=DGG.RIDGE,
                borderWidth=(0.01, 0.01),
                frameSize=(0., otherInfoWidth, -0.015, 0.04),
                frameColor=self.normalFrameColor,
                text="%d" % numberOfGuests,
                text_align=TextNode.ALeft,
                text_scale=0.045,
                text_pos=(0.01, 0, 0),
                pos=(0.45, 0.0, 0.0),
            )
            num.reparentTo(item)
            item.numLabel = num

            actLabelPos = num.getPos()
            actLabelPos.setX(actLabelPos.getX() + otherInfoWidth)
            actLabel = DirectLabel(
                relief=DGG.RIDGE,
                borderWidth=(0.01, 0.01),
                frameSize=(0.0, otherInfoWidth, -0.015, 0.04),
                frameColor=self.normalFrameColor,
                text="%d" % numActivities,
                text_align=TextNode.ALeft,
                text_scale=0.045,
                text_pos=(0.01, 0, 0),
                pos=actLabelPos,
            )
            actLabel.reparentTo(item)
            item.actLabel = actLabel

            minLabelPos = actLabel.getPos()
            minLabelPos.setX(minLabelPos.getX() + otherInfoWidth)
            minLabel = DirectLabel(
                relief=DGG.RIDGE,
                borderWidth=(0.01, 0.01),
                frameSize=(0.0, otherInfoWidth, -0.015, 0.04),
                frameColor=self.normalFrameColor,
                text="%d" % minLeft,
                text_align=TextNode.ALeft,
                text_scale=0.045,
                text_pos=(0.01, 0, 0),
                pos=minLabelPos,
            )
            minLabel.reparentTo(item)
            item.minLabel = minLabel

            item["extraArgs"] = [item]
            item.setPythonTag("shardId", shardId)
            item.setPythonTag("zoneId", zoneId)
            item.setPythonTag("activityIds", activityIds)
            self.partyList.addItem(item)
Example #8
0
    def load(self):
        base.cr.renderFrame()
        base.camLens.setMinFov(CIGlobals.DefaultCameraFov / (4./3.))

        self.__setupStageToon()
        holidayMgr = base.cr.holidayManager

        self.props = []
        self.world = loader.loadModel('phase_9/models/cogHQ/SellbotHQExterior.bam')
        self.world.reparentTo(base.render)
        self.world.setPos(0, 227.09, -25.36)
        self.sky = loader.loadModel('phase_9/models/cogHQ/cog_sky.bam')
        self.sky.setScale(1)
        self.sky.reparentTo(base.render)
        self.sky.find('**/InnerGroup').removeNode()
        self.fog = Fog('charSelectFog')
        self.fog.setColor(0.2, 0.2, 0.2)
        self.fog.setExpDensity(0.003)
        base.render.setFog(self.fog)
        
        # Let's fix the flickering doors.
        doors = self.world.find('**/doors').getChildren()
        
        for door in doors:
            for frameHole in door.findAllMatches('**/doorFrameHole*'): frameHole.removeNode()

        if holidayMgr.getHoliday() == HolidayType.CHRISTMAS:
            piles = {
                'half' : {'pos' : (57.28, 86.47, -25.00), 'hpr' : (46.79, 0, 0)},
                'full' : {'pos' : (71.23, 85.2, -25.00), 'hpr' : (290.82, 0, 0)},
                'half_2' : {'pos' : (-15, 128.69, -25), 'hpr' : (60.26, 0, 0)}
            }

            for pileType, info in piles.items():
                if '_' in pileType:
                    pileType = pileType[:-2]
                pile = loader.loadModel('phase_8/models/props/snow_pile_%s.bam' % (pileType))
                pile.reparentTo(render)
                pile.setPos(info['pos'])
                pile.setHpr(info['hpr'])
                self.props.append(pile)

            self.world.find('**/TopRocks').removeNode()

            snowTxt = loader.loadTexture('winter/maps/sbhq_snow.png')
            self.world.find('**/Ground').setTexture(snowTxt, 1)

            self.particles = ParticleLoader.loadParticleEffect('phase_8/etc/snowdisk.ptf')
            self.particles.setPos(0, 0, 5)
            self.particlesRender = self.world.attachNewNode('snowRender')
            self.particlesRender.setDepthWrite(0)
            self.particlesRender.setBin('fixed', 1)
            self.particles.start(parent = camera, renderParent = self.particlesRender)
            self.fog.setColor(0.486, 0.784, 1)
            self.fog.setExpDensity(0.006)
            base.render.setFog(self.fog)


        self.title = DirectLabel(text=self.TITLE, text_font=CIGlobals.getMickeyFont(), text_fg=(1, 0.9, 0.1, 1),
                                relief=None, text_scale=0.13, pos=(0, 0, 0.82))
        self.charNameLabel = OnscreenText(text = "", font = CIGlobals.getMickeyFont(),
                                        pos = (-0.25, 0.5, 0), fg = (1, 0.9, 0.1, 1.0))
        self.charNameLabel.hide()
        self.frame = DirectFrame()
        self.frame['image'] = DGG.getDefaultDialogGeom()
        self.frame['image_color'] = CIGlobals.DialogColor
        self.frame['image_scale'] = (-0.9, -0.9, 0.8)
        self.frame['image_pos'] = (0.82, 0, -0.125)
        self.playOrCreateButton = DirectButton(text = "", pos = (0.8125, 0, -0.35), command = self.__action,
                                            geom = CIGlobals.getDefaultBtnGeom(), text_scale = 0.06,
                                            relief = None, text_pos = (0, -0.01))
        self.playOrCreateButton.hide()
        self.deleteButton = DirectButton(text = "Delete", pos = (0.8125, 0, -0.45),
                                        command = self.__action, extraArgs = ['delete'],
                                        geom = CIGlobals.getDefaultBtnGeom(), text_scale = 0.06,
                                        relief = None, text_pos = (0, -0.01))
        self.deleteButton.hide()
        self.quitButton = DirectButton(text = "Quit", pos = (-1.10, 0, -0.925), command = self.__action,
                                    extraArgs = ['quit'], text_scale = 0.06, geom = CIGlobals.getDefaultBtnGeom(),
                                    relief = None, text_pos = (0, -0.01))

        textRolloverColor = Vec4(1, 1, 0, 1)
        textDownColor = Vec4(0.5, 0.9, 1, 1)
        textDisabledColor = Vec4(0.4, 0.8, 0.4, 1)

        for slot in range(6):
            if self.avChooser.hasToonInSlot(slot):
                choice = self.avChooser.getAvChoiceBySlot(slot)
                text = choice.name
            else:
                text = self.NO_TOON
            btn = DirectButton(
                relief=None, text = text, text_scale=0.06,
                text_align=TextNode.ALeft, text1_bg=textDownColor, text2_bg=textRolloverColor,
                text3_fg=textDisabledColor, textMayChange=0, command=self.__handleCharButton,
                extraArgs=[slot], text_pos = (0, 0, 0.0)
            )
            btn.setPythonTag('slot', slot)
            self.charButtons.append(btn)
            btn['state'] = DGG.NORMAL

        gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui.bam')
        listXorigin = -0.02
        listFrameSizeX = 0.625
        listZorigin = -0.43
        listFrameSizeZ = 0.51
        arrowButtonScale = 0.0
        itemFrameXorigin = -0.237
        itemFrameZorigin = 0.365
        buttonXstart = itemFrameXorigin + 0.293

        self.charList = DirectScrolledList(
            relief=None,
            pos=(0.75, 0, -0.225),
            incButton_image=None,
            #incButton_relief=None,
            incButton_scale=(arrowButtonScale, arrowButtonScale, -arrowButtonScale),
            #incButton_pos=(buttonXstart, 0, itemFrameZorigin - 0.999),
            #incButton_image3_color=Vec4(1, 1, 1, 0.2),
            decButton_image=None,
            #decButton_relief=None,
            decButton_scale=(arrowButtonScale, arrowButtonScale, arrowButtonScale),
            #decButton_pos=(buttonXstart, 0, itemFrameZorigin + 0.125),
            #decButton_image3_color=Vec4(1, 1, 1, 0.2),
            itemFrame_pos=(itemFrameXorigin, 0, itemFrameZorigin),
            itemFrame_scale=1.0,
            itemFrame_relief=DGG.SUNKEN,
            itemFrame_frameSize=(listXorigin,
                listXorigin + listFrameSizeX,
                listZorigin,
                listZorigin + listFrameSizeZ),
            itemFrame_frameColor=(0.85, 0.95, 1, 1),
            itemFrame_borderWidth=(0.01, 0.01),
            numItemsVisible=15,
            forceHeight=0.075,
            items=self.charButtons,
            parent = self.frame
        )

        base.camera.setPos(75.12, 63.22, -23)
        base.camera.setHpr(26.57, 9.62, 0)