예제 #1
0
파일: tradevalue.py 프로젝트: colshag/ANW
    def __init__(self, path, mySystemDict, toSystemDict, myTradeRouteDict, x=-1.24, y=-0.35):
        self.mySystemDict = mySystemDict
        self.toSystemDict = toSystemDict
        self.myTradeRouteDict = myTradeRouteDict
        RootButton.__init__(self, path, x=x, y=y, name='trade')
        self.allKeys = ['A','S','D','Z','X','C','V','F','G']
        self.scale = 0.25
        self.tradeBars = None
        self.textTradeDescription = None
        self.writeTradeDescription()
        self.disableButtonTime = 0.5
        self.disableButtonIgnore = ['S', 'Z', 'X', 'C', 'G', 'F', 'V']
        self.resource = 0 # 0=AL,1=EC,2=IA
        self.scrollFactor = 0
        self.pressButton('C')
        self.pressButton('G')
        self.disableSubmitButtons()
        self.disableButton('cancel')
        self.createDefaultTradeRoute()
        self.maxResourceAmounts = [self.myTradeRouteDict['AL']+self.mySystemDict['AL'], 
                                   self.myTradeRouteDict['EC']+self.mySystemDict['EC'],
                                   self.myTradeRouteDict['IA']+self.mySystemDict['IA']]

        self.tradeResourceAmounts = [self.myTradeRouteDict['AL'], self.myTradeRouteDict['EC'],
                                     self.myTradeRouteDict['IA']]
        self.initTradeResourceAmounts = copy.copy(self.tradeResourceAmounts)
        self.createTradeBars()
예제 #2
0
 def __init__(self, path, mySystemDict, resource, currentPrice):
     self.mySystemDict = mySystemDict
     self.resource = resource
     self.currentPrice = currentPrice
     self.maxPrice = currentPrice
     self.maxPriceIncrease = self.maxPrice * 4.0
     y = -0.4
     x = -1.03
     RootButton.__init__(self, path, x=x, y=y, name='sys_buy')
     self.allKeys = ['A', 'S', 'D', 'F', 'G', 'Z', 'X', 'C', 'V']
     self.scale = 0.25
     self.priceBar = None
     self.amountBar = None
     self.maxAmount = 20000.0
     self.currentAmount = 0.0
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'F', 'G', 'Z', 'X', 'C', 'V']
     self.scrollFactor = 0
     self.focus = 'price'
     self.pressButton('G')
     self.pressButton('V')
     self.myTitle = 'Set Price and Amount to Buy on Market:'
     self.createTitleCard('marketTitle',
                          'Create Buy Order for %s:' % self.resource, 30,
                          x - 0.04, y + 0.35)
     self.createPriceBar()
     self.createAmountBar()
     self.enableSubmit()
예제 #3
0
파일: systemmenu.py 프로젝트: colshag/ANW
 def __init__(self, path, mySystemDict):
     RootButton.__init__(self, path, x=-0.26, y=0.08, name='system')
     self.allKeys = ['1', '2', '3', '5', '6']
     self.mySystemDict = mySystemDict
     self.myText = None
     self.disableButtonTime = -1
     self.disableButtonIgnore = []
     self.id = ''
     self.font = loader.loadFont('%s/star5' % self.path)
     self.newtradelist = None
     self.cityindustrygui = None
     self.systemindustrygui = None
     self.modifyindustrygui = None
     self.systemresourcesgui = None
     self.shipyardbuildshipsgui = None
     self.shipyardrepairshipsgui = None
     self.shipyardupgradeshipsgui = None
     self.mibuildmarinesgui = None
     self.mirepairmarinesgui = None
     self.miupgrademarinesgui = None
     self.tradevaluegui = None
     self.shipyardmenu = None
     self.systemmarketmenu = None
     self.mimenu = None
     self.marketsystemsellgui = None
     self.marketsystembuygui = None
     self.marketorderslist = None
     self.cancelMarketOrderButton = None
     self.createTitle()
예제 #4
0
 def __init__(self, path, x=-0.35, y=0.95, name='main'):
     RootButton.__init__(self, path, x, y, name, ignoreShortcutButtons = [])
     self.allKeys = ['Q','W','E','R','T','Y','U','I','O']
     self.disableButtonIgnore = []
     self.disableButtonTime = 0
     self.lastDisabledButton = ''
     self.textTitle = None
     self.textRoundEnds = None
     self.empireSim = None
     self.textEmpireName = None
     self.textCR = None
     self.questionendround = None
     self.textRound = None
예제 #5
0
 def __init__(self, path, designName, maxNum, shipDesignID, x=0.5, y=-0.8):
     self.designName = designName
     self.shipDesignID = shipDesignID
     RootButton.__init__(self, path, x=x, y=y, name='multisim')
     self.allKeys = ['A', 'S', 'D', 'Z', 'X']
     self.scale = 0.25
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X']
     self.scrollFactor = 1
     self.maxValue = maxNum
     self.selected = 1  #team 1, team 2
     self.shipNum = None
     self.shipCount = 1
     self.pressButton('Z')
     self.enableSubmitButtons()
