mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-24 04:02:40 -06:00
Delete All button in clerk purchase gui + a bit of inventorynew cleanup
This commit is contained in:
parent
3766374c80
commit
1c10218bb2
3 changed files with 75 additions and 193 deletions
|
@ -115,8 +115,6 @@ class InventoryPage(ShtikerPage.ShtikerPage):
|
||||||
base.localAvatar.inventory.reparentTo(self)
|
base.localAvatar.inventory.reparentTo(self)
|
||||||
self.__moneyChange(base.localAvatar.getMoney())
|
self.__moneyChange(base.localAvatar.getMoney())
|
||||||
self.__bankMoneyChange(base.localAvatar.getBankMoney())
|
self.__bankMoneyChange(base.localAvatar.getBankMoney())
|
||||||
self.accept('enterBookDelete', self.enterDeleteMode)
|
|
||||||
self.accept('exitBookDelete', self.exitDeleteMode)
|
|
||||||
self.accept('enterTrackFrame', self.updateTrackInfo)
|
self.accept('enterTrackFrame', self.updateTrackInfo)
|
||||||
self.accept('exitTrackFrame', self.clearTrackInfo)
|
self.accept('exitTrackFrame', self.clearTrackInfo)
|
||||||
self.accept(localAvatar.uniqueName('moneyChange'), self.__moneyChange)
|
self.accept(localAvatar.uniqueName('moneyChange'), self.__moneyChange)
|
||||||
|
@ -125,8 +123,6 @@ class InventoryPage(ShtikerPage.ShtikerPage):
|
||||||
def exit(self):
|
def exit(self):
|
||||||
ShtikerPage.ShtikerPage.exit(self)
|
ShtikerPage.ShtikerPage.exit(self)
|
||||||
self.clearTrackInfo(self.currentTrackInfo)
|
self.clearTrackInfo(self.currentTrackInfo)
|
||||||
self.ignore('enterBookDelete')
|
|
||||||
self.ignore('exitBookDelete')
|
|
||||||
self.ignore('enterTrackFrame')
|
self.ignore('enterTrackFrame')
|
||||||
self.ignore('exitTrackFrame')
|
self.ignore('exitTrackFrame')
|
||||||
self.ignore(localAvatar.uniqueName('moneyChange'))
|
self.ignore(localAvatar.uniqueName('moneyChange'))
|
||||||
|
@ -134,17 +130,6 @@ class InventoryPage(ShtikerPage.ShtikerPage):
|
||||||
self.makePageWhite(None)
|
self.makePageWhite(None)
|
||||||
base.localAvatar.inventory.hide()
|
base.localAvatar.inventory.hide()
|
||||||
base.localAvatar.inventory.reparentTo(hidden)
|
base.localAvatar.inventory.reparentTo(hidden)
|
||||||
self.exitDeleteMode()
|
|
||||||
|
|
||||||
def enterDeleteMode(self):
|
|
||||||
self.title['text'] = TTLocalizer.InventoryPageDeleteTitle
|
|
||||||
self.title['text_fg'] = (0, 0, 0, 1)
|
|
||||||
self.book['image_color'] = Vec4(1, 1, 0, 1)
|
|
||||||
|
|
||||||
def exitDeleteMode(self):
|
|
||||||
self.title['text'] = TTLocalizer.InventoryPageTitle
|
|
||||||
self.title['text_fg'] = (0, 0, 0, 1)
|
|
||||||
self.book['image_color'] = Vec4(1, 1, 1, 1)
|
|
||||||
|
|
||||||
def updateTrackInfo(self, trackIndex):
|
def updateTrackInfo(self, trackIndex):
|
||||||
self.currentTrackInfo = trackIndex
|
self.currentTrackInfo = trackIndex
|
||||||
|
|
|
@ -139,6 +139,8 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
del self.battleFrame
|
del self.battleFrame
|
||||||
del self.purchaseFrame
|
del self.purchaseFrame
|
||||||
del self.storePurchaseFrame
|
del self.storePurchaseFrame
|
||||||
|
self.deleteAllButton.destroy()
|
||||||
|
del self.deleteAllButton
|
||||||
self.deleteEnterButton.destroy()
|
self.deleteEnterButton.destroy()
|
||||||
del self.deleteEnterButton
|
del self.deleteEnterButton
|
||||||
self.deleteExitButton.destroy()
|
self.deleteExitButton.destroy()
|
||||||
|
@ -187,7 +189,9 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.purchaseFrame = None
|
self.purchaseFrame = None
|
||||||
self.storePurchaseFrame = None
|
self.storePurchaseFrame = None
|
||||||
trashcanGui = loader.loadModel('phase_3/models/gui/trashcan_gui')
|
trashcanGui = loader.loadModel('phase_3/models/gui/trashcan_gui')
|
||||||
self.deleteEnterButton = DirectButton(parent=self.invFrame, image=(trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_RLVR')), text=('', TTLocalizer.InventoryDelete, TTLocalizer.InventoryDelete), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.1, text_pos=(0, -0.1), text_font=getInterfaceFont(), textMayChange=0, relief=None, pos=(-1, 0, -0.35), scale=1.0)
|
trashcanImage = (trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_RLVR'))
|
||||||
|
self.deleteEnterButton = DirectButton(parent=self.invFrame, image=trashcanImage, text=('', TTLocalizer.InventoryDelete, TTLocalizer.InventoryDelete), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.1, text_pos=(0, -0.1), text_font=getInterfaceFont(), textMayChange=0, relief=None, pos=(-1, 0, -0.35), scale=1.0)
|
||||||
|
self.deleteAllButton = DirectButton(parent=self.invFrame, image=trashcanImage, text=('', TTLocalizer.InventoryDeleteAll, TTLocalizer.InventoryDeleteAll), text_fg=(1, 0, 0, 1), text_shadow=(1, 1, 1, 1), text_scale=0.1, text_pos=(0, -0.1), text_font=getInterfaceFont(), textMayChange=0, relief=None, pos=(-0.3, 0, -0.91), scale=0.75, command=self.__zeroInvAndUpdate)
|
||||||
self.deleteExitButton = DirectButton(parent=self.invFrame, image=(trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_RLVR')), text=('', TTLocalizer.InventoryDone, TTLocalizer.InventoryDone), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.1, text_pos=(0, -0.1), text_font=getInterfaceFont(), textMayChange=0, relief=None, pos=(-1, 0, -0.35), scale=1.0)
|
self.deleteExitButton = DirectButton(parent=self.invFrame, image=(trashcanGui.find('**/TrashCan_OPEN'), trashcanGui.find('**/TrashCan_CLSD'), trashcanGui.find('**/TrashCan_RLVR')), text=('', TTLocalizer.InventoryDone, TTLocalizer.InventoryDone), text_fg=(1, 1, 1, 1), text_shadow=(0, 0, 0, 1), text_scale=0.1, text_pos=(0, -0.1), text_font=getInterfaceFont(), textMayChange=0, relief=None, pos=(-1, 0, -0.35), scale=1.0)
|
||||||
trashcanGui.removeNode()
|
trashcanGui.removeNode()
|
||||||
self.deleteHelpText = DirectLabel(parent=self.invFrame, relief=None, pos=(0.272, 0.3, -0.907), text=TTLocalizer.InventoryDeleteHelp, text_fg=(0, 0, 0, 1), text_scale=0.08, textMayChange=0)
|
self.deleteHelpText = DirectLabel(parent=self.invFrame, relief=None, pos=(0.272, 0.3, -0.907), text=TTLocalizer.InventoryDeleteHelp, text_fg=(0, 0, 0, 1), text_scale=0.08, textMayChange=0)
|
||||||
|
@ -234,10 +238,8 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
button.bind(DGG.EXIT, self.hideDetail)
|
button.bind(DGG.EXIT, self.hideDetail)
|
||||||
self.buttons[track].append(button)
|
self.buttons[track].append(button)
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def __handleSelection(self, track, level):
|
def __handleSelection(self, track, level):
|
||||||
if self.activateMode == 'purchaseDelete' or self.activateMode == 'bookDelete' or self.activateMode == 'storePurchaseDelete':
|
if self.activateMode == 'purchaseDelete' or self.activateMode == 'storePurchaseDelete':
|
||||||
if self.numItem(track, level):
|
if self.numItem(track, level):
|
||||||
self.useItem(track, level)
|
self.useItem(track, level)
|
||||||
self.updateGUI(track, level)
|
self.updateGUI(track, level)
|
||||||
|
@ -266,6 +268,10 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
def __handleBackToPlayground(self):
|
def __handleBackToPlayground(self):
|
||||||
messenger.send('inventory-back-to-playground')
|
messenger.send('inventory-back-to-playground')
|
||||||
|
|
||||||
|
def __zeroInvAndUpdate(self):
|
||||||
|
self.zeroInv()
|
||||||
|
self.updateGUI()
|
||||||
|
|
||||||
def showDetail(self, track, level, event = None):
|
def showDetail(self, track, level, event = None):
|
||||||
self.totalLabel.hide()
|
self.totalLabel.hide()
|
||||||
self.detailNameLabel.show()
|
self.detailNameLabel.show()
|
||||||
|
@ -375,8 +381,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
def deactivateButtons(self):
|
def deactivateButtons(self):
|
||||||
if self.previousActivateMode == 'book':
|
if self.previousActivateMode == 'book':
|
||||||
self.bookDeactivateButtons()
|
self.bookDeactivateButtons()
|
||||||
elif self.previousActivateMode == 'bookDelete':
|
|
||||||
self.bookDeleteDeactivateButtons()
|
|
||||||
elif self.previousActivateMode == 'purchaseDelete':
|
elif self.previousActivateMode == 'purchaseDelete':
|
||||||
self.purchaseDeleteDeactivateButtons()
|
self.purchaseDeleteDeactivateButtons()
|
||||||
elif self.previousActivateMode == 'purchase':
|
elif self.previousActivateMode == 'purchase':
|
||||||
|
@ -403,8 +407,6 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
if hasattr(self, 'activateMode'):
|
if hasattr(self, 'activateMode'):
|
||||||
if self.activateMode == 'book':
|
if self.activateMode == 'book':
|
||||||
self.bookActivateButtons()
|
self.bookActivateButtons()
|
||||||
elif self.activateMode == 'bookDelete':
|
|
||||||
self.bookDeleteActivateButtons()
|
|
||||||
elif self.activateMode == 'purchaseDelete':
|
elif self.activateMode == 'purchaseDelete':
|
||||||
self.purchaseDeleteActivateButtons()
|
self.purchaseDeleteActivateButtons()
|
||||||
elif self.activateMode == 'purchase':
|
elif self.activateMode == 'purchase':
|
||||||
|
@ -433,16 +435,12 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.detailFrame.setPos(-0.05, 0, -0.855)
|
self.detailFrame.setPos(-0.05, 0, -0.855)
|
||||||
self.detailFrame.setScale(0.75)
|
self.detailFrame.setScale(0.75)
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteEnterButton.setPos(1.029, 0, -0.639)
|
self.deleteAllButton.hide()
|
||||||
self.deleteEnterButton.setScale(0.75)
|
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(1.029, 0, -0.639)
|
|
||||||
self.deleteExitButton.setScale(0.75)
|
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
self.invFrame.setPos(0, 0, 0)
|
self.invFrame.setPos(0, 0, 0)
|
||||||
self.invFrame.setScale(1)
|
self.invFrame.setScale(1)
|
||||||
self.deleteEnterButton['command'] = self.setActivateMode
|
|
||||||
self.deleteEnterButton['extraArgs'] = ['bookDelete']
|
|
||||||
for track in xrange(len(Tracks)):
|
for track in xrange(len(Tracks)):
|
||||||
if self.toon.hasTrackAccess(track):
|
if self.toon.hasTrackAccess(track):
|
||||||
self.showTrack(track)
|
self.showTrack(track)
|
||||||
|
@ -457,28 +455,10 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
else:
|
else:
|
||||||
self.hideTrack(track)
|
self.hideTrack(track)
|
||||||
|
|
||||||
return None
|
|
||||||
|
|
||||||
def bookDeactivateButtons(self):
|
def bookDeactivateButtons(self):
|
||||||
self.deleteEnterButton['command'] = None
|
self.deleteEnterButton['command'] = None
|
||||||
return
|
|
||||||
|
|
||||||
def bookDeleteActivateButtons(self):
|
def updateDeleteButtons(self):
|
||||||
messenger.send('enterBookDelete')
|
|
||||||
self.setPos(-0.2, 0, 0.4)
|
|
||||||
self.setScale(0.8)
|
|
||||||
self.deleteEnterButton.hide()
|
|
||||||
self.deleteEnterButton.setPos(1.029, 0, -0.639)
|
|
||||||
self.deleteEnterButton.setScale(0.75)
|
|
||||||
self.deleteExitButton.show()
|
|
||||||
self.deleteExitButton.setPos(1.029, 0, -0.639)
|
|
||||||
self.deleteExitButton.setScale(0.75)
|
|
||||||
self.deleteHelpText.show()
|
|
||||||
self.invFrame.reparentTo(self)
|
|
||||||
self.invFrame.setPos(0, 0, 0)
|
|
||||||
self.invFrame.setScale(1)
|
|
||||||
self.deleteExitButton['command'] = self.setActivateMode
|
|
||||||
self.deleteExitButton['extraArgs'] = [self.previousActivateMode]
|
|
||||||
for track in xrange(len(Tracks)):
|
for track in xrange(len(Tracks)):
|
||||||
if self.toon.hasTrackAccess(track):
|
if self.toon.hasTrackAccess(track):
|
||||||
self.showTrack(track)
|
self.showTrack(track)
|
||||||
|
@ -486,20 +466,45 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
button = self.buttons[track][level]
|
button = self.buttons[track][level]
|
||||||
if self.itemIsUsable(track, level):
|
if self.itemIsUsable(track, level):
|
||||||
button.show()
|
button.show()
|
||||||
if self.numItem(track, level) <= 0:
|
if self.numItem(track, level) <= 0 or level >= UBER_GAG_LEVEL_INDEX:
|
||||||
self.makeUnpressable(button, track, level)
|
self.makeUnpressable(button, track, level)
|
||||||
else:
|
else:
|
||||||
self.makeDeletePressable(button, track, level)
|
self.makeDeletePressable(button, track, level)
|
||||||
else:
|
else:
|
||||||
button.hide()
|
button.hide()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.hideTrack(track)
|
self.hideTrack(track)
|
||||||
|
|
||||||
def bookDeleteDeactivateButtons(self):
|
def updateUseableButtons(self):
|
||||||
messenger.send('exitBookDelete')
|
for track in xrange(len(Tracks)):
|
||||||
self.deleteHelpText.hide()
|
if self.toon.hasTrackAccess(track):
|
||||||
self.deleteDeactivateButtons()
|
self.showTrack(track)
|
||||||
|
for level in xrange(len(Levels[track])):
|
||||||
|
button = self.buttons[track][level]
|
||||||
|
if self.itemIsUsable(track, level):
|
||||||
|
button.show()
|
||||||
|
self.makeUnpressable(button, track, level)
|
||||||
|
else:
|
||||||
|
button.hide()
|
||||||
|
else:
|
||||||
|
self.hideTrack(track)
|
||||||
|
|
||||||
|
def updatePurchaseButtons(self):
|
||||||
|
for track in xrange(len(Tracks)):
|
||||||
|
if self.toon.hasTrackAccess(track):
|
||||||
|
self.showTrack(track)
|
||||||
|
for level in xrange(len(Levels[track])):
|
||||||
|
button = self.buttons[track][level]
|
||||||
|
if self.itemIsUsable(track, level):
|
||||||
|
button.show()
|
||||||
|
if self.numItem(track, level) >= self.getMax(track, level) or self.totalProps == self.toon.getMaxCarry() or level > LAST_REGULAR_GAG_LEVEL:
|
||||||
|
self.makeUnpressable(button, track, level)
|
||||||
|
else:
|
||||||
|
self.makePressable(button, track, level)
|
||||||
|
else:
|
||||||
|
button.hide()
|
||||||
|
else:
|
||||||
|
self.hideTrack(track)
|
||||||
|
|
||||||
def purchaseDeleteActivateButtons(self):
|
def purchaseDeleteActivateButtons(self):
|
||||||
self.reparentTo(aspect2d)
|
self.reparentTo(aspect2d)
|
||||||
|
@ -514,52 +519,20 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.detailFrame.setPos(1.17, 0, -0.02)
|
self.detailFrame.setPos(1.17, 0, -0.02)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteEnterButton.setPos(-0.441, 0, -0.917)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.show()
|
self.deleteExitButton.show()
|
||||||
self.deleteExitButton.setPos(-0.441, 0, -0.917)
|
self.deleteExitButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
self.deleteExitButton['command'] = self.setActivateMode
|
self.deleteExitButton['command'] = self.setActivateMode
|
||||||
self.deleteExitButton['extraArgs'] = [self.previousActivateMode]
|
self.deleteExitButton['extraArgs'] = [self.previousActivateMode]
|
||||||
for track in xrange(len(Tracks)):
|
self.updateDeleteButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
if self.numItem(track, level) <= 0 or level >= UBER_GAG_LEVEL_INDEX:
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
self.makeDeletePressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def purchaseDeleteDeactivateButtons(self):
|
def purchaseDeleteDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
self.purchaseFrame.hide()
|
self.purchaseFrame.hide()
|
||||||
self.deleteDeactivateButtons()
|
self.deleteDeactivateButtons()
|
||||||
for track in xrange(len(Tracks)):
|
self.updateDeleteButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
if self.numItem(track, level) <= 0 or level >= UBER_GAG_LEVEL_INDEX:
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
self.makeDeletePressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
def storePurchaseDeleteActivateButtons(self):
|
def storePurchaseDeleteActivateButtons(self):
|
||||||
self.reparentTo(aspect2d)
|
self.reparentTo(aspect2d)
|
||||||
|
@ -574,31 +547,14 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.detailFrame.setPos(1.175, 0, 0)
|
self.detailFrame.setPos(1.175, 0, 0)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteEnterButton.setPos(-0.55, 0, -0.91)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.show()
|
self.deleteExitButton.show()
|
||||||
self.deleteExitButton.setPos(-0.55, 0, -0.91)
|
self.deleteExitButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
self.deleteExitButton['command'] = self.setActivateMode
|
self.deleteExitButton['command'] = self.setActivateMode
|
||||||
self.deleteExitButton['extraArgs'] = [self.previousActivateMode]
|
self.deleteExitButton['extraArgs'] = [self.previousActivateMode]
|
||||||
for track in xrange(len(Tracks)):
|
self.updateDeleteButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
if self.numItem(track, level) <= 0 or level >= UBER_GAG_LEVEL_INDEX:
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
self.makeDeletePressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def storePurchaseDeleteDeactivateButtons(self):
|
def storePurchaseDeleteDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
|
@ -617,27 +573,14 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(0.81)
|
self.invFrame.setScale(0.81)
|
||||||
self.detailFrame.setPos(1.175, 0, 0)
|
self.detailFrame.setPos(1.175, 0, 0)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
|
self.deleteAllButton.show()
|
||||||
self.deleteEnterButton.show()
|
self.deleteEnterButton.show()
|
||||||
self.deleteEnterButton.setPos(-0.55, 0, -0.91)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(-0.551, 0, -0.91)
|
self.deleteExitButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
for track in xrange(len(Tracks)):
|
self.updateUseableButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def storePurchaseBrokeDeactivateButtons(self):
|
def storePurchaseBrokeDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
|
@ -686,36 +629,19 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(0.81)
|
self.invFrame.setScale(0.81)
|
||||||
self.detailFrame.setPos(1.17, 0, -0.02)
|
self.detailFrame.setPos(1.17, 0, -0.02)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
totalProps = self.totalProps
|
self.deleteAllButton.show()
|
||||||
maxProps = self.toon.getMaxCarry()
|
|
||||||
self.deleteEnterButton.show()
|
self.deleteEnterButton.show()
|
||||||
self.deleteEnterButton.setPos(-0.441, 0, -0.917)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(-0.441, 0, -0.917)
|
self.deleteExitButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
if self.gagTutMode:
|
if self.gagTutMode:
|
||||||
|
self.deleteAllButton.hide()
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteEnterButton['command'] = self.setActivateMode
|
self.deleteEnterButton['command'] = self.setActivateMode
|
||||||
self.deleteEnterButton['extraArgs'] = ['purchaseDelete']
|
self.deleteEnterButton['extraArgs'] = ['purchaseDelete']
|
||||||
for track in xrange(len(Tracks)):
|
self.updatePurchaseButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
if self.numItem(track, level) >= self.getMax(track, level) or totalProps == maxProps or level > LAST_REGULAR_GAG_LEVEL:
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
self.makePressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def purchaseDeactivateButtons(self):
|
def purchaseDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
|
@ -733,31 +659,16 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(0.81)
|
self.invFrame.setScale(0.81)
|
||||||
self.detailFrame.setPos(1.175, 0, 0)
|
self.detailFrame.setPos(1.175, 0, 0)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
totalProps = self.totalProps
|
self.deleteAllButton.show()
|
||||||
maxProps = self.toon.getMaxCarry()
|
|
||||||
self.deleteEnterButton.show()
|
self.deleteEnterButton.show()
|
||||||
self.deleteEnterButton.setPos(-0.55, 0, -0.91)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(-0.55, 0, -0.91)
|
self.deleteExitButton.setPos(-0.8, 0, -0.91)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
self.deleteEnterButton['command'] = self.setActivateMode
|
self.deleteEnterButton['command'] = self.setActivateMode
|
||||||
self.deleteEnterButton['extraArgs'] = ['storePurchaseDelete']
|
self.deleteEnterButton['extraArgs'] = ['storePurchaseDelete']
|
||||||
for track in xrange(len(Tracks)):
|
self.updatePurchaseButtons()
|
||||||
if self.toon.hasTrackAccess(track):
|
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
if self.numItem(track, level) >= self.getMax(track, level) or totalProps == maxProps or level > LAST_REGULAR_GAG_LEVEL:
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
self.makePressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
def storePurchaseDeactivateButtons(self):
|
def storePurchaseDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
|
@ -775,13 +686,15 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(0.81)
|
self.invFrame.setScale(0.81)
|
||||||
self.detailFrame.setPos(1.17, 0, -0.02)
|
self.detailFrame.setPos(1.17, 0, -0.02)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
|
self.deleteAllButton.show()
|
||||||
self.deleteEnterButton.show()
|
self.deleteEnterButton.show()
|
||||||
self.deleteEnterButton.setPos(-0.441, 0, -0.917)
|
self.deleteEnterButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteEnterButton.setScale(0.75)
|
self.deleteEnterButton.setScale(0.75)
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(-0.441, 0, -0.917)
|
self.deleteExitButton.setPos(-0.8, 0, -0.917)
|
||||||
self.deleteExitButton.setScale(0.75)
|
self.deleteExitButton.setScale(0.75)
|
||||||
if self.gagTutMode:
|
if self.gagTutMode:
|
||||||
|
self.deleteAllButton.hide()
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
for track in xrange(len(Tracks)):
|
for track in xrange(len(Tracks)):
|
||||||
if self.toon.hasTrackAccess(track):
|
if self.toon.hasTrackAccess(track):
|
||||||
|
@ -816,28 +729,10 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(0.81)
|
self.invFrame.setScale(0.81)
|
||||||
self.detailFrame.setPos(1.17, 0, -0.02)
|
self.detailFrame.setPos(1.17, 0, -0.02)
|
||||||
self.detailFrame.setScale(1.25)
|
self.detailFrame.setScale(1.25)
|
||||||
self.deleteEnterButton.show()
|
|
||||||
self.deleteEnterButton.setPos(-0.441, 0, -0.917)
|
|
||||||
self.deleteEnterButton.setScale(0.75)
|
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.deleteExitButton.setPos(-0.441, 0, -0.917)
|
|
||||||
self.deleteExitButton.setScale(0.75)
|
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
for track in xrange(len(Tracks)):
|
self.deleteAllButton.hide()
|
||||||
if self.toon.hasTrackAccess(track):
|
self.updateUseableButtons()
|
||||||
self.showTrack(track)
|
|
||||||
for level in xrange(len(Levels[track])):
|
|
||||||
button = self.buttons[track][level]
|
|
||||||
if self.itemIsUsable(track, level):
|
|
||||||
button.show()
|
|
||||||
self.makeUnpressable(button, track, level)
|
|
||||||
else:
|
|
||||||
button.hide()
|
|
||||||
|
|
||||||
else:
|
|
||||||
self.hideTrack(track)
|
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def gagTutDisabledDeactivateButtons(self):
|
def gagTutDisabledDeactivateButtons(self):
|
||||||
self.invFrame.reparentTo(self)
|
self.invFrame.reparentTo(self)
|
||||||
|
@ -857,6 +752,7 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(1)
|
self.invFrame.setScale(1)
|
||||||
self.detailFrame.setPos(1.125, 0, -0.08)
|
self.detailFrame.setPos(1.125, 0, -0.08)
|
||||||
self.detailFrame.setScale(1)
|
self.detailFrame.setScale(1)
|
||||||
|
self.deleteAllButton.hide()
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
if self.bldg == 1:
|
if self.bldg == 1:
|
||||||
|
@ -919,6 +815,7 @@ class InventoryNew(InventoryBase.InventoryBase, DirectFrame):
|
||||||
self.invFrame.setScale(1)
|
self.invFrame.setScale(1)
|
||||||
self.detailFrame.setPos(1.125, 0, -0.08)
|
self.detailFrame.setPos(1.125, 0, -0.08)
|
||||||
self.detailFrame.setScale(1)
|
self.detailFrame.setScale(1)
|
||||||
|
self.deleteAllButton.hide()
|
||||||
self.deleteEnterButton.hide()
|
self.deleteEnterButton.hide()
|
||||||
self.deleteExitButton.hide()
|
self.deleteExitButton.hide()
|
||||||
self.runButton.hide()
|
self.runButton.hide()
|
||||||
|
|
|
@ -3295,7 +3295,6 @@ PhotoPageDirectory = 'Open Folder'
|
||||||
PhotoPageTutorial = 'You haven\'t taken any snapshots yet! Press TAB to change your camera angle, and press F9 to take a snapshot.\n\n Once you\'ve made a snapshot, come here to manage and name them.'
|
PhotoPageTutorial = 'You haven\'t taken any snapshots yet! Press TAB to change your camera angle, and press F9 to take a snapshot.\n\n Once you\'ve made a snapshot, come here to manage and name them.'
|
||||||
BuildingPageTitle = 'Buildings\n(Coming Soon)'
|
BuildingPageTitle = 'Buildings\n(Coming Soon)'
|
||||||
InventoryPageTitle = 'Gags'
|
InventoryPageTitle = 'Gags'
|
||||||
InventoryPageDeleteTitle = 'DELETE GAGS'
|
|
||||||
InventoryPageTrackFull = 'You have all the gags in the %s track.'
|
InventoryPageTrackFull = 'You have all the gags in the %s track.'
|
||||||
InventoryPagePluralPoints = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s points.'
|
InventoryPagePluralPoints = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s points.'
|
||||||
InventoryPageSinglePoint = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s point.'
|
InventoryPageSinglePoint = 'You will get a new\n%(trackName)s gag when you\nget %(numPoints)s more %(trackName)s point.'
|
||||||
|
@ -3986,6 +3985,7 @@ InventoryTotalGags = 'Total gags\n%d / %d'
|
||||||
InventroyPinkSlips = '%s Pink Slips'
|
InventroyPinkSlips = '%s Pink Slips'
|
||||||
InventroyPinkSlip = '1 Pink Slip'
|
InventroyPinkSlip = '1 Pink Slip'
|
||||||
InventoryDelete = 'DELETE'
|
InventoryDelete = 'DELETE'
|
||||||
|
InventoryDeleteAll = 'DELETE ALL'
|
||||||
InventoryDone = 'DONE'
|
InventoryDone = 'DONE'
|
||||||
InventoryDeleteHelp = 'Click on a gag to DELETE it.'
|
InventoryDeleteHelp = 'Click on a gag to DELETE it.'
|
||||||
InventorySkillCredit = 'Skill credit: %s'
|
InventorySkillCredit = 'Skill credit: %s'
|
||||||
|
|
Loading…
Reference in a new issue