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

Radiation progress bar is misaligned with certain aspect ratios #125

Open
Georgiy-Timoshin opened this issue Feb 12, 2021 · 14 comments
Open
Assignees

Comments

@Georgiy-Timoshin
Copy link

Fixes for the radiation indicator in the hud and inventory
ss_admin_02-12-21_19-10-23_(escape)
ss_admin_02-12-21_19-10-29_(escape)
Not perfect better than it was. For 4x3 and 16x9.
gamedata.zip
P.S. Google Translate)

@Decane Decane self-assigned this Feb 12, 2021
@Decane Decane assigned Georgiy-Timoshin and unassigned Decane Feb 12, 2021
@Decane
Copy link
Owner

Decane commented Feb 12, 2021

The radiation progress indicator is only misaligned in 5:4 mode; with widescreen resolutions, it's already properly aligned.

Thanks for supplying the 5:4 fix.

Committed in 7adee9b.

@Decane Decane closed this as completed Feb 12, 2021
@Decane
Copy link
Owner

Decane commented Feb 12, 2021

I jumped the gun. The radiation progress indicator is misaligned for 16:9 resolutions, too, not just 5:4. I wrongly concluded that the indicator isn't misaligned with any widescreen resolution on the basis that it is properly aligned with 16:10.

@Decane Decane reopened this Feb 12, 2021
@Decane
Copy link
Owner

Decane commented Feb 12, 2021

@Georgiy-Timoshin Your fix for 16:9 breaks the alignment for 16:10. And your fix for 4:3 (e.g. 1024x768) actually breaks 4:3 but fixes 5:4 (e.g. 1280x1024). In summary:

16:10 16:9 5:4 4:3
SRP ✔️ ✔️
Your fix ✔️ ✔️

@Decane Decane changed the title Fix hud Radiation progress bar is misaligned with certain aspect ratios Feb 12, 2021
@Georgiy-Timoshin
Copy link
Author

Georgiy-Timoshin commented Feb 13, 2021

You didn't notice, but there's also a new texture for the inventory(ui_hud2_rad01_over_new) and a fixed one for the hud on top of the arrow.
I forgot about the problem of different aspect ratios on the same file. It's bad that can't make your own file for each aspect ratio.

@Decane
Copy link
Owner

Decane commented Feb 13, 2021

Here is a table with the required positions of HUD element ui_hud2_rad01_progress in order for it to appear properly aligned under each of the four aforementioned aspect ratios:

Required x, y for ui_hud2_rad01_progress 16:10 16:9 5:4 4:3
actor_menu.xml - - x="3" y="37" x="3" y="40" (default)
actor_menu_16.xml x="2" y="40" x="2" y="44" - -
maingame.xml - - x="166" y="52" x="166" y="55" (default)
maingame_16.xml x="138" y="55" (default) x="138" y="59" - -

@Georgiy-Timoshin
Copy link
Author

Yes, I've already figured that out.
The main fix is these textures:
1
2

@Decane
Copy link
Owner

Decane commented Nov 19, 2023

The texture that partially obscures the radiation detector's dial in the inventory screen does not blend properly when using the optional Transparent Inventory feature:

image

@Georgiy-Timoshin
Copy link
Author

Moved the texture covering the radiation detector from "ui_hud.dds" to "ui_ingame2_common.dds". This will allow you to use "transparent inventory" without problems. The texture that is replaced in the "transparent inventory" mod (ui_ingame2_common.dds) does not have this insert and therefore everything will look the same.
gamedata.zip

изображение

@Decane
Copy link
Owner

Decane commented Dec 3, 2023

Radiation detector dial overlay fixed in 13e5122.

I'm not sure how to fix the vertical misalignment of the red radiation progress bar across different aspect ratios, however. The game seems to have been made with 4:3 and 16:10 in mind and the progress bar doesn't scale correctly to 5:4 and 16:9. stretch="1" doesn't help. I don't really want to have aspect ratio -specific variants of actor_menu*.xml and maingame*.xml that the user must select between.

@Georgiy-Timoshin
Copy link
Author

textures overlapped:
ss_io_12-04-23_18-02-37_(marsh)
here's the fix: gamedata.zip

@Decane
Copy link
Owner

Decane commented Dec 4, 2023

Thanks - included in 78d11f1.

@vlad54rus
Copy link
Contributor

@Decane Speaking of widescreen - can you also include this fix for scope textures? They are slightly stretched on 16:9.
gamedata.zip

@Decane
Copy link
Owner

Decane commented Dec 26, 2023

Alex_Demolisher on ModDB sent me a nearly identical widescreen scopes fix in 2018 — the only difference being that his had width 129 instead of 128 for each wpn_crosshair_add_l. But I decided not to include it because it made scope textures vertically elliptical (stretched) on 16:10; it turned out that 16:9 needs the fix but 16:10 doesn't. And I didn't want to break 16:10 to fix 16:9.

@vlad54rus your fix has the same problem:

Screenshot2196

@SurDno
Copy link
Contributor

SurDno commented Dec 28, 2023

Why not make 5:4/16:10 support a separate install, similarly to how Widescreen Patch used to be?

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

4 participants