FIFE forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

FIFE 0.4.0 has been released on 15th of January, 2017!

Author Topic: Making specific changes to FIFE for the development of PARPG  (Read 2591 times)

Bretzel13

  • Newbie
  • Posts: 19
    • View Profile

Hello all,

I'm Bretzel and I've been working on some inventory code for PARPG. I have created a new widget within PyChan called InventoryButton. It is essentially a ImageButton, but has an attribute to store the item that would placed in that "slot". It wouldn't be of much use to anyone other than a PARPG developer, so how should I go about implementing it into FIFE?

Thanks,
Bretzel
Logged

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Making specific changes to FIFE for the development of PARPG
« Reply #1 on: May 08, 2009, 10:34:50 am »

Could you please attach the patch that is needed to modify the pychan files to your next post Bretzel? Niha from UH wanted to have a look at it to propose a potential approach.
Logged

chewie

  • Developer
  • Full Member
  • *
  • Posts: 123
    • View Profile
    • zero-projekt.net
Re: Making specific changes to FIFE for the development of PARPG
« Reply #2 on: June 06, 2009, 08:08:44 am »

Mmh... as you'll get a python object after creating an instance of a widget - why not just use that object and add one (or more) attribute(s) on runtime?

Code: [Select]
imgButton = ImageButton(args)
imgButton.currentItem = myItem.object

imgButton.currentItem.getWeight()
imgButton.currentItem.getName()

...


IMO core doesn't need to be touched for that purpose. (or do I miss something special here?)

mvBarracuda

  • Administrator
  • Sr. Member
  • *
  • Posts: 411
    • View Profile
Re: Making specific changes to FIFE for the development of PARPG
« Reply #3 on: June 06, 2009, 10:53:27 am »

Nah, you're right chewie :-) Bretzel worked it out with the help of some FIFE devs
Logged