SRP icon indicating copy to clipboard operation
SRP copied to clipboard

Radiation progress bar is misaligned with certain aspect ratios

Open Georgiy-Timoshin opened this issue 4 years ago • 14 comments

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)

Georgiy-Timoshin avatar Feb 12 '21 09:02 Georgiy-Timoshin

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 https://github.com/Decane/SRP/commit/7adee9b587d73e582a05ac89f01db223f166737a.

Decane avatar Feb 12 '21 18:02 Decane

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 avatar Feb 12 '21 19:02 Decane

@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 :heavy_check_mark: :x: :x: :heavy_check_mark:
Your fix :x: :heavy_check_mark: :heavy_check_mark: :x:

Decane avatar Feb 12 '21 19:02 Decane

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.

Georgiy-Timoshin avatar Feb 13 '21 01:02 Georgiy-Timoshin

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" - -

Decane avatar Feb 13 '21 11:02 Decane

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

Georgiy-Timoshin avatar Feb 13 '21 12:02 Georgiy-Timoshin

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

Decane avatar Nov 19 '23 22:11 Decane

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

изображение

Georgiy-Timoshin avatar Nov 22 '23 12:11 Georgiy-Timoshin

Radiation detector dial overlay fixed in https://github.com/Decane/SRP/commit/13e5122fe6b0abbd669a39dccf2e43fa863e8bd2.

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.

Decane avatar Dec 03 '23 13:12 Decane

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

Georgiy-Timoshin avatar Dec 04 '23 08:12 Georgiy-Timoshin

Thanks - included in https://github.com/Decane/SRP/commit/78d11f155c27d7e1e7203f8e7ae260a4b950ec08.

Decane avatar Dec 04 '23 21:12 Decane

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

vlad54rus avatar Dec 17 '23 07:12 vlad54rus

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

Decane avatar Dec 26 '23 14:12 Decane

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

SurDno avatar Dec 28 '23 13:12 SurDno