benstepp / d3sim

Simulate Diablo III Item Creation and Kadala Gambling
MIT License
25 stars 5 forks source link

left to right items #11

Open crypticsage opened 9 years ago

crypticsage commented 9 years ago

1st, i love what you've done here, helps feed my gambling addiction at work.

as a graphic designer and guy w/ ADHD how come you load items from top to bottom vs left to right? only belts, rings and amulets go into inventory top to bottom, all other items enter left to right. i looked and you seem to have various divs and aren't using floats, but data attributes so should be pretty easy

benstepp commented 9 years ago

I guess I haven't really payed close enough attention to it. I will fix this when I get the crafting panel up to make hellfire amulets too. Should just be a simple size check on the item.

benstepp commented 9 years ago

well I tried about 3 different fixes for this. Although they worked (items appear correctly in inventory) i noticed some very bad interface lag when holding the enter key (the way most people seem to like to play).

I have a couple more ideas I would like to test out in the coming week:

I'll let you know when I get it fixed and I can still hold down enter without my screen locking up for a half second.

crypticsage commented 9 years ago

Not at a computer to view the source but you can probably do away with the blank inventory space all together and use a repeating background image in that larger "backpack" element, then you can just add the gambles as new Dom elements vs removing and replacing ones that just created the empty background.

I do more html and css than code like you so I always look for solutions with that lol, sorry

@crypticsage via my iPhone6+

On May 8, 2015, at 10:50 PM, Benjamin Stepp notifications@github.com wrote:

well I tried about 3 different fixes for this. Although they worked (items appear correctly in inventory) i noticed some very bad interface lag when holding the enter key (the way most people seem to like to play).

I have a couple more ideas I would like to test out in the coming week:

have the blank inventory slots absolutely positioned behind the actual inventory rather than as a part of the inventory. this way the dom reflows are minimized from when we rip out 2 placeholder slots and shove a large item in creating more than one event to listen and register in on the stores. so that the entire application isnt listening for inventory changes (what occurs most when gambling with the enter key). currently the appstore emits a change to hide the menus for mobile when an item is bought, but I think I can find away around this. I'll let you know when I get it fixed and I can still hold down enter without my screen locking up for a half second.

— Reply to this email directly or view it on GitHub.