mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-12-23 11:42:39 -06:00
Add FPS meter and option to Shticker Book
This commit is contained in:
parent
95078d05ea
commit
160315ff39
3 changed files with 32 additions and 4 deletions
|
@ -731,27 +731,30 @@ class ExtraOptionsTabPage(DirectFrame):
|
||||||
self.fov_label = DirectLabel(parent=self, relief=None, text=TTLocalizer.FieldOfViewLabel, text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight))
|
self.fov_label = DirectLabel(parent=self, relief=None, text=TTLocalizer.FieldOfViewLabel, text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight))
|
||||||
self.cogInterface_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - textRowHeight))
|
self.cogInterface_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - textRowHeight))
|
||||||
self.tpTransition_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - 2 * textRowHeight))
|
self.tpTransition_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - 2 * textRowHeight))
|
||||||
self.teleport_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - 3 * textRowHeight))
|
self.fpsMeter_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - 3 * textRowHeight))
|
||||||
|
self.teleport_label = DirectLabel(parent=self, relief=None, text='', text_align=TextNode.ALeft, text_scale=options_text_scale, text_wordwrap=16, pos=(leftMargin, 0, textStartHeight - 4 * textRowHeight))
|
||||||
self.fov_slider = DirectSlider(parent=self, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord),
|
self.fov_slider = DirectSlider(parent=self, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord),
|
||||||
value=settings['fov'], pageSize=5, range=(ToontownGlobals.DefaultCameraFov, ToontownGlobals.MaxCameraFov), command=self.__doFov,
|
value=settings['fov'], pageSize=5, range=(ToontownGlobals.DefaultCameraFov, ToontownGlobals.MaxCameraFov), command=self.__doFov,
|
||||||
thumb_geom=(circleModel.find('**/tt_t_gui_mat_namePanelCircle')), thumb_relief=None, thumb_geom_scale=2)
|
thumb_geom=(circleModel.find('**/tt_t_gui_mat_namePanelCircle')), thumb_relief=None, thumb_geom_scale=2)
|
||||||
self.fov_slider.setScale(0.25)
|
self.fov_slider.setScale(0.25)
|
||||||
self.cogInterface_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - textRowHeight), command=self.__doToggleCogInterface)
|
self.cogInterface_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - textRowHeight), command=self.__doToggleCogInterface)
|
||||||
self.tpTransition_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - 2 * textRowHeight), command=self.__doToggleTpTransition)
|
self.tpTransition_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - 2 * textRowHeight), command=self.__doToggleTpTransition)
|
||||||
self.teleport_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - 3 * textRowHeight), command=self.__doToggleTeleport)
|
self.fpsMeter_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - 3 * textRowHeight), command=self.__doToggleFpsMeter)
|
||||||
|
self.teleport_toggleButton = DirectButton(parent=self, relief=None, image=button_image, image_scale=button_image_scale, text='', text_scale=options_text_scale, text_pos=button_textpos, pos=(buttonbase_xcoord, 0.0, buttonbase_ycoord - 4 * textRowHeight), command=self.__doToggleTeleport)
|
||||||
self.bugReportButton = DirectButton(parent=self, relief=None, text=TTLocalizer.BugReportButton, image=button_image, image_scale=button_image_scale, text_pos=(0, -0.01), text_fg=(0, 0, 0, 1),
|
self.bugReportButton = DirectButton(parent=self, relief=None, text=TTLocalizer.BugReportButton, image=button_image, image_scale=button_image_scale, text_pos=(0, -0.01), text_fg=(0, 0, 0, 1),
|
||||||
command=self.showReportNotice, pos=(0.0, 0.0, -0.6), text_scale=(0.045))
|
command=self.showReportNotice, pos=(0.0, 0.0, -0.6), text_scale=(0.045))
|
||||||
guiButton.removeNode()
|
guiButton.removeNode()
|
||||||
circleModel.removeNode()
|
circleModel.removeNode()
|
||||||
|
|
||||||
self.optionChoosers['pole'] = OptionChooser.OptionChooser(self, TTLocalizer.FishingPoleLabel, 4, self.__updateFishingPole, [False], self.__applyFishingPole)
|
self.optionChoosers['pole'] = OptionChooser.OptionChooser(self, TTLocalizer.FishingPoleLabel, 5, self.__updateFishingPole, [False], self.__applyFishingPole)
|
||||||
self.optionChoosers['nametag_style'] = OptionChooser.OptionChooser(self, TTLocalizer.NametagStyleLabel, 5, self.__updateNametagStyle, [False], self.__applyNametagStyle)
|
self.optionChoosers['nametag_style'] = OptionChooser.OptionChooser(self, TTLocalizer.NametagStyleLabel, 6, self.__updateNametagStyle, [False], self.__applyNametagStyle)
|
||||||
|
|
||||||
def enter(self):
|
def enter(self):
|
||||||
self.show()
|
self.show()
|
||||||
self.settingsChanged = 0
|
self.settingsChanged = 0
|
||||||
self.__setCogInterfaceButton()
|
self.__setCogInterfaceButton()
|
||||||
self.__setTpTransitionButton()
|
self.__setTpTransitionButton()
|
||||||
|
self.__setFpsMeterButton()
|
||||||
self.__setTeleportButton()
|
self.__setTeleportButton()
|
||||||
self.__updateNametagStyle()
|
self.__updateNametagStyle()
|
||||||
self.__updateFishingPole()
|
self.__updateFishingPole()
|
||||||
|
@ -779,6 +782,10 @@ class ExtraOptionsTabPage(DirectFrame):
|
||||||
del self.tpTransition_label
|
del self.tpTransition_label
|
||||||
self.tpTransition_toggleButton.destroy()
|
self.tpTransition_toggleButton.destroy()
|
||||||
del self.tpTransition_toggleButton
|
del self.tpTransition_toggleButton
|
||||||
|
self.fpsMeter_label.destroy()
|
||||||
|
del self.fpsMeter_label
|
||||||
|
self.fpsMeter_toggleButton.destroy()
|
||||||
|
del self.fpsMeter_toggleButton
|
||||||
self.teleport_label.destroy()
|
self.teleport_label.destroy()
|
||||||
del self.teleport_label
|
del self.teleport_label
|
||||||
self.teleport_toggleButton.destroy()
|
self.teleport_toggleButton.destroy()
|
||||||
|
@ -815,6 +822,17 @@ class ExtraOptionsTabPage(DirectFrame):
|
||||||
self.tpTransition_label['text'] = TTLocalizer.TpTransitionLabelOn if settings['tpTransition'] else TTLocalizer.TpTransitionLabelOff
|
self.tpTransition_label['text'] = TTLocalizer.TpTransitionLabelOn if settings['tpTransition'] else TTLocalizer.TpTransitionLabelOff
|
||||||
self.tpTransition_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['tpTransition'] else TTLocalizer.OptionsPageToggleOn
|
self.tpTransition_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['tpTransition'] else TTLocalizer.OptionsPageToggleOn
|
||||||
|
|
||||||
|
def __doToggleFpsMeter(self):
|
||||||
|
messenger.send('wakeup')
|
||||||
|
settings['fpsMeter'] = not settings['fpsMeter']
|
||||||
|
base.setFrameRateMeter(settings['fpsMeter'])
|
||||||
|
self.settingsChanged = 1
|
||||||
|
self.__setFpsMeterButton()
|
||||||
|
|
||||||
|
def __setFpsMeterButton(self):
|
||||||
|
self.fpsMeter_label['text'] = TTLocalizer.FpsMeterLabelOn if settings['fpsMeter'] else TTLocalizer.FpsMeterLabelOff
|
||||||
|
self.fpsMeter_toggleButton['text'] = TTLocalizer.OptionsPageToggleOff if settings['fpsMeter'] else TTLocalizer.OptionsPageToggleOn
|
||||||
|
|
||||||
def __doToggleTeleport(self):
|
def __doToggleTeleport(self):
|
||||||
messenger.send('wakeup')
|
messenger.send('wakeup')
|
||||||
acceptingTeleport = settings.get('acceptingTeleport', {})
|
acceptingTeleport = settings.get('acceptingTeleport', {})
|
||||||
|
|
|
@ -8528,9 +8528,12 @@ def convertSecondsToDate(seconds):
|
||||||
return '%d:%02d:%02d' % (h, m, s)
|
return '%d:%02d:%02d' % (h, m, s)
|
||||||
|
|
||||||
ToonDefeatedMessage = '%s was defeated!'
|
ToonDefeatedMessage = '%s was defeated!'
|
||||||
|
|
||||||
BugReportButton = 'Report a Bug'
|
BugReportButton = 'Report a Bug'
|
||||||
BugReportNotice = 'Attention!\n\nThis button will open a browser which will send you to a third party bug tracker website. This site requires an Ubuntu One account to login. It may ask you to create an account.\n\nAre you sure you want to continue?'
|
BugReportNotice = 'Attention!\n\nThis button will open a browser which will send you to a third party bug tracker website. This site requires an Ubuntu One account to login. It may ask you to create an account.\n\nAre you sure you want to continue?'
|
||||||
|
|
||||||
CodeRedemptionWarning = 'NOTICE: All codes can only be entered once!'
|
CodeRedemptionWarning = 'NOTICE: All codes can only be entered once!'
|
||||||
|
|
||||||
CogInterfaceLabelOn = 'The cog battle interface is on.'
|
CogInterfaceLabelOn = 'The cog battle interface is on.'
|
||||||
CogInterfaceLabelOff = 'The cog battle interface is off.'
|
CogInterfaceLabelOff = 'The cog battle interface is off.'
|
||||||
TpTransitionLabelOn = 'The teleport transition is on.'
|
TpTransitionLabelOn = 'The teleport transition is on.'
|
||||||
|
@ -8538,6 +8541,7 @@ TpTransitionLabelOff = 'The teleport transition is off.'
|
||||||
FieldOfViewLabel = 'Field of View:'
|
FieldOfViewLabel = 'Field of View:'
|
||||||
NametagStyleLabel = 'Nametag Style:'
|
NametagStyleLabel = 'Nametag Style:'
|
||||||
FishingPoleLabel = 'Fishing Rod:'
|
FishingPoleLabel = 'Fishing Rod:'
|
||||||
|
|
||||||
BossLocations = {
|
BossLocations = {
|
||||||
'c': 'Bossbot Clubhouse\nBanquet',
|
'c': 'Bossbot Clubhouse\nBanquet',
|
||||||
'l': "Lawbot Courthouse\nBumpy Bumblebehr's Trial",
|
'l': "Lawbot Courthouse\nBumpy Bumblebehr's Trial",
|
||||||
|
@ -8757,6 +8761,9 @@ InventoryDeleteConfirm = "Are you sure you want to delete all your gags? Don't w
|
||||||
|
|
||||||
ClothesGUICount = '%s/%s'
|
ClothesGUICount = '%s/%s'
|
||||||
|
|
||||||
|
FpsMeterLabelOn = 'The frame rate meter is on.'
|
||||||
|
FpsMeterLabelOff = 'The frame rate meter is off.'
|
||||||
|
|
||||||
Blacklist = [
|
Blacklist = [
|
||||||
"$1ut",
|
"$1ut",
|
||||||
"$h1t",
|
"$h1t",
|
||||||
|
|
|
@ -116,6 +116,8 @@ if 'fov' not in settings:
|
||||||
settings['fov'] = OTPGlobals.DefaultCameraFov
|
settings['fov'] = OTPGlobals.DefaultCameraFov
|
||||||
if 'talk2speech' not in settings:
|
if 'talk2speech' not in settings:
|
||||||
settings['talk2speech'] = False
|
settings['talk2speech'] = False
|
||||||
|
if 'fpsMeter' not in settings:
|
||||||
|
settings['fpsMeter'] = False
|
||||||
|
|
||||||
loadPrcFileData('Settings: res', 'win-size %d %d' % tuple(settings['res']))
|
loadPrcFileData('Settings: res', 'win-size %d %d' % tuple(settings['res']))
|
||||||
loadPrcFileData('Settings: fullscreen', 'fullscreen %s' % settings['fullscreen'])
|
loadPrcFileData('Settings: fullscreen', 'fullscreen %s' % settings['fullscreen'])
|
||||||
|
@ -189,6 +191,7 @@ cr = ToontownClientRepository.ToontownClientRepository(serverVersion)
|
||||||
cr.music = music
|
cr.music = music
|
||||||
del music
|
del music
|
||||||
base.initNametagGlobals()
|
base.initNametagGlobals()
|
||||||
|
base.setFrameRateMeter(settings['fpsMeter'])
|
||||||
base.cr = cr
|
base.cr = cr
|
||||||
loader.endBulkLoad('init')
|
loader.endBulkLoad('init')
|
||||||
from otp.friends import FriendManager
|
from otp.friends import FriendManager
|
||||||
|
|
Loading…
Reference in a new issue