This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 381
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enhancement: Replace pather.adjust_abs_range_to_screen() with ui_mana…
…ger.get_closest_non_hud_pixel() (#908)
- Loading branch information
Showing
12 changed files
with
105 additions
and
94 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pytest | ||
import screen | ||
from ui_manager import get_closest_non_hud_pixel | ||
|
||
|
||
@pytest.mark.parametrize("pos, pos_type, should_adapt", [ | ||
((40, 40), "screen", True), # over merc portrait | ||
((1241, 19), "screen", True), # over clock | ||
((291, 663), "screen", True), # over health globe | ||
((650, 300), "screen", False), # mid screen | ||
((783, 618), "screen", True), # over active skill bar | ||
((1062, 594), "screen", True), # over gargoyle | ||
((0, 0), "abs", False), # mid screen | ||
((221, 327), "abs", True), # near right skill | ||
]) | ||
def test_get_closest_non_hud_pixel(pos, pos_type, should_adapt): | ||
screen.set_window_position(0, 0) | ||
new_pos = get_closest_non_hud_pixel(pos, pos_type) | ||
is_adapted = not (pos == new_pos) | ||
assert(is_adapted == should_adapt) |
This file was deleted.
Oops, something went wrong.