Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Finding Button

RedDeadDepresso edited this page Nov 9, 2023 · 1 revision

The source code to finding button can be found in here and is implemented using the method Utils.find_button.

Here is a brief explanation. With region I mean an instance of the class Region.

  1. Identify the text region of interest e.g the stage number.
  2. Create a region with the top-left coordinates same as with the text region's top-left coordinates. The bottom-right coordinates the same as the search region e.g the stage list.
  3. Resize the button's height based on step 2 region and find the closest button, this is done with Utils.find_closest.
  4. Check if the button's region and step 2 region intersect. If they do click on it, otherwise the stage was not unlocked.

This works to find the student's name in the cafe list and the stage in mission, commissions, event, bounty or scrimmage.

Clone this wiki locally