naari3 / offers-hud

OffersHUD is a client-side mod which display a list of villager's trading offers as a HUD, without a right-click.
https://www.curseforge.com/minecraft/mc-mods/offershud
MIT License
9 stars 1 forks source link

Variable Positioning #26

Closed obp3ter closed 2 years ago

obp3ter commented 2 years ago

I would love it if I could move it a bit down (/right) so that it's not below a more important overlay. I was thinking of something like how other mods do it, with corner presets and x&y offsets after that.

ghost commented 2 years ago

Hello, I really love that idea. And I would even add scaling 🥰 Greetings.

naari3 commented 2 years ago

I have tried a small implementation for config. This requires you have modmenu, but you can set the X,Y offset of the HUD in config.

but, I haven't been able to test it yet because I can't run Minecraft due to personal GPU issues.

obp3ter commented 2 years ago

Later today I'll download it or pull the branch and build it and try it out, I'll tell you how it goes.

naari3 commented 2 years ago

This time I just simply made it so I can put x,y values in the config, so if you know of a better way or an implementation of that, please let me know :pray:

or is this enough?

naari3 commented 2 years ago

Here is artifacts of latest commit. Compiled artifacts for b52b5ba6609914fa1ceaf037866937d43ec6740b.zip

obp3ter commented 2 years ago

So I checked it out, and it is enough for what I really needed, but I noticed a problem. When I try to edit the x value, it Alt+Tabs out of the game.

naari3 commented 2 years ago

@obp3ter hmm, I could not reproduce the bug. When do you press Alt+Tabs? Is it exactly in the settings screen? Or during the game after setting?

obp3ter commented 2 years ago

It swiyches out of the game when I click on th input field in the modmenu settings. But only for the x value not for the other one.

naari3 commented 2 years ago

@obp3ter Just to be sure, could you tell me what version of modmenu you have?

and, I did not make it clear due to my mistake, but perhaps the Cloth Config API also needed to be installed. Please let me know the version of this as well.

obp3ter commented 2 years ago

Cloth Config API 7.0.72 & Mod Menu 4.0.0

naari3 commented 2 years ago

@obp3ter hmm, I still couldn't reproduce it. It may be a bug in Cloth Conifg or something?

I think it is unlikely that this is a bug in OffersHUD unless it is fundamentally wrong, since OffersHUD only uses a simple usage.

https://github.com/naari3/offers-hud/blob/main/src/main/java/net/naari3/offershud/config/ModConfig.java https://github.com/naari3/offers-hud/blob/main/src/main/java/net/naari3/offershud/config/ModMenuIntegration.java

I will try to reproduce tomorrow on another environment(macOS).

naari3 commented 2 years ago

I still have my doubts, but I will merge the PRs for now. https://github.com/naari3/offers-hud/pull/27

obp3ter commented 2 years ago

Well, I'm using Windows so I don't think the mac testing is relevant for this, I'll reinstall everything, maybe something helps.

naari3 commented 2 years ago

@mrniddala I also implemented scaling features at #28

obp3ter commented 2 years ago

With this version, I don't have the problem anymore, and I don't see why it changed.

ghost commented 2 years ago

Thank you so much @naari3 💖

naari3 commented 2 years ago

Released on CurseForge, modrinth and GitHub Releases. thanks! @obp3ter @mrniddala

https://www.curseforge.com/minecraft/mc-mods/offershud/files/3841741 https://modrinth.com/mod/offershud/version/v1.1.0 https://github.com/naari3/offers-hud/releases/tag/v1.1.0