Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Changing the order inventory items are displayed  (Read 3866 times)

0 Members and 1 Guest are viewing this topic.

mowren

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • View Profile
Changing the order inventory items are displayed
« on: July 20, 2008, 10:21:52 AM »

I've looked around in this forum for quite some time now but didn't find an satisfying answer to my question yet. If there's a matching thread already please link me to it.

But on to my concern.
I'd like to know if it's possible to change the order an InventoryBox is filled with items when displayed. As far as I see it, the default method to display inventory items in the box starts in the top left corner and fills the columns from left to right until the row is filled. Then a new row starts under the filled one.

This works just fine but for my game I'd like the InventoryBox to start at the bottom right corner. After that the following items should be placed in the row over the previous item until the column is filled. Then a new column should be startet next to the filled one (building the grid from right to left).

Therefore I'd like to know if this is possibile with Wintermute.
And if so, where should I start to achieve it?

For your ease I visualized my idea. The numbers show the order of the inventory items being displayed.
Logged

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Changing the order inventory items are displayed
« Reply #1 on: July 22, 2008, 12:05:32 AM »

seems to me like this would be pretty easy if you set one up manually. You could number the boxes in any way that you wanted and then fill them in a corresponding fashion with your items.
Logged

mowren

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • View Profile
Re: Changing the order inventory items are displayed
« Reply #2 on: July 22, 2008, 06:33:05 AM »

So basicly your'e saying I should start with creating a new gui window instead of using the build-in inventory support?

But how would I place an item from an associative array in the corresponding nested window or entity container? I guess every item is displayed as an entity object which can be created by script, right?

Logged

DocBass

  • Regular poster
  • ***
  • Karma: 0
  • Offline Offline
  • Posts: 136
    • View Profile
Re: Changing the order inventory items are displayed
« Reply #3 on: July 22, 2008, 07:42:54 AM »

Yeah I would build one from the ground up if you want total control over it. I'm working on one right now that is a bit more complex than the built in one, similar but it does a few things differently. Maybe when I'm done I could post some generic code if you still need some help.
Logged

mowren

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 4
    • View Profile
Re: Changing the order inventory items are displayed
« Reply #4 on: July 28, 2008, 08:13:58 AM »

Well, I still need some help. I'm already struggeling with displaying an intentory icon outsite of an InventoryBox.
I created a new window and tried to create new entities for the inventory items by script and place them in nested windows or entity containers. But those entities are just images and don't behave like icons in an InventoryBox.
I'm just able to define things like MouseEntry, LeftClick, etc. but can't get it to reference a specific item in the inventory array.

Logged
 

Page created in 0.019 seconds with 23 queries.