Transparency support for spell icons

Discuss coding questions, pull requests, and implementation details.
User avatar
JohnBeavers
Posts: 27
Joined: Sun Jul 21, 2019 5:20 pm

Transparency support for spell icons

Post by JohnBeavers »

Hello everyone,

Do you think it would be possible to enable transparency support for spell icons ?
If yes, we would be able to create much less invasive enchantement and spell icons for the hud.

I tried on the custom icon sheet provided with DFU and all it gives when I shrink an icon is black borders instead of transparency.

What do you think ?

(Thinking about it, it might also help with ghosts and such^^)
Here is my Youtube channel if you are ever interested (FR): https://www.youtube.com/user/JohnBeaversYT/

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparency support for spell icons

Post by pango »

It's just a matter of removing the black backdrop behind icons, the icon textures handle transparency already...

At first I was thinking about removing the backdrop for modded icons only, but classic icons are okay (at least, not worse ;) ) without backdrop too, maybe black backdrop could just be removed unconditionally?
Unless purist absolutely want black backdrop behind their icons, or they're cases where it's actually useful (say, a purely blue icon while you're swimming underwater...)
JohnBeavers wrote: Wed Oct 16, 2019 9:57 am (Thinking about it, it might also help with ghosts and such^^)
That's a different topic, and I think TheLacus has been working on that but the first version only worked in Unity Editor, I'm not sure if there's a fully working version now
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
JohnBeavers
Posts: 27
Joined: Sun Jul 21, 2019 5:20 pm

Re: Transparency support for spell icons

Post by JohnBeavers »

pango wrote: Wed Oct 16, 2019 10:26 am It's just a matter of removing the black backdrop behind icons, the icon textures handle transparency already...
Here is what I get on my side:




I use png format on paint.net, a software that can deal with transparency.
What do you think ?
Here is my Youtube channel if you are ever interested (FR): https://www.youtube.com/user/JohnBeaversYT/

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparency support for spell icons

Post by pango »

Sorry if I've not been clear, I'm talking of the backdrop added dynamically in the code behind the icons, not something in the icons themselves:

https://github.com/Interkarma/daggerfal ... ls.cs#L185

But yeah, new icons having a background color will also be an issue once this is removed
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
JohnBeavers
Posts: 27
Joined: Sun Jul 21, 2019 5:20 pm

Re: Transparency support for spell icons

Post by JohnBeavers »

I see,

So is there a way to turn:

iconPool.BackgroundColor = Color.black;

into

iconPool.BackgroundColor = none;
or
iconPool.BackgroundColor = null;

?

I'm just throwing ideas around.
If it goes nowhere, I understand.
Here is my Youtube channel if you are ever interested (FR): https://www.youtube.com/user/JohnBeaversYT/

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparency support for spell icons

Post by pango »

Yup,

Code: Select all

iconPool[i].BackgroundColor = Color.clear,
is all it takes:
icon transparency.jpg
icon transparency.jpg (153.27 KiB) Viewed 2341 times
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
JohnBeavers
Posts: 27
Joined: Sun Jul 21, 2019 5:20 pm

Re: Transparency support for spell icons

Post by JohnBeavers »

Wow !!

Can you make a mod out of that ?
Here is my Youtube channel if you are ever interested (FR): https://www.youtube.com/user/JohnBeaversYT/

User avatar
pango
Posts: 3347
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Transparency support for spell icons

Post by pango »

I don't think something that simple deserves a mod; Either this should be the default for all icons, or just for modded icons; That's why I asked earlier if anybody really cared about black background behind classic icons...
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
King of Worms
Posts: 4752
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Transparency support for spell icons

Post by King of Worms »

pango wrote: Wed Oct 16, 2019 4:20 pm I don't think something that simple deserves a mod; Either this should be the default for all icons, or just for modded icons; That's why I asked earlier if anybody really cared about black background behind classic icons...
I care :) would be nice to have this transparency as shown in the last screen

User avatar
JohnBeavers
Posts: 27
Joined: Sun Jul 21, 2019 5:20 pm

Re: Transparency support for spell icons

Post by JohnBeavers »

pango wrote: Wed Oct 16, 2019 4:20 pm don't think something that simple deserves a mod; Either this should be the default for all icons, or just for modded icons; That's why I asked earlier if anybody really cared about black background behind classic icons...
King of Worms wrote: Wed Oct 16, 2019 5:38 pm I care would be nice to have this transparency as shown in the last screen
To me it would just be a way to build much more little echantment icons. A workaround for how large they are.

For people with artistic talent it would allow many things we can't think of. Even the result you show in your example is already nice.
Here is my Youtube channel if you are ever interested (FR): https://www.youtube.com/user/JohnBeaversYT/

Post Reply