From ee7233d0ebab706a5aea2384df5d5dc76302fbf4 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Sat, 16 Mar 2024 18:35:53 -0700 Subject: [PATCH] Fix corpse & chest cursor when quick pickup enabled Closes: https://github.com/arianne/stendhal/issues/601 --- srcjs/stendhal/ui/component/ItemContainerImplementation.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srcjs/stendhal/ui/component/ItemContainerImplementation.ts b/srcjs/stendhal/ui/component/ItemContainerImplementation.ts index dc8422dd25..77f3f37314 100644 --- a/srcjs/stendhal/ui/component/ItemContainerImplementation.ts +++ b/srcjs/stendhal/ui/component/ItemContainerImplementation.ts @@ -433,6 +433,11 @@ export class ItemContainerImplementation { */ private updateCursor(target: HTMLElement, item?: Item) { if (item) { + if (this.slot === "content" && stendhal.config.getBoolean("inventory.quick-pickup")) { + target.style.cursor = "url(" + stendhal.paths.sprites + + "/cursor/itempickupfromslot.png) 1 3, auto"; + return; + } target.style.cursor = item.getCursor(0, 0); return; }