Esempio n. 1
0
 def __init__(self, rpg):
     self.profilePic = image(rpg, 'CREATE Task Folder\Image Assets\Player_Images\Commoner.png', rpg.player.profession + " EXP: {}/{}".format(rpg.player.exp, rpg.player.exp_cap))#pylint: disable = anomalous-backslash-in-string
     self.profilePic.font.set_bold(True)
     self.profilePic.width = (rpg.settings.screen_width - 1600)
     self.profilePic.height = 210
     self.profilePic.top = (rpg.settings.screen_height) - (self.profilePic.height*2)
     self.profilePic.left = 1050
     self.profilePic.border = True
     self.profilePic.textMidBottom = True
Esempio n. 2
0
 def __init__(self, rpg):
     self.swapButton = image(rpg, 'CREATE Task Folder\Image Assets\GUI_images\Bag.png', "Player Inventory")#pylint: disable = anomalous-backslash-in-string
     self.swapButton.width = (rpg.settings.screen_width - 1600)
     self.swapButton.height = 210
     self.swapButton.top = (rpg.settings.screen_height) - self.swapButton.height
     self.swapButton.left = 1050
     self.swapButton.border = True
     self.swapButton.clickable = True
     self.inventoryShow = False
     self.statsShow = True
Esempio n. 3
0
    def __init__(self, rpg):
        self.clicked = False
        self.newSlot = 0
        self.slot1Taken = 0
        self.slot2Taken = 0
        self.slot3Taken = 0
        self.slot4Taken = 0
        self.slot5Taken = 0
        self.icon5 = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.icon5.consoleDefault(rpg, 0)
        self.slot5 = Button(rpg, "")
        self.slot5.consoleTextDefault(rpg, 0)
        self.icon4 = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.icon4.consoleDefault(rpg, 132)
        self.slot4 = Button(rpg, "")
        self.slot4.consoleTextDefault(rpg, 132)
        self.icon3 = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.icon3.consoleDefault(rpg, 264)
        self.slot3 = Button(rpg, "")
        self.slot3.consoleTextDefault(rpg, 264)
        self.icon2 = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.icon2.consoleDefault(rpg, 396)
        self.slot2 = Button(rpg, "")
        self.slot2.consoleTextDefault(rpg, 396)
        self.icon1 = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.icon1.consoleDefault(rpg, 528)
        self.slot1 = Button(rpg, "")
        self.slot1.consoleTextDefault(rpg, 528)

        self.arrow = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.arrow.width, self.arrow.height = 80, 60
        self.arrow.top, self.arrow.left = 600, 970
        self.arrow.transparent = True
Esempio n. 4
0
    def __init__(self, rpg):
        #LoadButton Settings
        self.loadButton = Button(rpg, "Load")
        self.loadButton.startDefault(rpg, 75, 0)
          
        #New game button
        self.newGameButton = Button(rpg, "New Game")
        self.newGameButton.startDefault(rpg, 0, 0)
        
        #Quit Button
        self.quitButton = Button(rpg, "Quit")
        self.quitButton.startDefault(rpg, 150, 0)

        #Project Logo
        self.logo = image(rpg, 'CREATE Task Folder\Image Assets\GUI_images\ProjectLogo.png', "")#pylint: disable = anomalous-backslash-in-string
        self.logo.top = (rpg.settings.screen_height*.5) - (self.logo.height/2) - 200
        self.logo.left = (rpg.settings.screen_width*.5) - (self.logo.width/2)
