Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

added param to bind a key for "clear_screen" #878

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jobithu
Copy link
Contributor

@jobithu jobithu commented Jun 16, 2022

so people can still avoid to use ESC to close inventories, whilst using SPACE for something else. yaaay!

Copy link
Collaborator

@aliig aliig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind

@@ -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"])
Copy link
Contributor

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")

@@ -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"),

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty line

@Ezro
Copy link
Collaborator

Ezro commented Jun 18, 2022

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.

@D2RLegit D2RLegit added the stale for prs that dont seem to get any more updates label Jun 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale for prs that dont seem to get any more updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants