-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Option to change/remove the background hud color as well #6
Comments
I should have read the entire reply series to SteveSpuller's request #3 (comment) has my answer. Sorry for the bother; closing. |
I apologize, Peppie84. I thought the above would do the trick or set me on the path but unfortunately I can't puzzle out how to do to GameInfoDisplay what you gave Flitsche for VehicleSchemaDisplay. I had a good rummage through the dataS scripts and the data table but clearly I'm missing something or staring at it without realizing it. Would you be so kind as to show me how to set the background color/alpha for the GameInfoDisplay please? |
@whitecanealpha unfortunately i can't find a color variable to change the background of the GameInfoDisplay, sry. |
I tried going through the overlay construction in the .lua for InfoDisplay and GameInfoDisplay to do a :setColor() to but I must be looking at something wrong or looking for it in the wrong place. |
if you look into: |
I looked at that but the overlay:setColor() is not active (:setColor() and :setUVs() are remarked) so that would be being set elsewhere. |
Override the method and enable both methods and change the color for the |
Yep. I was just hoping to avoid using the bash-head-into-code approach :D |
No joy. Overriding the GameInfoDisplay.createBackground() function with :setUVs() and :setColor() set has no effect; it's getting (re)set somewhere else as I suspected. |
@whitecanealpha what do you think? |
What do I think? I'm drooling and doing a happydance. I knew about HudElement by tracing back the class inheritance (HUDDisplayElement -> HUDElement) since overlay passed back in each .new() call, and found the HUDElement:setColor() function. However, when I tried to use it, I get "Error: dataS/scripts/gui/hud/HUDElement.lua(268) : attempt to index field 'overlay' (a nil value)" What code are you issuing? I've got to be overlooking something obvious. |
Thanks. I hooked differently but it should have executed the same...well, anyway, that's a mystery for another day when I have the time and stubbornness. Thank you very, very much, Peppie84. You saved me some headache in the code and a ton of headaches in gameplay with the background and color-change: I smile every time I look at the UI and can actually easily read it. |
I love the idea behind HudColor. Two things came to mind: one was the background and SteveSpuller already asked about the other.
Could an option be added to change the color and alpha of the background, i.e., alter both the color and transparency?
The text was updated successfully, but these errors were encountered: