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

Variable inventory size #194

Open
JordanL2 opened this issue Jan 6, 2022 · 1 comment
Open

Variable inventory size #194

JordanL2 opened this issue Jan 6, 2022 · 1 comment

Comments

@JordanL2
Copy link

JordanL2 commented Jan 6, 2022

I'm looking into a way for the player to be able to customise the size of their hotbar and inventory. I can change the size of the hotbar / inventory itself, but UI would need patches to work with it.

I see two possible approaches:

  1. I make a mod with settings that configure the inventory size, and UI uses it as an optional dependency, and uses the settings from it if found
  2. The hotbar / inventory settings are part of UI itself rather than a separate mod, defaults to the current 8x4

Would either of these approaches be acceptable? If so, which would be preferable?

@SmallJoker
Copy link
Member

I suppose the simplest implementation would be done using a 3rd party mod which overwrites ui.style_full.standard_inv and ui.style_lite.standard_inv.
https://github.com/minetest-mods/unified_inventory/blob/master/init.lua#L149-L150

Alternatively, it would be necessary to expose and document an API function to specify the list size. That one could basically change the same variable to center the list.

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