mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
TrackShop cleanup
This commit is contained in:
parent
aa5fee87dc
commit
8a82353eb9
1 changed files with 4 additions and 18 deletions
|
@ -1,10 +1,8 @@
|
||||||
from pandac.PandaModules import *
|
from pandac.PandaModules import *
|
||||||
from direct.fsm import StateData
|
from direct.fsm import StateData
|
||||||
from direct.gui.DirectGui import *
|
from direct.gui.DirectGui import *
|
||||||
from MakeAToonGlobals import *
|
|
||||||
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
from toontown.toonbase import TTLocalizer, ToontownGlobals
|
||||||
from direct.directnotify import DirectNotifyGlobal
|
from direct.directnotify import DirectNotifyGlobal
|
||||||
from toontown.toonbase.ToontownBattleGlobals import AvPropsNew
|
|
||||||
|
|
||||||
class TrackShop(StateData.StateData):
|
class TrackShop(StateData.StateData):
|
||||||
notify = DirectNotifyGlobal.directNotify.newCategory('TrackShop')
|
notify = DirectNotifyGlobal.directNotify.newCategory('TrackShop')
|
||||||
|
@ -21,18 +19,12 @@ class TrackShop(StateData.StateData):
|
||||||
self.acceptOnce('next', self.__handleForward)
|
self.acceptOnce('next', self.__handleForward)
|
||||||
|
|
||||||
def showButtons(self):
|
def showButtons(self):
|
||||||
self.quest.show()
|
for element in [self.quest, self.label, self.leftButton, self.rightButton, self.track]:
|
||||||
self.label.show()
|
element.show()
|
||||||
self.leftButton.show()
|
|
||||||
self.rightButton.show()
|
|
||||||
self.track.show()
|
|
||||||
|
|
||||||
def hideButtons(self):
|
def hideButtons(self):
|
||||||
self.quest.hide()
|
for element in [self.quest, self.label, self.leftButton, self.rightButton, self.track]:
|
||||||
self.label.hide()
|
element.hide()
|
||||||
self.leftButton.hide()
|
|
||||||
self.rightButton.hide()
|
|
||||||
self.track.hide()
|
|
||||||
|
|
||||||
def exit(self):
|
def exit(self):
|
||||||
self.ignore('last')
|
self.ignore('last')
|
||||||
|
@ -49,10 +41,6 @@ class TrackShop(StateData.StateData):
|
||||||
self.buttonGui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
|
self.buttonGui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
|
||||||
self.shuffleArrowUp = self.buttonGui.find('**/tt_t_gui_mat_shuffleArrowUp')
|
self.shuffleArrowUp = self.buttonGui.find('**/tt_t_gui_mat_shuffleArrowUp')
|
||||||
self.shuffleArrowDown = self.buttonGui.find('**/tt_t_gui_mat_shuffleArrowDown')
|
self.shuffleArrowDown = self.buttonGui.find('**/tt_t_gui_mat_shuffleArrowDown')
|
||||||
self.inventoryModels = {}
|
|
||||||
|
|
||||||
for track in [0, 1, 2, 3, 6]:
|
|
||||||
self.inventoryModels[track] = self.inventoryGui.find('**/' + AvPropsNew[track][0])
|
|
||||||
|
|
||||||
self.quest = DirectFrame(aspect2d, relief=None, image=self.questGui.find('**/questCard'),
|
self.quest = DirectFrame(aspect2d, relief=None, image=self.questGui.find('**/questCard'),
|
||||||
pos=(-0.62, 0, 0), image_scale=1.5)
|
pos=(-0.62, 0, 0), image_scale=1.5)
|
||||||
|
@ -72,8 +60,6 @@ class TrackShop(StateData.StateData):
|
||||||
pos=(-0.64, 0, -0.08), text_shadow=(1, 1, 1, 1))
|
pos=(-0.64, 0, -0.08), text_shadow=(1, 1, 1, 1))
|
||||||
|
|
||||||
self.updateGuiByIndex()
|
self.updateGuiByIndex()
|
||||||
# Create GUI
|
|
||||||
return
|
|
||||||
|
|
||||||
def unload(self):
|
def unload(self):
|
||||||
for element in [self.quest, self.label, self.leftButton, self.rightButton, self.track]:
|
for element in [self.quest, self.label, self.leftButton, self.rightButton, self.track]:
|
||||||
|
|
Loading…
Reference in a new issue