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 378
added param to bind a key for "clear_screen" #878
Open
jobithu
wants to merge
1
commit into
aeon0:master
Choose a base branch
from
jobithu:clear_screen
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
aliig
suggested changes
Jun 17, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nevermind
roozhou
reviewed
Jun 17, 2022
@@ -61,7 +61,8 @@ def close(img: np.ndarray = None) -> np.ndarray | None: | |||
img = grab() if img is None else img | |||
if inventory_is_open(img): | |||
# close open inventory | |||
keyboard.send("esc") | |||
if Config().char["clear_screen"]: | |||
keyboard.send(Config().char["clear_screen"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add else: keyboard.send("esc")
roozhou
reviewed
Jun 17, 2022
@@ -211,6 +211,8 @@ def load_data(self): | |||
"sell_junk": bool(int(self._select_val("char", "sell_junk"))), | |||
"enable_no_pickup": bool(int(self._select_val("char", "enable_no_pickup"))), | |||
"safer_routines": bool(int(self._select_val("char", "safer_routines"))), | |||
"clear_screen": self._select_val("char", "clear_screen"), | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove empty line
Selfishly, I don't think this is necessary with the PR to auto-detect hotkeys. PR-905 loads the key file which has an OpenMenu keybind which the PR already leverages in a few places. I can work to ensure that all explicit send calls for "esc" or "space" are updated within the PR. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
so people can still avoid to use ESC to close inventories, whilst using SPACE for something else. yaaay!