Project-Diablo-2 / BH

A modified version of slashdiablo's BH for Project Diablo 2
GNU Affero General Public License v3.0
24 stars 25 forks source link

Added hotkey to cycle through filter levels #27

Closed xkanzeon closed 1 year ago

xkanzeon commented 1 year ago

Should be a pretty self-explanatory change.

More than happy to adjust for style preferences. For example, I was on the fence about leaving the number in with the text message. Eventually figured it would help prevent ambiguity with level names though.

Defaulting to Numpad + to be out of the way, but easily accessed with with the mouse hand.

filter-cycle-test

Also considered/ing separate increment/decrement bindings. At the time of writing, it felt like that would be too many little things from a usage standpoint. Would love either a correction or confirmation on that.

fergushev commented 1 year ago

Yeah I'm kinda thinking that having both increment and decrement would be nice. Especially for filters that use all of the filter levels. Then you wouldn't have to loop through the entire list to go back one level.

I'm also wondering if we even need a default hotkey for this. Seems like more of an advanced feature and I can see someone accidentally changing their level.


As far as the code, you should use TextColor instead of ITEM_QUALITY_NONE. Also could be cool to use multiple colors to break up the text a little bit. Something like this:

PrintText(TextColor::Gold, "Filter level: ÿc00 - Show All Items");

would look like: image

Maybe have level 0 be a different color from the rest too? So you can easily tell you're at the "start"

xkanzeon commented 1 year ago

Edit2: Reworded the settings from "Strictness" to just "Level" to be more suitable for general use. Also added a note for the Numpad use to the Interaction tab. Lots of free space there, and it's at least sort of relevant.

fergushev commented 1 year ago

Couple of things: