SVGs in the UI

Will it be possible to use SVGs in the UI? In dm98 I saw “.png” being used in for the weapons in the hud / or the hit marker. Is this a better practice?

8 Likes

In the worst case you could probably load the svg as a mesh utilizing some kind of a converter and render it with some shader that can deal with vertex colors and layers I guess.

But it’d be neat to have shipped support for svg and maybe even have a set of neat shipped svg icons like the “silk icon” set we had in gmod, font awesome or something similar, close buttons, bells, pencils, folder icons and all this shit, every other developer needs them during UI development.

At least a good icons font would be nice if svg support wont make its way into the base game.

3 Likes

If the answer is no I’ll move this to suggestions because SVGs is honestly SUCH a good thing to have supported out of the box that I think everyone is gonna vote yes

3 Likes

Yeah SVG is absolutely essential in my opinion. Scaling is such an important thing in this day and age.

2 Likes

assuming garry ported almost the complete web stack (expect js, no one was to mess with that), i guess it would be supported.

SVG is on the wishlist, shouldn’t be too hard

23 Likes

Is a set of vector icons also on the list? :smiley:

Having it would not only benefit people who need a simple icon but also set a good standard on UI assets to follow, like “If Facepunch uses PNGs that look like blurred/pixelated mess when resized, that’s what I should do” or “If Facepunch uses SVGs I should probably do the same”.

This might sound a bit far-fetched but I think most people learn how to do things by taking apart the stock content and taking the patterns used there for a granted way to go.

P. S. Font Awesome… please…

1 Like

Just use Heroicons or something, everyone is going to use their own content anyway.
People are going to use PNGs anyway, because there are way less icons in SVG

Using raster graphics for icons is kind of an outdated approach, but it seems like not everyone thinks so. Would be sad to see this happening in S&Box, that’s why I’m worried.

1 Like

SVG is vector and doesn’t require a font to contain the icon, so I think it’s the obvious choice.

We’ll probably include a font icon too, but I don’t think that’s a fit all solution.

11 Likes