Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: "next" & "prev" possible bug  (Read 4601 times)

0 Members and 1 Guest are viewing this topic.

CMK2901

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Zoidberg is afoot!
    • View Profile
    • CMK Studios
"next" & "prev" possible bug
« on: January 27, 2007, 10:42:28 PM »

Sorry for posting so much, but I've really been slaving away at transferring my project to Wintermute and I may have come upon a small bug.

For the inventory object, I have two button objects to scroll through the inventory and these buttons use the IMAGE_PRESS property.  When the buttons are not named "prev" and "next", they work fine, but when I name the buttons appropriately, the button no longer switches to a pressed state when clicked.  This seems to only happen when the buttons are named "next" and "prev" (possible "close" as well, but I haven't tried). 


-Clark
Logged
CMK Studios
I don't think we're hearing the same voices.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "next" & "prev" possible bug
« Reply #1 on: January 28, 2007, 09:36:55 AM »

I'm unable to replicate this, it seems to work ok for me. How does your inventory definition look like? Any errors in wme.log (missing images etc.)?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

CMK2901

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Zoidberg is afoot!
    • View Profile
    • CMK Studios
Re: "next" & "prev" possible bug
« Reply #2 on: January 28, 2007, 07:10:11 PM »

Sure; I have this in inventory.def:

Code: [Select]
INVENTORY_BOX
{
  ITEM_WIDTH = 65
  ITEM_HEIGHT = 65
  SPACING = 10
  SCROLL_BY = 1
  HIDE_SELECTED = FALSE

  AREA { 252, 0, 755, 90 }

  WINDOW
  {
    NAME = "Inventory"
    X = 0
    Y = 510
    WIDTH = 799
    HEIGHT = 90
    IMAGE = "interface\InventoryDialog\inv_background.png"
    MENU = FALSE
 
    BUTTON
    {
      NAME = "interactInv"
      IMAGE = "interface\InventoryDialog\interact_n.png"
      IMAGE_HOVER = "interface\InventoryDialog\interact_h.png"
      IMAGE_PRESS = "interface\InventoryDialog\interact_d.png"
      X = 0
      Y = 0
      PARENT_NOTIFY = TRUE
    }

    BUTTON
    {
      NAME = "lookInv"
      IMAGE = "interface\InventoryDialog\look_n.png"
      IMAGE_HOVER = "interface\InventoryDialog\look_h.png"
      IMAGE_PRESS = "interface\InventoryDialog\look_d.png"
      X = 84
      Y = 0
      PARENT_NOTIFY = TRUE
    }

    BUTTON
    {
      NAME = "pointerInv"
      IMAGE = "interface\InventoryDialog\pointer_n.png"
      IMAGE_HOVER = "interface\InventoryDialog\pointer_h.png"
      IMAGE_PRESS = "interface\InventoryDialog\pointer_d.png"
      X = 168
      Y = 0
      PARENT_NOTIFY = TRUE
    }

    BUTTON
    {
      NAME = "prev"
      IMAGE = "interface\InventoryDialog\arru_n.png"
      IMAGE_PRESS = "interface\InventoryDialog\arru_d.png"
      X = 755
      Y = 0
      PARENT_NOTIFY = TRUE
    }

    BUTTON
    {
      NAME = "next"
      IMAGE = "interface\InventoryDialog\arrd_n.png"
      IMAGE_PRESS = "interface\InventoryDialog\arrd_d.png"
      X = 755
      Y = 45
      PARENT_NOTIFY = TRUE
    }
  }
}

And if I rename the prev and next buttons to anything else, the button animation works, but as-is, it doesn't seem to respond.  Any ideas?? 

If there is a manual command for scrolling through the inventory besides using "next" and "prev", it would be easy enough to name them something else and then script the action in an "on" event statement.
Logged
CMK Studios
I don't think we're hearing the same voices.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: "next" & "prev" possible bug
« Reply #3 on: January 28, 2007, 07:17:45 PM »

Are those buttons actually enabled? WME automatically disables the "next" and "prev" buttons if there are not enough items to scroll. Since you don't have a separate image for the disabled state, they may appear to be enabled, while they are actually not.

And, yes, you can manually scroll the inventory by changing the Game.InventoryScrollOffset attribute.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

CMK2901

  • Lurker
  • *
  • Karma: 1
  • Offline Offline
  • Gender: Male
  • Posts: 35
  • Zoidberg is afoot!
    • View Profile
    • CMK Studios
Re: "next" & "prev" possible bug
« Reply #4 on: January 29, 2007, 12:59:31 AM »

Ah, yes.  That has to be it.

Thanks for the speedy replies!
Logged
CMK Studios
I don't think we're hearing the same voices.
 

Page created in 0.019 seconds with 23 queries.