Esempio n. 5
0
    def __init__(self, rpg):
        self.upArrow = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\Arrow.png',
            "")  #pylint: disable = anomalous-backslash-in-string
        self.upArrow.width = 50
        self.upArrow.height = 210
        self.upArrow.top = (rpg.settings.screen_height) - (
            self.upArrow.height * 2)
        self.upArrow.left = 1000
        self.upArrow.clickable = True
        self.upArrow.border = True

        self.downArrow = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\downArrow.png',
            "")  #pylint: disable = anomalous-backslash-in-string
        self.downArrow.width = 50
        self.downArrow.height = 210
        self.downArrow.top = (
            rpg.settings.screen_height) - self.downArrow.height
        self.downArrow.left = 1000
        self.downArrow.border = True
        self.downArrow.clickable = True

        self.notificationImage = image(
            rpg,
            'CREATE Task Folder\Image Assets\Weapon_Images\Copper Sword Info.png',
            "")
        self.notificationImage.width = 800
        self.notificationImage.height = 196
        self.notificationImage.top = (rpg.settings.screen_height) - 331
        self.notificationImage.left = 99.995
        self.notificationImage.border = True

        self.infoBox = square(rpg)
        self.infoBox.width = 266.67
        self.infoBox.height = 196
        self.infoBox.top = (rpg.settings.screen_height) - 331
        self.infoBox.left = 99.995

        self.okButton = Button(rpg, "Ok")
        self.okButton.width = 266.67
        self.okButton.height = 40
        self.okButton.top = (rpg.settings.screen_height) - 135
        self.okButton.left = 99.995

        self.equipButton = Button(rpg, "Equip")
        self.equipButton.width = 266.67
        self.equipButton.height = 40
        self.equipButton.top = (rpg.settings.screen_height) - 135
        self.equipButton.left = 366.66

        self.deleteButton = Button(rpg, "Delete")
        self.deleteButton.width = 266.67
        self.deleteButton.height = 40
        self.deleteButton.top = (rpg.settings.screen_height) - 135
        self.deleteButton.left = 633.33

        self.infoShow = False
        self.equipItem = None

        self.blackScreen = Button(rpg, "")
        self.blackScreen.width = 999.99
        self.blackScreen.height = 420
        self.blackScreen.top = rpg.settings.screen_height - 420
        self.blackScreen.left = 0
        self.blackScreen.clickable = False

        self.weapons = rpg.player.weapons
        self.weapon_inventory = rpg.player.weapon_inventory
        self.armors = rpg.player.armors
        self.armor_inventory = rpg.player.armor_inventory
        self.buffs = rpg.player.buffs
        self.buff_inventory = rpg.player.buff_inventory
        self.miscs = rpg.player.miscs
        self.misc_inventory = rpg.player.misc_inventory
        self.quest_items = rpg.player.quest_items
        self.quest_inventory = rpg.player.quest_inventory

        self.set = 0
        self.list = self.weapon_inventory
        self.inventory = "Weapon Inventory"
        self.namelist = self.weapons
        self.msgList = []
        self.iconList = []
        self.infoList = []

        self.icon1 = image(rpg, self.get(self.set + 1, "Icon"), "")
        self.icon1.inventoryDefault(rpg, -360, 0)
        self.box1 = Button(rpg, self.get(self.set + 1, "Msg"))
        self.box1.inventoryDefault(rpg, -360, 0)

        self.icon2 = image(rpg, self.get(self.set + 2, "Icon"), "")
        self.icon2.inventoryDefault(rpg, -300, 0)
        self.box2 = Button(rpg, self.get(self.set + 2, "Msg"))
        self.box2.inventoryDefault(rpg, -300, 0)

        self.icon3 = image(rpg, self.get(self.set + 3, "Icon"), "")
        self.icon3.inventoryDefault(rpg, -240, 0)
        self.box3 = Button(rpg, self.get(self.set + 3, "Msg"))
        self.box3.inventoryDefault(rpg, -240, 0)

        self.icon4 = image(rpg, self.get(self.set + 4, "Icon"), "")
        self.icon4.inventoryDefault(rpg, -180, 0)
        self.box4 = Button(rpg, self.get(self.set + 4, "Msg"))
        self.box4.inventoryDefault(rpg, -180, 0)

        self.icon5 = image(rpg, self.get(self.set + 5, "Icon"), "")
        self.icon5.inventoryDefault(rpg, -120, 0)
        self.box5 = Button(rpg, self.get(self.set + 5, "Msg"))
        self.box5.inventoryDefault(rpg, -120, 0)

        self.icon6 = image(rpg, self.get(self.set + 6, "Icon"), "")
        self.icon6.inventoryDefault(rpg, -60, 0)
        self.box6 = Button(rpg, self.get(self.set + 6, "Msg"))
        self.box6.inventoryDefault(rpg, -60, 0)

        self.icon7 = image(rpg, self.get(self.set + 7, "Icon"), "")
        self.icon7.inventoryDefault(rpg, -360, 333.33)
        self.box7 = Button(rpg, self.get(self.set + 7, "Msg"))
        self.box7.inventoryDefault(rpg, -360, 333.33)

        self.icon8 = image(rpg, self.get(self.set + 8, "Icon"), "")
        self.icon8.inventoryDefault(rpg, -300, 333.33)
        self.box8 = Button(rpg, self.get(self.set + 8, "Msg"))
        self.box8.inventoryDefault(rpg, -300, 333.33)

        self.icon9 = image(rpg, self.get(self.set + 9, "Icon"), "")
        self.icon9.inventoryDefault(rpg, -240, 333.33)
        self.box9 = Button(rpg, self.get(self.set + 9, "Msg"))
        self.box9.inventoryDefault(rpg, -240, 333.33)

        self.icon10 = image(rpg, self.get(self.set + 10, "Icon"), "")
        self.icon10.inventoryDefault(rpg, -180, 333.33)
        self.box10 = Button(rpg, self.get(self.set + 10, "Msg"))
        self.box10.inventoryDefault(rpg, -180, 333.33)

        self.icon11 = image(rpg, self.get(self.set + 11, "Icon"), "")
        self.icon11.inventoryDefault(rpg, -120, 333.33)
        self.box11 = Button(rpg, self.get(self.set + 11, "Msg"))
        self.box11.inventoryDefault(rpg, -120, 333.33)

        self.icon12 = image(rpg, self.get(self.set + 12, "Icon"), "")
        self.icon12.inventoryDefault(rpg, -60, 333.33)
        self.box12 = Button(rpg, self.get(self.set + 12, "Msg"))
        self.box12.inventoryDefault(rpg, -60, 333.33)

        self.icon13 = image(rpg, self.get(self.set + 13, "Icon"), "")
        self.icon13.inventoryDefault(rpg, -360, 666.67)
        self.box13 = Button(rpg, self.get(self.set + 13, "Msg"))
        self.box13.inventoryDefault(rpg, -360, 666.67)

        self.icon14 = image(rpg, self.get(self.set + 14, "Icon"), "")
        self.icon14.inventoryDefault(rpg, -300, 666.67)
        self.box14 = Button(rpg, self.get(self.set + 14, "Msg"))
        self.box14.inventoryDefault(rpg, -300, 666.67)

        self.icon15 = image(rpg, self.get(self.set + 15, "Icon"), "")
        self.icon15.inventoryDefault(rpg, -240, 666.67)
        self.box15 = Button(rpg, self.get(self.set + 15, "Msg"))
        self.box15.inventoryDefault(rpg, -240, 666.67)

        self.icon16 = image(rpg, self.get(self.set + 16, "Icon"), "")
        self.icon16.inventoryDefault(rpg, -180, 666.67)
        self.box16 = Button(rpg, self.get(self.set + 16, "Msg"))
        self.box16.inventoryDefault(rpg, -180, 666.67)

        self.icon17 = image(rpg, self.get(self.set + 17, "Icon"), "")
        self.icon17.inventoryDefault(rpg, -120, 666.67)
        self.box17 = Button(rpg, self.get(self.set + 17, "Msg"))
        self.box17.inventoryDefault(rpg, -120, 666.67)

        self.icon18 = image(rpg, self.get(self.set + 18, "Icon"), "")
        self.icon18.inventoryDefault(rpg, -60, 666.67)
        self.box18 = Button(rpg, self.get(self.set + 18, "Msg"))
        self.box18.inventoryDefault(rpg, -60, 666.67)

        self.weaponTag = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\WeaponTag.png',
            "Weapon Inventory"
        )  #pylint: disable = anomalous-backslash-in-string
        self.weaponTag.tagDefault(rpg, 0)
        self.armorTag = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\ArmorTag.png',
            "Armor Inventory"
        )  #pylint: disable = anomalous-backslash-in-string
        self.armorTag.tagDefault(rpg, 180)
        self.buffTag = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\BuffTag.png',
            "Buff Inventory")  #pylint: disable = anomalous-backslash-in-string
        self.buffTag.tagDefault(rpg, 360)
        self.miscTag = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\MiscTag.png',
            "Misc Inventory")  #pylint: disable = anomalous-backslash-in-string
        self.miscTag.tagDefault(rpg, 540)
        self.questTag = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\QuestTag.png',
            "Quest Inventory"
        )  #pylint: disable = anomalous-backslash-in-string
        self.questTag.tagDefault(rpg, 720)

        self.gold = image(
            rpg, 'CREATE Task Folder\Image Assets\GUI_images\GoldTag.png',
            "Gold: {}".format(rpg.player.gold)
        )  #pylint: disable = anomalous-backslash-in-string
        self.gold.tagDefault(rpg, 899.99)
        self.gold.width = 100
        self.gold.clickable = False
