Exemplo n.º 1
0
	def showNextWordToGUI(self):
		if len(self.eligibleWords) == 0:
			dialog.messageDialog(self, 'All Words Are Exhausted','Alert !!')
			return
		self.selectedWord = random.choice(self.eligibleWords)
		self.eligibleWords.remove(self.selectedWord)
		self.selectedWordMeaning = self.languageMap[self.selectedWord]
		self.components.txtWord.text = self.selectedWord
Exemplo n.º 2
0
 def on_menuFileStartOver_select(self, event):
     event.skip()
     result = dialog.messageDialog(self, 'Clear all? Are you sure?', 'Are you sure?',
                            wx.ICON_INFORMATION |
                            wx.YES_NO | wx.NO_DEFAULT)
     if result.accepted:
         self.p.initState()
         self.statusChanged()
Exemplo n.º 3
0
 def on_awayClearButton_mouseClick(self, event):#clear away roster, resetting any previous loading actions
     result = dialog.messageDialog(self, 'Are you sure you want to clear the away roster?',
                       'Clear', wx.YES_NO | wx.ICON_QUESTION)
     if result.returnedString == 'Yes':
         self.components.otherList.Clear()
         self.opponentIDX = -1
         del self.awayRoster[:]
         del self.awayRosterNum[:]
         self.opponent = 'Away Team'
         self.components.awayLabel.text = self.opponent
Exemplo n.º 4
0
 def on_homeClearButton_mouseClick(self, event):#clear home roster, resetting any previous loading actions
     result = dialog.messageDialog(self, 'Are you sure you want to clear the home roster?',
                       'Clear', wx.YES_NO | wx.ICON_QUESTION)
     if result.returnedString == 'Yes':
         self.components.theList.Clear()
         self.homeIDX = -1
         del self.homeRoster[:]
         del self.homeRosterNum[:]
         self.home = 'Home Team'
         self.components.homeLabel.text = self.home
Exemplo n.º 5
0
    def sleep_test(self):
        if self.sleeping:
            result = dialog.messageDialog(self, """WARNING!
Your pet is sleeping, if you wake him up he'll be unhappy!
Do you want to proceed?""", 'WARNING!', 
wx.ICON_EXCLAMATION | wx.YES_NO | wx.NO_DEFAULT)

            if result.accepted:
                self.sleeping = False
                self.happiness -= 4
                self.forceAwake = True
                return True
            else:
                return False
        else:
            return True
Exemplo n.º 6
0
    def on_menuLoadRuleset_select(self, event):
        event.skip()
        result = dialog.messageDialog(self, 'Currently, loading a new ruleset will CLEAR ALL MEETING HISTORY AND STATUS, just like Start Over. Are you sure you want to clear all?', 'Are you sure?',
                               wx.ICON_EXCLAMATION |
                               wx.YES_NO | wx.NO_DEFAULT)

        if result.accepted:
            wildcard = "Ruleset files (*_ruleset.py)|*_ruleset.py|All Files (*.*)|*.*"
            result = dialog.openFileDialog(wildcard=wildcard)

            if result.accepted:
                path = result.paths[0]
                global p
                self.setParliamentInstance(Parliament.Parliament(path))
                self.p.initState()
                self.statusChanged()
Exemplo n.º 7
0
 def saveChanges(self):
     msg = "The World Map has changed.\n\nDo you want to save the changes?"
     result = dialog.messageDialog(self, msg, 'World Editor', wx.ICON_EXCLAMATION | wx.YES_NO | wx.CANCEL)
     return result.returnedString
Exemplo n.º 8
0
 def featureNotImplementedYet(self):
     result = dialog.messageDialog(self, 'This feature not implemented yet.', 'Not implemented',
                            wx.ICON_EXCLAMATION |
                            wx.OK)