Leridon / rs3scantrainer

Other
11 stars 2 forks source link

Highlight emote to click during emote clues #7

Open spencerbyw opened 3 weeks ago

spencerbyw commented 3 weeks ago

For people solving clues without the globe trotter shorts, it's mildly inconvenient trying to find which emote to click in emote tab. Would it be possible to highlight which emote to click when an emote clue is detected?

Leridon commented 3 weeks ago

This would definitely be a useful feature. Implementation-wise it's a considerable amount of effort because the emote window needs to be detected and read properly, both in text and icon mode. There's a considerable backlog of stuff that I consider higher priority, so I can't commit to implement this myself anytime soon.

Detecting the emote window is probably easiest by looking for the icon-mode toggle on the bottom left of the window.

grafik

spencerbyw commented 3 weeks ago

Thanks for the reply! Totally understand the priority level. I might consider contributing, is there any part of the code that is somewhat similar to help get me started so I have an example to work off of?

Leridon commented 2 weeks ago

Whenever an emote clue is loaded you'd need to search the screen for the emote interface. Ideally you'd do this repeatedly so the overlay updates live. The code that controls what happens while solving is located in the NeoSolvingBehaviour class, with the controlling code for some step types (scans, compasses, puzzles) having a specialized class extending NeoSolvingSubBehaviour. Looking at these is probably a good starting point. The ClueReader class (and everything that's used there) is a good starting point to see how screen capturing and clue detection can be done.

For the emote highlighting you'd want to create a EmoteClueSubBehaviour that continuously checks for the emote panel and displays the desired overlay. You should be able to toggle it off in the settings, but I'd do that last after everything else works.

I've done some work to refactor some of the screen reading stuff in the chatreader branch, so I'd suggest branching off that one instead of main.