Ejemplo n.º 1
0
	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()
Ejemplo n.º 2
0
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)
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
def resetOptions():
    import BugOptions
    ANewDawnoptions = BugOptions.getOptions("RoMSettings").options
    for i in range(len(ANewDawnoptions)):
        ANewDawnoptions[i].resetValue()
    setXMLOptionsfromIniFile()
    ANewDawnOpt.setRoMReset(False)
Ejemplo n.º 5
0
def resetOptions():
    import BugOptions
    ANewDawnoptions = BugOptions.getOptions("DiplomacySettings").options
    for option in ANewDawnoptions:
        option.resetValue()
    setXMLOptionsfromIniFile()
    BugCore.game.RoMSettings.setRoMReset(False)
Ejemplo n.º 6
0
	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
## 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
		
Ejemplo n.º 9
0
def resetOptions():
	AutomatedOptions = BugOptions.getOptions("AutomatedSettings").options
	for i in range(len(AutomatedOptions)):
		AutomatedOptions[i].resetValue()
	setXMLOptionsfromIniFile()
	AutomatedOptions.setReset(False)
Ejemplo n.º 10
0
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()
Ejemplo n.º 11
0
def init():
    global g_options, g_screen
    import BugOptions
    g_options = BugOptions.getOptions()
Ejemplo n.º 12
0
	def __init__(self):
		self.iScreenHeight = 50
		self.options = BugOptions.getOptions()
		self.tabs = []
		self.reopen = False
Ejemplo n.º 13
0
 def __init__(self):
     import BugOptions
     self.iScreenHeight = 50
     self.options = BugOptions.getOptions()
     self.tabs = []
     self.reopen = False
Ejemplo n.º 14
0
def resetOptions():
	revDCMoptions = BugOptions.getOptions("RevDCM").options
	for i in range(len(revDCMoptions)):
		revDCMoptions[i].resetValue()
	setXMLOptionsfromIniFile()
	RevDCMOpt.setReset(false)
Ejemplo n.º 15
0
def resetOptions():
	ANewDawnoptions = BugOptions.getOptions("DiplomacySettings").options
	for i in range(len(ANewDawnoptions)):
		ANewDawnoptions[i].resetValue()
	setXMLOptionsfromIniFile()
	BugCore.game.RoMSettings.setRoMReset(false)
Ejemplo n.º 16
0
def resetOptions():
	ANewDawnoptions = BugOptions.getOptions("RoMSettings").options
	for i in range(len(ANewDawnoptions)):
		ANewDawnoptions[i].resetValue()
	setXMLOptionsfromIniFile()
	ANewDawnOpt.setRoMReset(False)