Example #1
0
 def createMailInfoFrame(self):
     """Build the Mail Info Frame"""
     self.mailInfo = buttonlist.ButtonList(self.guiMediaPath,
                                           'Select Message:', 1.5, 0.6)
     self.mailInfo.setMyPosition(0.2, 0.45)
     self.mailInfo.setMyMode(self)
     self.mailInfo.setOnClickMethod('populateMailBody')
     self.gui.append(self.mailInfo)
Example #2
0
 def createBattleInfoFrame(self):
     """Build the Mail Info Frame"""
     self.battleInfo = buttonlist.ButtonList(
         self.guiMediaPath, 'Choose a Ship Battle to View:', 1.5, 0.8)
     self.battleInfo.setMyPosition(0, 0.40)
     self.battleInfo.setMyMode(self)
     self.battleInfo.setOnClickMethod('viewShipBattle')
     self.gui.append(self.battleInfo)
Example #3
0
 def createMailRoundFrame(self):
     """Build the Mail Round Frame"""
     self.mailRound = buttonlist.ButtonList(self.guiMediaPath,
                                            'Choose Round:', 0.3, 0.6)
     self.mailRound.setMyPosition(-0.8, 0.45)
     self.mailRound.setMyMode(self)
     self.mailRound.setOnClickMethod('populateMailInfo')
     self.gui.append(self.mailRound)
Example #4
0
 def createNewShipDesignList(self, text):
     """List all Ship Designs that are available to be upgraded to"""
     self.newShipDesignList = buttonlist.ButtonList(self.path, text, width=1.0, height=0.55)
     self.newShipDesignList.setMyPosition(-0.56,0.50)
     self.newShipDesignList.setMyMode(self)
     self.newShipDesignList.setOnClickMethod('shipDesignSelected')
     self.myWidgets.append(self.newShipDesignList)
     self.populateNewShipDesignList()
Example #5
0
 def createComponentList(self):
     """List all Components that can be added to design"""
     text = 'Choose a Component Type:'
     self.componentlist = buttonlist.ButtonList(self.path, text, width=0.6, height=0.55)
     self.componentlist.setMyPosition(-0.8,-0.65)
     self.componentlist.setMyMode(self)
     self.componentlist.setOnClickMethod('componentListClicked')
     self.myWidgets.append(self.componentlist)
     self.populateComponentList()
Example #6
0
 def createAllDesignsList(self):
     """List other ship designs"""
     self.removeWidget(self.shipdesignvalue)
     text = 'Choose a Ship Design to Test Against:'
     self.allDesignsList = buttonlist.ButtonList(self.path, text, width=0.6, height=0.55)
     self.allDesignsList.setMyPosition(0.8,-0.65)
     self.allDesignsList.setMyMode(self)
     self.allDesignsList.setOnClickMethod('allDesignsListClicked')
     self.myWidgets.append(self.allDesignsList)
     self.populateAllDesignsList()
Example #7
0
 def createCancelRepairList(self, text):
     """Create the Cancel Repair List"""
     self.cancelRepairList = buttonlist.ButtonList(self.path,
                                                   text,
                                                   width=1.0,
                                                   height=0.55)
     self.cancelRepairList.setMyPosition(0.55, -0.5)
     self.cancelRepairList.setMyMode(self)
     self.cancelRepairList.setOnClickMethod('cancelRepairSelected')
     self.myWidgets.append(self.cancelRepairList)
Example #8
0
 def createQuads(self):
     """Create the 4 Quadrant lists displaying design component info"""
     for (quad, (x,z)) in {'fore':(0.03,0.5)}.iteritems():
         text = self.getTextFromQuad(quad)
         setattr(self, '%sQuadInfo' % quad, buttonlist.ButtonList(self.path, text, width=0.6, height=0.50))
         myQuad = getattr(self, '%sQuadInfo' % quad)
         myQuad.setMyPosition(x,z)
         myQuad.setMyMode(self)
         myQuad.setOnClickMethod('%sQuadClicked' % quad)
         self.myWidgets.append(myQuad)
         self.populateQuadInfo(quad)
Example #9
0
 def createNewTradeList(self):
     """Show list of systems that can be traded with"""
     x = self.posInitX - 0.7
     y = self.posInitY + 0.4
     self.newtradelist = buttonlist.ButtonList(
         self.path, 'Choose System to Trade With:', width=0.5, height=0.5)
     self.newtradelist.setMyPosition(x + 0.27, y - 0.3)
     self.newtradelist.setMyMode(self)
     self.newtradelist.setOnClickMethod('createTradeValueGui')
     self.myWidgets.append(self.newtradelist)
     self.populateNewTradeList()
Example #10
0
 def createShipDesignList(self):
     """List all Available Ship Designs"""
     text = 'Choose a Ship Design to Build From:'
     self.shipdesignList = buttonlist.ButtonList(self.path,
                                                 text,
                                                 width=0.6,
                                                 height=0.55)
     self.shipdesignList.setMyPosition(-0.96, 0.23)
     self.shipdesignList.setMyMode(self)
     self.shipdesignList.setOnClickMethod('shipDesignSelected')
     self.myWidgets.append(self.shipdesignList)
     self.populateShipDesignList()
