eoakley / artifacthelper

Helps you pick cards in draft mode on Valve's Artifact game. Made with Python.
GNU General Public License v3.0
39 stars 9 forks source link

Allow user to specify bounding box for cards #10

Closed BudgieInWA closed 5 years ago

BudgieInWA commented 5 years ago

The new dragging feature could be improved to provide a fully user-configurable way of working. Instead of having a drag handle that is always visible, have a "configure" button that switches to "configure mode". While in configure mode, draw a box around the border of the windows and provide handles in the corners. Ask the user to position the box so that all of the cards are inside the box and the banner is above them. Then the detection algorithm can find the exact edges.

The top left handle could act like the drag currently does, and the bottom right handle could scale the rectangle, maintaining the aspect ratio. image

This method should work for any configuration that cannot be predicted (like running in a small window) so it might be useful to have, even if all of the common configurations work out of the box.

BudgieInWA commented 5 years ago

In fact, I'm basically thinking of Snipping Tool.

When the overlay opens it guesses where the cards are (assuming fullscreen borderless and whatever dimensions the game is known to use). By clicking a "locate" button or any time a scan is done and no cards are found, it could immediately switch to "rectangular snip" mode with instructions "Select the Cards" and a cancel button. The dimensions of the rectangle can be used to check for cards in the screenshot and to decide where to put the banner.

If the user failed to draw around the cards properly they could see a gif of someone doing it correctly.

eoakley commented 5 years ago

Nice suggestion. Implementing it soon.

eoakley commented 5 years ago

Made the border detection algorithm more robust. Should not need to implement custom bounding boxes yet.

eoakley commented 5 years ago

Just fixed this in the latest release.

Try the new function "Customize Grid".

If you still have problems, open a new issue with the following:

Thanks for the help!