Author Topic: Sort store items alphabetically  (Read 4276 times)

0 Members and 1 Guest are viewing this topic.

Offline sgb

  • Sr. Member
  • ****
  • Posts: 380
Sort store items alphabetically
« on: November 12, 2009, 11:17:26 PM »
Not much to add to the subject line.  It would make life a LOT easier to find what you're looking for quickly instead of the jumbled mess it is currently.

Offline zodiac44

  • Hero Member
  • *****
  • Posts: 560
  • Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn
Re: Sort store items alphabetically
« Reply #1 on: November 12, 2009, 11:34:03 PM »
Load them alphabetically, and stack like items.  Something like:

cheap chocolates (infinite)
flowers (4)
Good cream of healing (1)
Superior cream of healing (2)

I noticed it stacks them in the player's/girls' inventories when you buy multiples of infinite-stock items (I haven't tested it with non-infinite stock items), but the store itself doesn't stack items.
Capitalization is the difference between "I had to help my uncle Jack off a horse" and "I had to help my uncle jack off a horse."

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Sort store items alphabetically
« Reply #2 on: November 12, 2009, 11:36:10 PM »
Yeah, It should not be too hard, thank god I kept my data structures book, so I have some methods of sorting it with the way it is currently structured.

Offline necno

  • Core Developer
  • ******
  • Posts: 385
Re: Sort store items alphabetically
« Reply #3 on: November 13, 2009, 08:30:42 PM »
Very easy to add sorting algorithms. In fact I've already done so for 1.30
Click here to donate
After you do so please pm me the email address you used so I can add you to the donation forum.

Working on:
Whoremaster II (Official)
Birthright (Now a commercial rougelike)

Offline delta224

  • Dev Team
  • *****
  • Posts: 577
Re: Sort store items alphabetically
« Reply #4 on: November 13, 2009, 08:34:39 PM »
 :D , I've done the same as well. 

Offline necno

  • Core Developer
  • ******
  • Posts: 385
Re: Sort store items alphabetically
« Reply #5 on: November 13, 2009, 08:56:24 PM »
lol, i love coding sorting functions. Cause whenever you have finished and they work it really feels like you have accomplished something.
Click here to donate
After you do so please pm me the email address you used so I can add you to the donation forum.

Working on:
Whoremaster II (Official)
Birthright (Now a commercial rougelike)

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Sort store items alphabetically
« Reply #6 on: November 15, 2009, 12:42:25 AM »
I'm glad I didn't get around to it, then :)

I take it no one has done constant width columns and column headers yet?

Offline letmein

  • Sr. Member
  • ****
  • Posts: 383
Re: Sort store items alphabetically
« Reply #7 on: November 15, 2009, 01:12:01 AM »
Speaking of column width, items with long names don't fit properly on standard resolution.  Shouldn't they wraparound, or something?  Could you at least make the bar on the right side transparent so you can see the name behind it?
Still lurking.

Offline DocClox

  • Dev Team
  • *****
  • Posts: 1867
  • Messing Around With Python
Re: Sort store items alphabetically
« Reply #8 on: November 15, 2009, 05:37:01 AM »
I'll have to think about that one. The transparency option isn't as straight forward as it might sound. I think I'd prefer an info box somewhere that gave the full description for whatever icon was under the cursor.

We'd need to add the concept of one of the tables having the focus, but I'd like to see that, too, since that would allow keyboard navigation on the items screen.