Example #11
0
 def createInRepairQueList(self, text):
     """List all Ships to be repaired"""
     self.inRepairQueList = buttonlist.ButtonList(self.path,
                                                  text,
                                                  width=1.0,
                                                  height=0.55)
     self.inRepairQueList.setMyPosition(-0.56, -0.5)
     self.inRepairQueList.setMyMode(self)
     self.inRepairQueList.setOnClickMethod('inRepairQueSelected')
     self.myWidgets.append(self.inRepairQueList)
     self.populateRepairFrom()
     self.populateInRepairQueList()
Example #12
0
 def createMultiDesignList(self):
     """Create a listbox to store all the existing ships designs"""
     self.removeMyGui('multidesignList')
     self.multidesignList = buttonlist.ButtonList(self.guiMediaPath,
                                                  'Select a Ship Design:',
                                                  width=0.8,
                                                  height=0.7)
     self.multidesignList.setMyPosition(-0.55, 0.35)
     self.multidesignList.setMyMode(self)
     self.multidesignList.setOnClickMethod('multiShipDesignSelected')
     self.gui.append(self.multidesignList)
     self.populateMultiShipDesignList()
Example #13
0
 def createDamagedList(self, text):
     """List all Ships that are Damaged that can be Repaired"""
     self.damagedList = buttonlist.ButtonList(self.path,
                                              text,
                                              width=1.0,
                                              height=0.55)
     self.damagedList.setMyPosition(-0.56, 0.5)
     self.damagedList.setMyMode(self)
     self.damagedList.setOnClickMethod('damagedSelected')
     self.myWidgets.append(self.damagedList)
     self.populateDamagedFrom()
     self.populateDamagedList()
Example #14
0
 def createDroneDesignList(self):
     """Create a listbox to store all the existing drone designs"""
     self.removeMyGui('dronedesignList')
     self.dronedesignList = buttonlist.ButtonList(
         self.guiMediaPath,
         'Or Select from existing Drone Designs:',
         width=0.625,
         height=0.7)
     self.dronedesignList.setMyPosition(0.8, -0.5)
     self.dronedesignList.setMyMode(self)
     self.dronedesignList.setOnClickMethod('droneDesignSelected')
     self.gui.append(self.dronedesignList)
     self.populateDroneDesignList()
Example #15
0
 def createRegimentList(self):
     """List all Available Regiments"""
     text = 'Choose a Marine Regiment Type to Recruit:'
     self.regimentList = buttonlist.ButtonList(self.path,
                                               text,
                                               width=0.6,
                                               height=0.55)
     self.regimentList.setMyPosition(-0.96, 0.23)
     self.regimentList.setMyMode(self)
     self.regimentList.setOnClickMethod('regimentTypeSelected')
     self.myWidgets.append(self.regimentList)
     self.populateRegimentList()
     self.regimentList.myScrolledList.scrollToBottom()
Example #16
0
 def createMarketOrdersList(self):
     """Show list market orders for this system this round"""
     x = self.posInitX + 0.3
     y = self.posInitY - 0.65
     self.marketorderslist = buttonlist.ButtonList(
         self.path,
         'Current Market Orders This Turn:',
         width=1.1,
         height=0.6)
     self.marketorderslist.setMyPosition(x, y)
     self.marketorderslist.setMyMode(self)
     self.marketorderslist.setOnClickMethod('createCancelMarketOrderButton')
     self.myWidgets.append(self.marketorderslist)
     self.populateMarketOrderList()
Example #17
0
 def createMultiTeamList(self, num):
     listname = 'multiTeam%dList' % num
     self.removeMyGui(listname)
     myList = getattr(self, listname)
     myList = buttonlist.ButtonList(self.guiMediaPath,
                                    'Team %d Ships: (select to remove)' %
                                    num,
                                    width=0.9,
                                    height=0.5)
     myList.setMyPosition(-0.5 + (num - 1) * 1, -0.35)
     myList.setMyMode(self)
     myList.setOnClickMethod(listname + 'Selected')
     setattr(self, listname, myList)
     self.gui.append(myList)
Example #18
0
 def createRegimentBuildList(self):
     """List all Regiments to be built"""
     text = 'Choose a Build Order to Reduce:'
     self.regimentBuildList = buttonlist.ButtonList(self.path,
                                                    text,
                                                    width=0.6,
                                                    height=0.55)
     self.regimentBuildList.setMyPosition(-0.96, -0.5)
     self.regimentBuildList.setMyMode(self)
     self.regimentBuildList.setOnClickMethod('regimentOrderSelected')
     self.myWidgets.append(self.regimentBuildList)
     self.populateRegimentBuildList()
     self.createCadetsAvailable()
     self.createAvailMIC()
Example #19
0
 def createMailBodyFrame(self):
     """Build a Mail Body Frame"""
     self.mailBody = buttonlist.ButtonList(self.guiMediaPath,
                                           'Message Details:', 1.9, 0.6)
     self.mailBody.setMyPosition(0, -0.2)
     self.gui.append(self.mailBody)
Example #20
0
 def createRoundStatusFrame(self):
     """Build a Round Status Frame"""
     self.roundStatus = buttonlist.ButtonList(self.guiMediaPath,
                                              'Round Status:', 1.9, 0.4)
     self.roundStatus.setMyPosition(0, -0.75)
     self.gui.append(self.roundStatus)