Esempio n. 6
0
    def __init__(self, rpg):

        self.playerIcon = image(rpg, rpg.player.icon, rpg.player.name)#pylint: disable = anomalous-backslash-in-string
        self.playerIcon.iconDefault(rpg, -315)
        self.playerSquare = square(rpg)
        self.playerSquare.combatDefault(rpg, -315)
        self.playerAttack = Button(rpg, "Attack")
        self.playerAttack.combatDefault(rpg, -367.5, 0)
        self.playerDefend = Button(rpg, "Defend")
        self.playerDefend.combatDefault(rpg, -367.5, 205)
        self.playerRest = Button(rpg, "Rest")
        self.playerRest.combatDefault(rpg, -315, 0)
        self.playerUse = Button(rpg, "Use Item")
        self.playerUse.combatDefault(rpg, -315, 205)

        self.equipped_allies = rpg.player.equipped_allies
        
        try:
            if self.equipped_allies[0]:
                #self.ally1Icon = image(rpg, rpg.player.equipped_allies[0].icon, rpg.player.equipped_allies[0].name)
                #self.ally1Icon.iconDefault(rpg, -210)
                self.ally1Square = square(rpg)
                self.ally1Square.combatDefault(rpg, -210)
                self.ally1Attack = Button(rpg, "Attack")
                self.ally1Attack.combatDefault(rpg, -262.5, 0)
                self.ally1Defend = Button(rpg, "Defend")
                self.ally1Defend.combatDefault(rpg, -262.5, 205)
                self.ally1Rest = Button(rpg, "Rest")
                self.ally1Rest.combatDefault(rpg, -210, 0)
                self.ally1Use = Button(rpg, "Use Item")
                self.ally1Use.combatDefault(rpg, -210, 205)
                
            if self.equipped_allies[1]:
                #self.ally2Icon = image(rpg, rpg.player.equipped_allies[1].icon, rpg.player.equipped_allies[1].name)
                #self.ally2Icon.iconDefault(rpg, -105)
                self.ally2Square = square(rpg)
                self.ally2Square.combatDefault(rpg, -105)
                self.ally2Attack = Button(rpg, "Attack")
                self.ally2Attack.combatDefault(rpg, -157.5, 0)
                self.ally2Defend = Button(rpg, "Defend")
                self.ally2Defend.combatDefault(rpg, -157.5, 205)
                self.ally2Rest = Button(rpg, "Rest")
                self.ally2Rest.combatDefault(rpg, -105, 0)
                self.ally2Use = Button(rpg, "Use Item")
                self.ally2Use.combatDefault(rpg, -105, 205)
            
            if self.equipped_allies[2]:
                #self.ally3Icon = image(rpg, rpg.player.equipped_allies[2].icon, rpg.player.equipped_allies[2].name)
                #self.ally3Icon.iconDefault(rpg, 0)
                self.ally3Square = square(rpg)
                self.ally3Square.combatDefault(rpg, 0)
                self.ally3Attack = Button(rpg, "Attack")
                self.ally3Attack.combatDefault(rpg, -52.5, 0)
                self.ally3Defend = Button(rpg, "Defend")
                self.ally3Defend.combatDefault(rpg, -52.5, 205)
                self.ally3Rest = Button(rpg, "Rest")
                self.ally3Rest.combatDefault(rpg, 0, 0)
                self.ally3Use = Button(rpg, "Use Item")
                self.ally3Use.combatDefault(rpg, 0, 205)
        except:
            pass
        
        self.background = image(rpg, "CREATE Task Folder\Image Assets\Transparent.png", "")
        self.background.left, self.background.top = 0, 0
        self.background.width, self.background.height = 1050, 660
        
        self.enemyImage = image(rpg, self.enemy.image, "")
        self.enemyImage.left, self.enemyImage.top = 250, 220
        self.enemyImage.width, self.enemyImage.height = 550, 420
        self.enemyImage.transparent = True

        self.enemyInfo = Button(rpg, "{} - Level: {}".format(self.enemy.name, self.enemy.level))
        self.enemyInfo.width, self.enemyInfo.height = 550, 35
        self.enemyInfo.left, self.enemyInfo.top = 250, 80
        self.enemyInfo.clickable = False

        self.enemyHP = Button(rpg, "HP: {}/{}".format(self.enemy.hp, self.enemy.maxhp))
        self.enemyHP.width, self.enemyHP.height = 275, 35
        self.enemyHP.left, self.enemyHP.top = 250, 115
        self.enemyHP.transparent = True
        self.enemyHP.clickable = False

        self.enemyHPbar = Button(rpg, "")
        self.enemyHPbar.width, self.enemyHPbar.height = 275, 35
        self.enemyHPbar.left, self.enemyHPbar.top = 250, 115
        self.enemyHPbar.button_color = (200, 0, 0)
        self.enemyHPbar.text_color = (200, 0, 0)
        self.enemyHPbar.clickable = False

        self.enemyStamina = Button(rpg, "Stamina: {}/{}".format(self.enemy.stamina, self.enemy.stamina_max))
        self.enemyStamina.width, self.enemyStamina.height = 275, 35
        self.enemyStamina.left, self.enemyStamina.top = 525, 115
        self.enemyStamina.transparent = True
        self.enemyStamina.clickable = False

        self.enemyStaminaBar = Button(rpg, "")
        self.enemyStaminaBar.width, self.enemyStaminaBar.height = 275, 35
        self.enemyStaminaBar.left, self.enemyStaminaBar.top = 525, 115
        self.enemyStaminaBar.button_color = (0, 200, 0)
        self.enemyStaminaBar.text_color = (0, 200, 0)
        self.enemyStaminaBar.clickable = False

        self.enemyMana = Button(rpg, "Mana: {}/{}".format(self.enemy.mana, self.enemy.mana_max))
        self.enemyMana.width, self.enemyMana.height = 550, 35
        self.enemyMana.left, self.enemyMana.top = 250, 150
        self.enemyMana.transparent = True
        self.enemyMana.clickable = False

        self.enemyManaBar = Button(rpg, "")
        self.enemyManaBar.width, self.enemyManaBar.height = 550, 35
        self.enemyManaBar.left, self.enemyManaBar.top = 250, 150
        self.enemyManaBar.button_color = (0, 0, 200)
        self.enemyManaBar.text_color = (0, 0, 200)
        self.enemyManaBar.clickable = False

        self.enemyStats = False