def exit(self, screen, mainInterface): screen.deleteWidget("ExitCO") screen.deleteWidget("ScrollCO") screen.deleteWidget("CityOptionBG") mainInterface.cityOptions = None import BugOptions BugOptions.getOptions(mainInterface.CityOpt._id).write()
def resetOptions(): revDCMoptions = BugOptions.getOptions("RevDCM").options RevolutionOptions = BugOptions.getOptions("Revolution").options ActionOptions = BugOptions.getOptions("Actions").options for i in range(len(revDCMoptions)): revDCMoptions[i].resetValue() for i in range(len(RevolutionOptions)): RevolutionOptions[i].resetValue() for i in range(len(ActionOptions)): ActionOptions[i].resetValue() setXMLOptionsfromIniFile() RevDCMOpt.setReset(False)
def resetOptions(): revDCMoptions = BugOptions.getOptions("RevDCM").options RevolutionOptions = BugOptions.getOptions("Revolution").options ActionOptions = BugOptions.getOptions("Actions").options for i in range(len(revDCMoptions)): revDCMoptions[i].resetValue() for i in range(len(RevolutionOptions)): RevolutionOptions[i].resetValue() for i in range(len(ActionOptions)): ActionOptions[i].resetValue() setXMLOptionsfromIniFile() RevDCMOpt.setReset(false)
def resetOptions(): import BugOptions ANewDawnoptions = BugOptions.getOptions("RoMSettings").options for i in range(len(ANewDawnoptions)): ANewDawnoptions[i].resetValue() setXMLOptionsfromIniFile() ANewDawnOpt.setRoMReset(False)
def resetOptions(): import BugOptions ANewDawnoptions = BugOptions.getOptions("DiplomacySettings").options for option in ANewDawnoptions: option.resetValue() setXMLOptionsfromIniFile() BugCore.game.RoMSettings.setRoMReset(False)
def __init__(self, game=None, attrs=None): if game is None: game = BugCore.game self.game = game self.eventManager = CvEventInterface.getEventManager() self.options = BugOptions.getOptions() self.optionsScreen = CvScreensInterface.getBugOptionsScreen() self.attrs = attrs self.mod = None self.iniFile = None self.section = None self.option = None self.screen = None self.symbol = None
## Base class for all tabs in the BUG Options Screen. ## ## Copyright (c) 2007 The BUG Mod. ## ## Author: EmperorFool import BugOptions import BugUtil ## Constants CHECKBOX_INDENT = 2 ## Globals g_options = BugOptions.getOptions() ## Class class BugOptionsTab: """ Provides an API for building a single tab on the BUG Options Screen by placing UI controls. """ def __init__(self, name, title): self.name = name self.tab = self.name + "Tab" self.title = title self.translated = False
def resetOptions(): AutomatedOptions = BugOptions.getOptions("AutomatedSettings").options for i in range(len(AutomatedOptions)): AutomatedOptions[i].resetValue() setXMLOptionsfromIniFile() AutomatedOptions.setReset(False)
def setXMLOptionsfromIniFile(): print "Initializing Automated Settings" AutomatedOptions = BugOptions.getOptions("AutomatedSettings").options for i in range(len(AutomatedOptions)): if AutomatedOptions[i].getKey() != "Reset": AutomatedOptions[i].doDirties()
def init(): global g_options, g_screen import BugOptions g_options = BugOptions.getOptions()
def __init__(self): self.iScreenHeight = 50 self.options = BugOptions.getOptions() self.tabs = [] self.reopen = False
def __init__(self): import BugOptions self.iScreenHeight = 50 self.options = BugOptions.getOptions() self.tabs = [] self.reopen = False
def resetOptions(): revDCMoptions = BugOptions.getOptions("RevDCM").options for i in range(len(revDCMoptions)): revDCMoptions[i].resetValue() setXMLOptionsfromIniFile() RevDCMOpt.setReset(false)
def resetOptions(): ANewDawnoptions = BugOptions.getOptions("DiplomacySettings").options for i in range(len(ANewDawnoptions)): ANewDawnoptions[i].resetValue() setXMLOptionsfromIniFile() BugCore.game.RoMSettings.setRoMReset(false)
def resetOptions(): ANewDawnoptions = BugOptions.getOptions("RoMSettings").options for i in range(len(ANewDawnoptions)): ANewDawnoptions[i].resetValue() setXMLOptionsfromIniFile() ANewDawnOpt.setRoMReset(False)