Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with inventory after refactoring #358

Closed
Predelnik opened this issue Mar 11, 2018 · 6 comments
Closed

Issues with inventory after refactoring #358

Predelnik opened this issue Mar 11, 2018 · 6 comments

Comments

@Predelnik
Copy link
Collaborator

Predelnik commented Mar 11, 2018

  1. Removing hotspot change was in my opinion wrong decision. Technically as I mentioned in comment this behavior is not the same as in game. But emulating it is pretty hard (and requires forced cursor movement which may not be a good thing). Current problems due to this:
    If top-left point is outside of inventory or slot item will never be placed which is not true in original game and is done if center is inside inventory or slot:
    image
    Huge unintuitive movement of cursor when taking item especially clicking on bottom-right corner of the item:
    image
    Clicking leads to:
    image

This behavior is far from unnoticeable in my opinion.

  1. Now items could not be placed in the belt at all if taken from it.

  2. The same problem with placing buckler as before:
    image

  3. Warrior starts with shield in inventory and not in hand.

@wheybags
Copy link
Owner

wheybags commented Mar 11, 2018

  1. Agreed, but my plan was to hilight the squares under the item which imo will make it much more intuitive. I was goign to do this in the same pr but I decided to leave it as it was getting quite huge already.
  2. hmm, not sure what happened there
  3. ah yes, I forgot to fix that, should be a one line change

EDIT: wtf, that 3. above should be a 4, but markdown is messing it up somehow

@Predelnik
Copy link
Collaborator Author

  1. I don't get how squares would help with issues I mentioned if item as cursor is tied to top-left corner - if you click above inventory it will still not work and without changing cursor position forcefully while clicking on bottom-right corner of the item, item cursor will still visually move huge distance if clicked.

@wheybags
Copy link
Owner

Sure, it wont work but you won't even try as it it'll be obvious that it won't work. As for the item jumping when you click it, it's always going to happen to some degree unless we do super fancy adjustments for where you click it, which personally I don't think is worth it.

@wheybags
Copy link
Owner

Anyway, I'm not saying it will work for sure, but I'd like to try it, as it keeps the code simpler. If it doesn't play well then we can do some fancy click position adjustment.
Mainly, I'm trying to get the inventory code/gui ready for the new multiplayer implementation (and I'd like to finally make a release after that, this time one that's almost playable in multiplayer, which would be a big milestone).
Either way I think hilighting the squares underneath would be a good addition.

@wheybags wheybags mentioned this issue Mar 11, 2018
@Predelnik
Copy link
Collaborator Author

Well, I don't agree. This incorrect cursor handling in inventory was the first thing I noticed when launching Freeablo with librocket back then or DGEngine (maybe the author fixed it there since then but I don't know) and that's why I tried to make it work more or less as in original game. If it's not the priority then fine.

@wheybags
Copy link
Owner

Ok, I split the remaining issues here into two new ones, #360 and #361, so I'll close this one.

ghost pushed a commit to dgcor/DGEngine that referenced this issue Jan 20, 2019
- eval formulas in game.getProperty
- refactor GameUtils::get*Property
- update gamefiles (rework inventory stash item pick wheybags/freeablo#353 wheybags/freeablo#358)
dgcor added a commit to dgcor/DGEngine that referenced this issue May 15, 2021
- eval formulas in game.getProperty
- refactor GameUtils::get*Property
- update gamefiles (rework inventory stash item pick wheybags/freeablo#353 wheybags/freeablo#358)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants