Example #1
0
 def __init__(self):
    
    self.scrollbar.x = 669
    self.scrollbar.y = 119
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    
    self.buyButtonImage = loadImageSize(self.buyButtonSheet,
                                        0,
                                        0,
                                        127,
                                        42
                                       )
    
    closeBtn        = Button()
    closeBtn.x      = 379
    closeBtn.y      = 483
    closeBtn.width  = 185
    closeBtn.height = 60
    closeBtn.label  = 'closeGUI'
    self.buttons.append(closeBtn)
    
    companies = Company.objects.all()
    self.cacheList = pygame.Surface((500,len(companies)*(self.guiRowDist*6)-self.guiRowDist), pygame.SRCALPHA, 32)
    self.cacheList = self.cacheList.convert_alpha()
Example #2
0
 def __init__(self):
    
    self.scrollbar.x = 669
    self.scrollbar.y = 119
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
                              
    self.sellButtonImage = loadImageSize(self.sellButtonSheet,
                                         0,
                                         0,
                                         127,
                                         42
                                        )
    
    closeBtn        = Button()
    closeBtn.x      = 379
    closeBtn.y      = 483
    closeBtn.width  = 185
    closeBtn.height = 60
    closeBtn.label  = 'closeGUI'
    self.buttons.append(closeBtn)
    
    player = Investor.objects.get(type='player')
    
    stocks = Portfolio.objects.filter(investor=player)
    
    self.cacheList = pygame.Surface((500,((len(stocks)*(self.guiRowDist*3)))), pygame.SRCALPHA, 32)
    self.cacheList = self.cacheList.convert_alpha()
Example #3
0
 def __init__(self):
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
Example #4
0
 def __init__(self):
    self.movingPositions = []
    self.nametagImage = loadImageSize(self.nametagSheet,
                               0,
                               0,
                               97,
                               43
                              )
Example #5
0
 def __init__(self):
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               32,
                               36
                              )
Example #6
0
 def __init__(self):
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
Example #7
0
 def close(self):
    self.height = self.minHeight
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    self.isOpen = False
Example #8
0
 def open(self):
    self.height = self.maxHeight
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    self.isOpen = True
Example #9
0
 def __init__(self):
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    
    backBtn        = Button()
    backBtn.x      = 353
    backBtn.y      = 472
    backBtn.width  = 228
    backBtn.height = 80
    backBtn.label  = 'backToMenu'
    self.buttons.append(backBtn)
Example #10
0
 def __init__(self):
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    
    portfolioBtn        = Button()
    portfolioBtn.x      = 0
    portfolioBtn.y      = 44
    portfolioBtn.width  = 132
    portfolioBtn.height = 40
    portfolioBtn.label  = 'portfolio'
    self.buttons.append(portfolioBtn)
    
    opponentsBtn        = Button()
    opponentsBtn.x      = 0
    opponentsBtn.y      = 90
    opponentsBtn.width  = 132
    opponentsBtn.height = 40
    opponentsBtn.label  = 'opponents'
    self.buttons.append(opponentsBtn)
    
    marketBtn        = Button()
    marketBtn.x      = 0
    marketBtn.y      = 134
    marketBtn.width  = 132
    marketBtn.height = 40
    marketBtn.label  = 'market'
    self.buttons.append(marketBtn)
    
    exitBtn        = Button()
    exitBtn.x      = 0
    exitBtn.y      = 172
    exitBtn.width  = 132
    exitBtn.height = 40
    exitBtn.label  = 'exit'
    self.buttons.append(exitBtn)
Example #11
0
 def __init__(self):
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    
    loadCharacter        = Button()
    loadCharacter.x      = 360
    loadCharacter.y      = 160
    loadCharacter.width  = 228
    loadCharacter.height = 80
    loadCharacter.label  = 'loadChar'
    self.buttons.append(loadCharacter)
    
    createCharacter        = Button()
    createCharacter.x      = 360
    createCharacter.y      = 252
    createCharacter.width  = 228
    createCharacter.height = 80
    createCharacter.label  = 'createChar'
    self.buttons.append(createCharacter)
    
    instructions        = Button()
    instructions.x      = 360
    instructions.y      = 355
    instructions.width  = 228
    instructions.height = 80
    instructions.label  = 'instructions'
    self.buttons.append(instructions)
    
    exit        = Button()
    exit.x      = 360
    exit.y      = 421
    exit.width  = 228
    exit.height = 80
    exit.label  = 'exit'
    self.buttons.append(exit)
Example #12
0
 def __init__(self):
    
    self.scrollbar.x = 669
    self.scrollbar.y = 119
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
    
    closeBtn        = Button()
    closeBtn.x      = 379
    closeBtn.y      = 483
    closeBtn.width  = 185
    closeBtn.height = 60
    closeBtn.label  = 'closeGUI'
    self.buttons.append(closeBtn)
    
    investors = Investor.objects.all()
    self.cacheList = pygame.Surface((500,len(investors)*self.guiRowDist+self.guiRowDist), pygame.SRCALPHA, 32)
    self.cacheList = self.cacheList.convert_alpha()
