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

Vivecraft overrides GUI scale set by other mods #267

Open
caoimhebyrne opened this issue Apr 3, 2024 · 13 comments · May be fixed by #284
Open

Vivecraft overrides GUI scale set by other mods #267

caoimhebyrne opened this issue Apr 3, 2024 · 13 comments · May be fixed by #284

Comments

@caoimhebyrne
Copy link

At the moment, Vivecraft overrides the vanilla GUI scale of the Window. This causes incompatibilities with mods like ours, Essential, which would like to chose a GUI scale that fits the content best at the current resolution.

The user can change the Settings > VR Settings > HUD and GUI Settings > VR GUI Scale setting to anything other than Auto or 3 to fix this issue, but I think it would be better to stop overriding the GUI scale, so our changes (and probably other mods too) to the vanilla GUI scale can take effect.

This is what Vivecraft and Essential looks like at the moment:

2024-04-03_12 37 37 2024-04-03_12 37 53

And here is what the Wardrobe is supposed to look like, as you can see, the entire right side of it is missing with Vivecraft (the second image in the table above is the Wardrobe with Vivecraft):

image

@fayer3
Copy link
Member

fayer3 commented Apr 3, 2024

eh, we override the gui scale, to make guis easier to use in vr, since pointing at small buttons is a pain. If mods don't work at default mincraft scale that is on them imo, but we do have the setting to change it, uf the user wants to.

@fayer3
Copy link
Member

fayer3 commented Apr 3, 2024

if that is something that should work, with the vanilla guiscale set to auto, I can look into it

@caoimhebyrne
Copy link
Author

caoimhebyrne commented Apr 3, 2024

eh, we override the gui scale, to make guis easier to use in vr

I'm aware of that, but you do it in a way that breaks compatibility with other mods. We reset the scaleFactor to the amount that it was at before we opened our GUI when closing it to be as compatible as possible (mostly intended for user-settings, but in this case will reflect other mods changes if they do it correctly).

Couldn't you just call setScaleFactor when entering VR mode to make GUIs that don't set the scale factor render at your increased size, and then set it back to the default value when exiting VR mode? (or something along those lines)

@fayer3
Copy link
Member

fayer3 commented Apr 3, 2024

hm, I can look into that

@caoimhebyrne
Copy link
Author

Thanks!

@Techjar
Copy link
Collaborator

Techjar commented Apr 3, 2024

That won't work because it will get saved like that if you don't exit VR before closing the game.

@caoimhebyrne
Copy link
Author

Hey @Techjar @fayer3, any updates on this?

@fayer3
Copy link
Member

fayer3 commented May 30, 2024

haven't looked into it yet

@fayer3 fayer3 added the gui label Jun 20, 2024
@fayer3
Copy link
Member

fayer3 commented Aug 15, 2024

so I looked into this, and I don't really see a way to fix this.
I thought about checking what gui scale is active, and what is set in the options, but you are changing the option one, so that doesn't work.

and calling setScaleFactor will not work, that will still break when toggling VR on one of your screens

@fayer3
Copy link
Member

fayer3 commented Aug 15, 2024

I could store the gui scale that gets saved to file, but that breaks with sodium, because that updates gui scale first, and then saves the settings. so couldn't detect if it's a mod changing stuff, or just the user setting the sodium setting

@fayer3
Copy link
Member

fayer3 commented Aug 15, 2024

I could maybe check the the gui scale before and after a screen got set

@fayer3
Copy link
Member

fayer3 commented Aug 16, 2024

@caoimhebyrne here that should fix it I think, if you could confirm it.
There are some edge cases, where the guiscale gets still set wrong, but when not toggling vr on those screen, it should be fine.

vivecraft-1.20.4-1.1.11-essentialguifix-fabric.jar.zip

@caoimhebyrne
Copy link
Author

Hey @fayer3, thanks for taking a look at this 🙂
I'll test that build soon and get back to you on whether it works as expected or not.

fayer3 added a commit to fayer3/VivecraftMod that referenced this issue Sep 7, 2024
@fayer3 fayer3 linked a pull request Oct 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants