Skip to content

Fix UI/popups background color to use the one set in settings.ini#2726

Closed
themrleon wants to merge 1 commit intoInterkarma:masterfrom
themrleon:fix_hud_dim
Closed

Fix UI/popups background color to use the one set in settings.ini#2726
themrleon wants to merge 1 commit intoInterkarma:masterfrom
themrleon:fix_hud_dim

Conversation

@themrleon
Copy link
Copy Markdown

@themrleon themrleon commented Feb 18, 2025

Fix most of the UI/popups backdrop/dim that was supposed to be based on the DimAlphaStrength property from the settings.ini file, also fix the inconsistency with the "Rest" screen that has black background. Here some examples of before and after based on the default 50% dim:

image1912

This PR would also allow mods to expose this setting so players can choose between 0% and 100% dim via mod settings.

This is specially useful when there are lots of text and buttons on UI stacked at same time like in the map travel scenario (2nd example).

@KABoissonneault
Copy link
Copy Markdown
Collaborator

Context

I'm trying to piece the history of this feature.

The setting was added in here: 2d57b9f#diff-8f948b53959f0fb4d0b4b9db7dac6e54689d035b1134df89cddeb4e9dc86d9adR95
This was intended as the screen dim alpha for DaggerfallPopupWindow.

After, some changelist changed it so it's only the default value, allowing derived classes to not depend on the setting at all: 3a2f6ff

This was finally fully removed in this changelist by Interkarma: 15eddf3

The justification in the commit is: "Using a RenderTexture with GUI.DrawTexture() means that for now any alpha blends are not additive."

Not saying anything as to whether this feature should be restored, I'm just trying to get the context.

We're still relying on GUI.DrawTexture, so the issue might still apply, even though I'm not certain what the concern even is. Maybe @Interkarma remembers any of this.

My analysis

  1. I generally appreciate the dim on popups, and historically DFU has not implemented all of the ones the original game had (the spellmaker was missing it until this PR Dim backgound for DaggerfallEffectSettingsEditorWindow #2532 )
  2. I don't think the Rest screen should use the same value as the rest of the popups. The base DF expectation is that the Rest screen is fully opaque while the others mostly transparent.
  3. In part because of the above issue, I'm not sure having this feature as a single global INI config value. I feel like this is the responsibility of a UI mod to add general "polish"

I'd be more satisfied with a solution that:

  1. does not touch the Rest window (let a mod choose whether this should allow transparency at all)
  2. uses a solution that applies universally for all existing dims (ex: DaggerfallEffectSettingsEditorWindow)

@Interkarma
Copy link
Copy Markdown
Owner

This was finally fully removed in this changelist by Interkarma: 15eddf3

Key Kab! For some context around this change at the time in 2018, I was supporting InconsolableCellist working on a VR mod for DFU (start here in forum topic).

In VR mode, the UI needs to be projected into the game world, e.g. onto a quad rect in front of player's face, for the user to point at with motion tracking controllers. The UI required a little refactoring to make this possible, as at the time it simply drew the UI directly on top game viewport after everything else. Search other changes made around May-Jul 2018 for more.

I can't recall the exact problem, but it reads like a compatibility problem after changing from straight GUI.DrawTexture to DrawTexture wrappers in DaggerfallUI that can change UI rendering pathway based on internal requirements. From memory, I also had to create a pathway due to differences in Mac UI rendering output - so be careful tinkering in there and make sure it's tested on all platforms.

Not sure why I didn't remove ScreenDimColor entirely, and I agree it's best to let the individual UI window or mod decide on this rather than a global setting. I likely meant to loop back to it later and forgot.

@themrleon
Copy link
Copy Markdown
Author

Thanks for the context @KABoissonneault and @Interkarma, reason I tried a PR instead of a mod is because I am not sure this can be achieved with a mod. But guess I will only stick with mods for now.

@themrleon themrleon closed this Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants