icculus / ControllerImage

A library for producing images of SDL controllers.
zlib License
107 stars 2 forks source link

[Feature Request] Selecting Theme's Styles, within a single SVG file. #28

Open AL2009man opened 3 months ago

AL2009man commented 3 months ago

This was inspired by an idea from from the creator of VSCView / ExtendInput, where SVGs can be edited on the fly via code/GUI...something like Color Class and Layer switch, as opposed to making three separate theme files for each controller device icons.

quick example, from something I've learned from making Controller Overlays for VSCView: I figured a more modular theme setup would help speed things up and reduce the amount of clutter via that. Thus: I can quickly switch between styles and export them with ease, without having to open up another SVG file and do the same thing there.

https://github.com/icculus/ControllerImage/assets/67606569/e8348664-6ee3-45b2-8525-c5f4d2b78722

(Image Editor is Inkscape)

but instead of having to go to each glyph just to manually change styles, I thought to myself: what if it can be done directly within the code? So, I decided to play around a bit.

https://github.com/icculus/ControllerImage/assets/67606569/9a5ff81f-9de0-44c3-9526-b8a74768a07d

(Website is codebeautify's SVG Viewer Online)

After a quick troubleshooting (particularly the text portion); I personally think it could be possible to setup a layers toggle system for developers who can switch between "Transparent" or "Outline" at the same time: while allowing developers to quickly use the SVG editor code. (think something like Controller Tester in a Fighting Game and pressing the A Button can change the icon's outline (or semi-transparency) without making a separate file for it.)

While this method could be meant for developers who may want the same theme but can switch the "Theme Style layer" inside ControllerImage

I'm actually considering making a entirely new theme (this time: done by scratch, as opposed to tracing it...minus for PlayStation Icons or Xbox/SteamDeck View/Menu buttons) with that concept alone-- but I'm gonna need to look at ControllerImage's art and follow the guidelines carefully before fully committing to it.

In the meantime: I can provide the Controller Icon Pack file to anyone who may like to experiment with that idea. Do note that the icons' image size is set to 172x172 and the SVG format is Inkscape SVG, that might change when I start making the Theme project for real.