Example #13
0
 def __init__(self):
    
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
                              
    self.selectorImage = loadImageSize(self.selectorSheet,
                                       0,
                                       0,
                                       24,
                                       25
                                      )
    
    menuBtn        = Button()
    menuBtn.x      = 270
    menuBtn.y      = 479
    menuBtn.width  = 162
    menuBtn.height = 60
    menuBtn.label  = 'backToMenu'
    self.buttons.append(menuBtn)
    
    saveBtn        = Button()
    saveBtn.x      = 495
    saveBtn.y      = 479
    saveBtn.width  = 162
    saveBtn.height = 60
    saveBtn.label  = 'saveChar'
    self.buttons.append(saveBtn)
    
    char1        = Button()
    char1.x      = 290
    char1.y      = 266
    char1.width  = 60
    char1.height = 70
    char1.label  = self.char1Name
    self.buttons.append(char1)
    
    char2        = Button()
    char2.x      = 384
    char2.y      = 266
    char2.width  = 60
    char2.height = 70
    char2.label  = self.char2Name
    self.buttons.append(char2)
    
    char3        = Button()
    char3.x      = 478
    char3.y      = 266
    char3.width  = 60
    char3.height = 70
    char3.label  = self.char3Name
    self.buttons.append(char3)
    
    char4        = Button()
    char4.x      = 577
    char4.y      = 266
    char4.width  = 60
    char4.height = 70
    char4.label  = self.char4Name
    self.buttons.append(char4)
    
    char5        = Button()
    char5.x      = 289
    char5.y      = 364
    char5.width  = 60
    char5.height = 70
    char5.label  = self.char5Name
    self.buttons.append(char5)
    
    char6        = Button()
    char6.x      = 388
    char6.y      = 364
    char6.width  = 60
    char6.height = 70
    char6.label  = self.char6Name
    self.buttons.append(char6)
    
    char7        = Button()
    char7.x      = 478
    char7.y      = 364
    char7.width  = 60
    char7.height = 70
    char7.label  = self.char7Name
    self.buttons.append(char7)
    
    char8        = Button()
    char8.x      = 579
    char8.y      = 364
    char8.width  = 60
    char8.height = 70
    char8.label  = self.char8Name
    self.buttons.append(char8)
Example #14
0
 def __init__(self):
    AbstractGUI.__init__(self)
    
    self.image = loadImageSize(self.sheet,
                               0,
                               0,
                               self.width,
                               self.height
                              )
                              
    self.selectorImage = loadImageSize(self.selectorSheet,
                                       0,
                                       0,
                                       24,
                                       25
                                      )
    
    self.saveFiles = []    
    backBtn        = Button()
    backBtn.x      = 271
    backBtn.y      = 56
    backBtn.width  = 65
    backBtn.height = 44
    backBtn.label  = 'backBtn'
    self.buttons.append(backBtn)
    
    forwBtn        = Button()
    forwBtn.x      = 607
    forwBtn.y      = 56
    forwBtn.width  = 65
    forwBtn.height = 44
    forwBtn.label  = 'forwBtn'
    self.buttons.append(forwBtn)
    
    btn1        = Button()
    btn1.x      = 225
    btn1.y      = 115
    btn1.width  = 607
    btn1.height = 56
    btn1.label  = 'loading1'
    self.buttons.append(btn1)
    
    btn2        = Button()
    btn2.x      = 225
    btn2.y      = 185
    btn2.width  = 607
    btn2.height = 56
    btn2.label  = 'loading2'
    self.buttons.append(btn2)
    
    btn3        = Button()
    btn3.x      = 225
    btn3.y      = 254
    btn3.width  = 607
    btn3.height = 56
    btn3.label  = 'loading3'
    self.buttons.append(btn3)
    
    btn4        = Button()
    btn4.x      = 225
    btn4.y      = 326
    btn4.width  = 607
    btn4.height = 56
    btn4.label  = 'loading4'
    self.buttons.append(btn4)
    
    btn5        = Button()
    btn5.x      = 225
    btn5.y      = 396
    btn5.width  = 607
    btn5.height = 56
    btn5.label  = 'loading5'
    self.buttons.append(btn5)
    
    menuBtn        = Button()
    menuBtn.x      = 246
    menuBtn.y      = 470
    menuBtn.width  = 216
    menuBtn.height = 72
    menuBtn.label  = 'backToMenu'
    self.buttons.append(menuBtn)
    
    loadBtn        = Button()
    loadBtn.x      = 468
    loadBtn.y      = 470
    loadBtn.width  = 216
    loadBtn.height = 72
    loadBtn.label  = 'doLoad'
    self.buttons.append(loadBtn)