예제 #6
0
 def __init__(self, path, otherDesignID, x=0.5, y=-0.8):
     self.otherDesignID = otherDesignID
     RootButton.__init__(self, path, x=x, y=y, name='bv')
     self.allKeys = ['A','S','D','Z','X','C','V','F']
     self.scale = 0.25
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X', 'C', 'F', 'V']
     self.scrollFactor = 0
     self.maxValue = 50.0
     self.selected = 0 #mine=0, other=1
     self.pressButton('X')
     self.pressButton('F')
     self.enableSubmitButtons()
     self.myBV = None
     self.otherBV = None
     self.myValues = [10.0,10.0]
예제 #7
0
 def __init__(self, path, empireDict, systemID, toName):
     self.empireDict = empireDict
     self.systemID = systemID
     y = -0.15
     x = -0.95
     RootButton.__init__(self, path, x=x, y=y, name='sendcredit')
     self.allKeys = ['A', 'S', 'D', 'Z', 'X', 'C', 'V']
     self.scale = 0.25
     self.amountBar = None
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X', 'C', 'V']
     self.currentAmount = 0.0
     self.scrollFactor = 0
     self.pressButton('V')
     self.createTitleCard('marketTitle',
                          'Select Credits to send to %s:' % toName, 30,
                          x - 0.04, y + 0.315)
     self.createAmountBar()
예제 #8
0
 def __init__(self, path, x, y, name, default='X'):
     RootButton.__init__(self, path, x, y, name)
     self.allKeys = ['A', 'S', 'D', 'Z', 'X', 'C']
     self.myText = None
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X', 'C']
     self.id = ''
     self.font = loader.loadFont('%s/star5' % self.path)
     self.currentValue = 0
     self.maxValue = 0
     self.minValue = 0
     self.createTextCard()
     self.pressButton(default)
     if hasattr(self, 'button_S'):
         self.disableButton('S')
     self.createTitleCard('scrollTitle1',
                          'Choose Amount of Research to Add or Subtract:',
                          12, self.posInitX - 0.04, self.posInitY + 0.316)
예제 #9
0
 def __init__(self,
              path,
              x=-1.25,
              y=0.19,
              name='movearmies',
              maxByType=[0, 0, 0]):
     self.maxByType = maxByType
     self.currentByType = [0, 0, 0]
     RootButton.__init__(self, path, x=x, y=y, name=name)
     self.allKeys = ['A', 'S', 'D', 'Z', 'X', 'C']
     self.scale = 0.29
     self.myBars = None
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X', 'C']
     self.type = 0  # 0=Mechanized,1=Artillery,2=Infantry
     self.pressButton('Z')
     self.disableButton('S')
     self.createMoveBars()
예제 #10
0
파일: cityindustry.py 프로젝트: colshag/ANW
 def __init__(self,
              path,
              x=-1.25,
              y=0.19,
              name='',
              systemID='',
              cityIndustryList=[]):
     self.systemID = systemID
     self.cityIndustryList = copy.copy(cityIndustryList)
     self.initCityIndustryList = copy.copy(cityIndustryList)
     RootButton.__init__(self, path, x=x, y=y, name=name)
     self.allKeys = ['A', 'S', 'D', 'Z', 'X', 'C']
     self.scale = 0.29
     self.cityIndustryBars = None
     self.disableButtonTime = 0.5
     self.disableButtonIgnore = ['S', 'Z', 'X', 'C']
     self.resource = 0  # 0=AL,1=EC,2=IA
     self.pressButton('Z')
     self.disableButton('S')
     self.spareCities = 0
     self.totalCities = 0
     self.totalCityList = []
     self.setTotalCities()
     self.createCityIndustryBars()
예제 #11
0
 def __init__(self, path, x, y, shipList):
     self.shipList = shipList
     RootButton.__init__(self, path, x=x, y=y, name='map')
     self.scale = 0.25
예제 #12
0
 def __init__(self, path, x=0.35, y=0.48):
     RootButton.__init__(self, path, x=x, y=y, name='diplomacy')
     self.scale = 0.25
예제 #13
0
 def __init__(self, path, x=0, y=-0.1):
     RootButton.__init__(self, path, x=x, y=y, name='shipyard')
     self.scale = 0.25
예제 #14
0
파일: submitbutton.py 프로젝트: colshag/ANW
 def __init__(self, path, x=-0.1, y=-0.85):
     RootButton.__init__(self, path, x=x, y=y, name='order')
     self.scale = 0.25
예제 #15
0
파일: designmenu.py 프로젝트: colshag/ANW
 def __init__(self, path, x=-0.53, y=0.85):
     RootButton.__init__(self, path, x=x, y=y, name='design')
     self.scale = 0.25
예제 #16
0
 def __init__(self, path, mySystemDict, x=-0.25, y=-0.1):
     RootButton.__init__(self, path, x=x, y=y, name='market')
     self.mySystemDict = mySystemDict
     self.scale = 0.25
     self.createMySystemResources()
예제 #17
0
 def __init__(self, path, x=0, y=0):
     RootButton.__init__(self, path, x=x, y=y, name='order')
     self.scale = 0.25
예제 #18
0
 def __init__(self, path, x=-0.1, y=-0.3):
     RootButton.__init__(self, path, x=x, y=y, name='mapmove')
     self.scale = 0.25