def load(self): self.displaySettings = None self.displaySettingsChanged = 0 self.displaySettingsSize = (None, None) self.displaySettingsFullscreen = None self.displaySettingsApi = None self.displaySettingsApiChanged = 0 self.speed_chat_scale = 0.055 buttonbase_ycoord = 0.45 textRowHeight = 0.145 textStartHeight = 0.45 self.Music_Label = OptionLabel(parent=self) self.SoundFX_Label = OptionLabel(parent=self, z=textStartHeight - textRowHeight) self.Friends_Label = OptionLabel(parent=self, z=textStartHeight - 3 * textRowHeight) self.Whispers_Label = OptionLabel(parent=self, z=textStartHeight - 4 * textRowHeight) self.DisplaySettings_Label = OptionLabel(parent=self, text_wordwrap=10, z=textStartHeight - 5 * textRowHeight) self.SpeedChatStyle_Label = OptionLabel( parent=self, text=TTLocalizer.OptionsPageSpeedChatStyleLabel, text_wordwrap=10, z=textStartHeight - 6 * textRowHeight) self.ToonChatSounds_Label = OptionLabel(parent=self, z=textStartHeight - 2 * textRowHeight + 0.025) self.ToonChatSounds_Label.setScale(0.9) self.Music_toggleButton = OptionButton(parent=self, command=self.__doToggleMusic) self.SoundFX_toggleButton = OptionButton(parent=self, z=buttonbase_ycoord - textRowHeight, command=self.__doToggleSfx) self.Friends_toggleButton = OptionButton( parent=self, z=buttonbase_ycoord - textRowHeight * 3, command=self.__doToggleAcceptFriends) self.Whispers_toggleButton = OptionButton( parent=self, z=buttonbase_ycoord - textRowHeight * 4, command=self.__doToggleAcceptWhispers) self.DisplaySettingsButton = OptionButton( parent=self, image3_color=Vec4(0.5, 0.5, 0.5, 0.5), text=TTLocalizer.OptionsPageChange, z=buttonbase_ycoord - textRowHeight * 5, command=self.__doDisplaySettings) gui = loader.loadModel('phase_3.5/models/gui/friendslist_gui') self.speedChatStyleLeftArrow = DirectButton( parent=self, relief=None, image=(gui.find('**/Horiz_Arrow_UP'), gui.find('**/Horiz_Arrow_DN'), gui.find('**/Horiz_Arrow_Rllvr'), gui.find('**/Horiz_Arrow_UP')), image3_color=Vec4(1, 1, 1, 0.5), scale=(-1.0, 1.0, 1.0), pos=(0.25, 0, buttonbase_ycoord - textRowHeight * 6), command=self.__doSpeedChatStyleLeft) self.speedChatStyleRightArrow = DirectButton( parent=self, relief=None, image=(gui.find('**/Horiz_Arrow_UP'), gui.find('**/Horiz_Arrow_DN'), gui.find('**/Horiz_Arrow_Rllvr'), gui.find('**/Horiz_Arrow_UP')), image3_color=Vec4(1, 1, 1, 0.5), pos=(0.65, 0, buttonbase_ycoord - textRowHeight * 6), command=self.__doSpeedChatStyleRight) self.ToonChatSounds_toggleButton = OptionButton( parent=self, image3_color=Vec4(0.5, 0.5, 0.5, 0.5), z=buttonbase_ycoord - textRowHeight * 2 + 0.025, command=self.__doToggleToonChatSounds) self.ToonChatSounds_toggleButton.setScale(0.8) self.speedChatStyleText = SpeedChat.SpeedChat( name='OptionsPageStyleText', structure=[2000], backgroundModelName='phase_3/models/gui/ChatPanel', guiModelName='phase_3.5/models/gui/speedChatGui') self.speedChatStyleText.setScale(self.speed_chat_scale) self.speedChatStyleText.setPos( 0.37, 0, buttonbase_ycoord - textRowHeight * 6 + 0.03) self.speedChatStyleText.reparentTo(self, DGG.FOREGROUND_SORT_INDEX) self.exitButton = OptionButton( parent=self, image_scale=1.15, text=TTLocalizer.OptionsPageExitToontown, pos=(0.45, 0, -0.6), command=self.__handleExitShowWithConfirm) gui.removeNode()