def create(self, screen):
        _ = self.createTab(screen)
        panel = self.createMainPanel(screen)
        column = self.addOneColumnLayout(screen, panel)

        # Flunky PAE remove OptionsKey and OptionsButton options
        # left, right = self.addTwoColumnLayout(screen, column, "Bottom", False)
        # self.addCheckbox(screen, left, "MainInterface__OptionsKey")
        # self.addCheckbox(screen, left, "MainInterface__OptionsButton")
        # screen.setLayoutFlag(right, "LAYOUT_RIGHT")
        # screen.setLayoutFlag(right, "LAYOUT_SIZE_HPREFERREDEXPANDING")
        # self.addLabel(screen, right, "Version",
        # CvModName.getDisplayNameAndVersion() + " (" + CvModName.getCivNameAndVersion() + ")")
        screen.setLayoutFlag(column, "LAYOUT_RIGHT")
        screen.setLayoutFlag(column, "LAYOUT_SIZE_HPREFERREDEXPANDING")
        self.addLabel(
            screen, column, "Version",
            CvModName.getDisplayNameAndVersion() + " (" +
            CvModName.getCivNameAndVersion() + ")")

        #		screen.attachHSeparator(column, column + "Sep1")
        #		self.addLabel(screen, column, "Subversion", "Subversion (SVN):")
        #		self.addCheckbox(screen, column, "Core__CheckForUpdates")
        #		columnL, columnR = self.addTwoColumnLayout(screen, column, "Core")
        #		self.addTextEdit(screen, columnL, columnR, "Core__LocalRoot")
        #		self.addTextEdit(screen, columnL, columnR, "Core__RepositoryUrl")

        screen.attachHSeparator(column, column + "Sep2")
        self.addLabel(screen, column, "Debug_Logging", "Debugging Output:")
        left, center, right = self.addThreeColumnLayout(screen, column)
        self.addTextDropdown(screen, left, left, "Core__ScreenLogLevel")
        self.addTextDropdown(screen, center, center, "Core__FileLogLevel")
        self.addCheckbox(screen, right, "Core__LogTime")

        screen.attachHSeparator(column, column + "Sep3")
        items = BugConfigTracker.combine()
        itemNum = 0
        #		first = True
        for item in items:
            itemNum += 1
            subitemNum = 0
            #			if not first:
            #				screen.attachHSeparator(column, "ItemSep-%d" % itemNum)
            #			else:
            #				first = False
            self.addLabel(screen, column, item[0], item[0])
            for value in item[1]:
                subitemNum += 1
                self.addLabel(screen, column,
                              "ConfigSubitem-%d-%d" % (itemNum, subitemNum),
                              "  - " + value)
Exemplo n.º 2
0
	def start(self):
		self.writeMsg("")
		self.writeMsg("Logging by " + CvModName.getDisplayNameAndVersion() + " (" + CvModName.getCivNameAndVersion() + ")")
		self.writeMsg("------------------------------------------------")
		zcurrturn = gc.getGame().getElapsedGameTurns() + AutologOpt.get4000BCTurn()
		zmaxturn = gc.getGame().getMaxTurns()
		zyear = gc.getGame().getGameTurnYear()
		if (zyear < 0):
			zyear = str(-zyear) + BugUtil.getPlainText("TXT_KEY_AUTOLOG_BC")
		else:
			zyear = str(zyear) + BugUtil.getPlainText("TXT_KEY_AUTOLOG_AD")
		zCurrDateTime = time.strftime("%d-%b-%Y %H:%M:%S")
		if (zmaxturn == 0):
			zsTurn = "%i" % (zcurrturn)
		else:
			zsTurn = "%i/%i" % (zcurrturn, zmaxturn)
		message = BugUtil.getText("TXT_KEY_AUTOLOG_TURN", (zsTurn, zyear, zCurrDateTime))
		self.writeMsg(message, vBold=True, vUnderline=True)
		self.bStarted = True
	def create(self, screen):
		tab = self.createTab(screen)
		panel = self.createMainPanel(screen)
		column = self.addOneColumnLayout(screen, panel)

		left, right = self.addTwoColumnLayout(screen, column, "Bottom", False)
		self.addCheckbox(screen, left, "MainInterface__OptionsKey")
		self.addCheckbox(screen, left, "MainInterface__OptionsButton")
		screen.setLayoutFlag(right, "LAYOUT_RIGHT")
		screen.setLayoutFlag(right, "LAYOUT_SIZE_HPREFERREDEXPANDING")
		self.addLabel(screen, right, "Version", 
					  CvModName.getDisplayNameAndVersion() + " (" + CvModName.getCivNameAndVersion() + ")")
		
#		screen.attachHSeparator(column, column + "Sep1")		
#		self.addLabel(screen, column, "Subversion", "Subversion (SVN):")
#		self.addCheckbox(screen, column, "Core__CheckForUpdates")
#		columnL, columnR = self.addTwoColumnLayout(screen, column, "Core")
#		self.addTextEdit(screen, columnL, columnR, "Core__LocalRoot")
#		self.addTextEdit(screen, columnL, columnR, "Core__RepositoryUrl")

		screen.attachHSeparator(column, column + "Sep2")
		self.addLabel(screen, column, "Debug_Logging", "Debugging Output:")
		left, center, right = self.addThreeColumnLayout(screen, column)
		self.addTextDropdown(screen, left, left, "Core__ScreenLogLevel")
		self.addTextDropdown(screen, center, center, "Core__FileLogLevel")
		self.addCheckbox(screen, right, "Core__LogTime")
				
		screen.attachHSeparator(column, column + "Sep3")
		items = BugConfigTracker.combine()
		itemNum = 0
#		first = True
		for item in items:
			itemNum += 1
			subitemNum = 0
#			if not first:
#				screen.attachHSeparator(column, "ItemSep-%d" % itemNum)
#			else:
#				first = False
			self.addLabel(screen, column, item[0], item[0])
			for value in item[1]:
				subitemNum += 1
				self.addLabel(screen, column, "ConfigSubitem-%d-%d" % (itemNum, subitemNum), "  - " + value)
Exemplo n.º 4
0
 def start(self):
     self.writeMsg("")
     self.writeMsg("Logging by " + CvModName.getDisplayNameAndVersion() +
                   " (" + CvModName.getCivNameAndVersion() + ")")
     self.writeMsg("------------------------------------------------")
     zcurrturn = gc.getGame().getElapsedGameTurns(
     ) + AutologOpt.get4000BCTurn()
     zmaxturn = gc.getGame().getMaxTurns()
     zyear = gc.getGame().getGameTurnYear()
     if (zyear < 0):
         zyear = str(-zyear) + BugUtil.getPlainText("TXT_KEY_AUTOLOG_BC")
     else:
         zyear = str(zyear) + BugUtil.getPlainText("TXT_KEY_AUTOLOG_AD")
     zCurrDateTime = time.strftime("%d-%b-%Y %H:%M:%S")
     if (zmaxturn == 0):
         zsTurn = "%i" % (zcurrturn)
     else:
         zsTurn = "%i/%i" % (zcurrturn, zmaxturn)
     message = BugUtil.getText("TXT_KEY_AUTOLOG_TURN",
                               (zsTurn, zyear, zCurrDateTime))
     self.writeMsg(message, vBold=True, vUnderline=True)
     self.bStarted = True
Exemplo n.º 5
0
def getModNameAndVersion():
	global g_nameAndVersion
	if g_nameAndVersion is None:
		import CvModName
		g_nameAndVersion = CvModName.getNameAndVersion()
	return g_nameAndVersion