Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature request] Highlight slots on hover #249

Open
JanezCZ opened this issue Jul 19, 2024 · 2 comments
Open

[Feature request] Highlight slots on hover #249

JanezCZ opened this issue Jul 19, 2024 · 2 comments

Comments

@JanezCZ
Copy link

JanezCZ commented Jul 19, 2024

I would like to have visual feedback in inventory on what slot I am currently pointing at.

Similar behaviour can be seen in default GUI inventory - when cursor points to a slot, the slot is highlighted. This would result in higher precision when picking correct inventory slot.

Highlighting is enabled on all buttons but not on slots themselves, so this change would unify whole experience within GUI.

@SmallJoker
Copy link
Member

There is currently only one way to implement the "hover" effect for inventory slots: listcolors[...]. This formspec element changes the border and background colors based on the hover state.

However, Minetest does not provide a functionality to use custom textures for slot rendering. unified_inventory thus sets the default colors to transparent and uses background9[...] to draw the slots manually. Hence there is no callback or styling option that would allow the highlight effect.

Cannot implement. Please open an issue in minetest/minetest to stylize inventory slot backgrounds using style[...].

@JanezCZ
Copy link
Author

JanezCZ commented Jul 22, 2024

I was trying few stuff in between. It seems like Everness mod came with ability to tweak look of inventory slots within its chests but kept highlight on hover.
I honestly don't know if it can be relevant or not to whole inventory highlighting as I don't know much about code. Also in Minetest issue i3 was mentioned but I suppose i3 either uses default slots or sets only slot color and depends more on game doing it's job with the rest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants