Inventory Profiles Next

Inventory Profiles Next

24M Downloads

Fix GUI offset setup

SpokenWig620933 opened this issue ยท 14 comments

commented

Currently the buttons are defaulted to top left and based of corner origin on the screen.

This clashes with JEI and hides behind ftb buttons and bookmarks.

The buttons should be based on the center of screen and then offset to top left of the current gui or by default only on the main player inventory as so the offset can be directly coppied to several clients as well instead of having each client redo the offset for each menu...

commented

Like all the other settings of the mod you can copy the moved buttons.
All of the mod settings can be found in config/inventoryprofilesnext folder. if you need help with that join our discord I'll be happy to be of assistance.

As for the default position it's impossible to account for every other mod gui. At least my mod allows you to move them which can't be said for most other mods.

commented

Simply unhiding the config options "GuiSettings.settings_top", "GuiSettings.settings_left", "GuiSettings.editor_top", and "GuiSettings.editor_left" would provide a universal fix for this kind of issue, it's already more or less fixed with the only real issue being discoverability of the relevant configs

commented

in general the offset values should be changed from absolute int to percent and the real position should be calculated taking into account the virtual gui resolution

commented

Not if they don't exist anywhere in the documentation? I had to hunt through your code and follow a decently long reference chain to figure out what I needed to do, and if modpack authors don't know about a setting they won't typically put in that kind of work to find a setting they have no way of knowing exists. Also.... the current implementation, where the settings are hidden, is far less scale level aware then "let people change the numbers, and keep the same placement logic that provides what scale level awareness there is"

This along with the fact we're talking about the two buttons that warrant (and display) the least level of scale level awareness out of any of the buttons you have

commented

I have already had people complaining that when they change the scaling the buttons move.

So as I've already said I'll make these options public when I make them work properly with the scaling levels. If you want it to happen faster I will be really happy to accept your pull request about it.

commented

I really don't know what "working properly with the scaling levels" means in this context. Imo they already do

commented

set scaling to 1 and move them to the centre of the screen then change it to 3 or 4 for greater impact

commented

well it won't or at least won't for all GUI scale levels.
This is the main reason they are hidden.

Also why no one complains to the other mods to make their buttons movable.

commented

Sorry for the wall, tl;dr below

I mean it's user configurability, and most people don't constantly switch up their GUI scale. It's a setting you've already implemented, and it works great! As to why "no one complains to the other mods to make their buttons moveable"... well for the record I wasn't "complaining", I was trying to provide help. Not only for you, but for OP and any else who might stumble upon this.

I use REI, so not sure if this holds for JEI but you can alter the size of the favorites panel (which is what actually handles those buttons). Most mods provide exclusion zones for JEI but it might be hard to do in your case due to the highly dynamic nature of your UI elements. But I don't see how making the default location for two of the bigger problem elements configurable would hurt compatibility

tl;dr is that more configurability is broadly considered a good thing, especially for compatibility, and there's really nothing wrong with the current (hidden) config options that warrants such obscurity

commented

is that more configurability is broadly considered a good thing, and there's really nothing wrong with the current (hidden) config options that warrants such obscurity

mod packs will start changing them.

Anyway these will stay hidden until I make them scale level aware.

commented

I see. Though such an implementation would almost require use of a gui, as precision is much more difficult to achieve with fractions of a percent than with pixel count. Also, I still think a warning is better than a hiding. "/!\ WIP: Buttons will shift with GUI scale /!\"

commented

Another way mods often mitigate that sort of issue is by offering a selection of anchor points, typically the corners, middle of the edges, and sometimes the center of the screen

commented

I've been doing this for few years now.
Believe me people will accept "It's not possible to move them for all GUIs" much easier then "You have to move them when you change the scaling".

And I prefer to have the current discussion once every 2 years then then the potential for the other one every few weeks.

commented

I mean with the default configs you don't have to, and as stated hiding it behind advanced options or discoverable in the text config would be better imo than hidden entirely. Though I admit, a lot of people straight up ignore the caveat emptor and complain about features explicitly marked as unfinished