mirror of
https://github.com/Sneed-Group/Poodletooth-iLand
synced 2024-10-31 00:37:54 +00:00
Cleanup config files, add a bool to enable/disable language selector
This commit is contained in:
parent
e7f17e5299
commit
76a8190ed7
4 changed files with 15 additions and 15 deletions
|
@ -92,7 +92,7 @@ base-xp-multiplier 1.0
|
|||
# SOS toons:
|
||||
sos-card-reward 2
|
||||
|
||||
# Cog Dominiums
|
||||
# CogDominiums (Field Offices):
|
||||
want-emblems #t
|
||||
cogdo-want-barrel-room #t
|
||||
want-lawbot-cogdo #t
|
||||
|
@ -104,6 +104,8 @@ want-cogbuildings #t
|
|||
show-total-population #t
|
||||
want-mat-all-tailors #t
|
||||
want-talkative-tyler #f
|
||||
estate-day-night #t
|
||||
want-language-selection #t
|
||||
|
||||
# Developer options:
|
||||
want-dev #f
|
||||
|
@ -112,6 +114,3 @@ want-pstats 0
|
|||
# Temporary:
|
||||
smooth-lag 0.4
|
||||
want-old-fireworks #t
|
||||
|
||||
# Live updates:
|
||||
estate-day-night #t
|
||||
|
|
|
@ -15,7 +15,7 @@ shard-mid-pop 100
|
|||
want-rpc-server #f
|
||||
rpc-server-endpoint http://localhost:8080/
|
||||
|
||||
# DClass files (in reverse order):
|
||||
# DClass file:
|
||||
dc-file astron/dclass/stride.dc
|
||||
|
||||
# Core features:
|
||||
|
@ -23,7 +23,6 @@ want-pets #t
|
|||
want-parties #t
|
||||
want-cogdominiums #t
|
||||
want-lawbot-cogdo #t
|
||||
want-achievements #f
|
||||
want-anim-props #t
|
||||
want-game-tables #t
|
||||
want-find-four #t
|
||||
|
|
|
@ -4,7 +4,7 @@ from toontown.toontowngui import TTDialog
|
|||
import os
|
||||
|
||||
class LanguageSelector:
|
||||
|
||||
|
||||
def __init__(self, leaveFunction):
|
||||
self.title = None
|
||||
self.current = None
|
||||
|
@ -14,13 +14,13 @@ class LanguageSelector:
|
|||
self.backButton = None
|
||||
self.confirmDialog = None
|
||||
self.leaveFunction = leaveFunction
|
||||
|
||||
|
||||
def create(self):
|
||||
self.background = OnscreenImage(parent=render2d, image="phase_3.5/maps/blackboardEmpty.jpg")
|
||||
self.gui = loader.loadModel('phase_3/models/gui/tt_m_gui_mat_mainGui')
|
||||
self.shuffleUp = self.gui.find('**/tt_t_gui_mat_shuffleUp')
|
||||
self.shuffleDown = self.gui.find('**/tt_t_gui_mat_shuffleDown')
|
||||
|
||||
|
||||
self.title = DirectLabel(aspect2d, relief=None, text=TTLocalizer.LanguageSelectorTitle,
|
||||
text_fg=(0, 1, 0, 1), text_scale=0.15, text_font=ToontownGlobals.getSuitFont(),
|
||||
pos=(0, 0, 0.70), text_shadow=(0, 0.392, 0, 1))
|
||||
|
@ -51,22 +51,22 @@ class LanguageSelector:
|
|||
if element:
|
||||
element.destroy()
|
||||
element = None
|
||||
|
||||
|
||||
self.leaveFunction()
|
||||
|
||||
|
||||
def switchLanguage(self, language):
|
||||
if language == settings['language']:
|
||||
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.Acknowledge, text=TTLocalizer.LanguageSelectorSameLanguage, command=self.cleanupDialog)
|
||||
else:
|
||||
self.confirmDialog = TTDialog.TTDialog(style=TTDialog.YesNo, text=TTLocalizer.LanguageSelectorConfirm % language, command=self.confirmSwitchLanguage, extraArgs=[language])
|
||||
self.confirmDialog.show()
|
||||
|
||||
|
||||
def confirmSwitchLanguage(self, value, language):
|
||||
if value > 0:
|
||||
settings['language'] = language
|
||||
os._exit(1)
|
||||
else:
|
||||
self.cleanupDialog()
|
||||
|
||||
|
||||
def cleanupDialog(self, value=0):
|
||||
self.confirmDialog.cleanup()
|
||||
self.confirmDialog.cleanup()
|
||||
|
|
|
@ -39,7 +39,8 @@ class AvatarChooser(StateData.StateData):
|
|||
base.disableMouse()
|
||||
self.title.reparentTo(aspect2d)
|
||||
self.quitButton.show()
|
||||
self.languageButton.show()
|
||||
if config.GetBool('want-language-selection', False):
|
||||
self.languageButton.show()
|
||||
self.pickAToonBG.setBin('background', 1)
|
||||
self.pickAToonBG.reparentTo(aspect2d)
|
||||
base.setBackgroundColor(Vec4(0.145, 0.368, 0.78, 1))
|
||||
|
@ -80,6 +81,7 @@ class AvatarChooser(StateData.StateData):
|
|||
self.quitButton.reparentTo(base.a2dBottomRight)
|
||||
self.languageButton = DirectButton(relief=None, image=(quitHover, quitHover, quitHover), text=TTLocalizer.LanguageButtonText, text_font=ToontownGlobals.getSignFont(), text_fg=(0.977, 0.816, 0.133, 1), text_scale=TTLocalizer.AClanguageButton, text_pos=(0, -0.025), pos=(0.25, 0, 0.075), image_scale=1.05, image1_scale=1.05, image2_scale=1.05, scale=1.05, command=self.openLanguageGui)
|
||||
self.languageButton.reparentTo(base.a2dBottomLeft)
|
||||
self.languageButton.hide()
|
||||
gui.removeNode()
|
||||
gui2.removeNode()
|
||||
newGui.removeNode()
|
||||
|
|
Loading…
Reference in a new issue