lacymorrow/crossover

SVG Support

lacymorrow opened this issue · 6 comments

Crossover doesn't cut it on high-res monitors, support vector images or use canvas

One source would be Kenney.nl's currently used crosshair pack as it contains svg editions too.

Other sources of svg crosshairs? I thought we could help listing some, if you know or find others. Could submit your own packs of crosshairs too.

On a separate note; this could potentially mean more customization per crosshair, since vectors are just code in the end.

Example: If every crosshair uses the same (or a few similar) identifiers (id/style/? or whathaveyou) the app could have fields for editing the length/thickness/colors (or anything) features of the crosshairs. That plus a few more options like hide/opacity, probably some I can't think of right now.

If no identifiers are found / some won't have it for sure (I imagine there will be plenty), easy peasy - grey those parts out when using that crosshair (and for UX perhaps a small but obvious string to tell people why options aren't available).

Edit:
If the crosshair is styled/made in a certain way, even things such as the gap / rounding could be changed. (Also wow, a normal full 255 alpha crosshair with a 20% transparent dot too? Sign me up!)

Which gave me an extra idea: a custom code box for advanced users. Should show/allow opening of svg to see its specific layout and id's, then the user could style a crosshair that might not be supported by the defaults/home made etc.

Just my 2 cents on this, hope I'm not being a bother

Love these ideas, keep them coming!

Original comment:

Made my own crosshair since at 1440p the current crosshairs get quite blurry due to their small standard size. (I don't usually play at this resolution, don't yell). Currently on a Gigabyte monitor with these fancy draw-your-own-x-hair (better than any others I guarantee you), so I've had a hard time finding the will to upgrade it since I'd lose my perfect (for me) 1.6 crosshair, which is why I found this wonderful repo! Thank you for all your hard work so far! I'll upload my basic crosshair that is larger than the defaults, in case there's a hardcore "old-school" Counter-Strike static crosshair fan out there, until svg support is here:

It's not by any means perfect or fancy, but at only 250x250 pixels it works great (64x64 is the default I think), I set the size in CrossOver to 50 for a non-blurry good size for me (you do you). Uneven numbers = higher risk of blur? (correct me if I'm wrong).

edit: removed svg suggestion wall of text, SVG support (vector) is being worked on/in the pipe, see reply below

(PS I bound my ahk script to "Home" instead of "space", since it's actually a toggle (might be my version of AHK, á the latest(?)), since space=jump natively, it would toggle it on and off a lot. To change it, just replace the word 'space' with 'Home' in the script. Google for other keys to use, they may have specific names in AHK; I just happen to not have anything else set to Home for now)

PPS. If started as administrator, drag-n-dropping your own crosshair does not work. Found this out the slow way ^^ Also sorry for the overkill comment that became somewhat off-topic

Love these ideas, keep them coming!

Thanks! I got one more just from reading my own text, I can't believe I didn't think of it at the time;

Regarding my extra idea of:

a custom code box for advanced users. Should show/allow opening of svg to see its specific layout and id's, then the user could style a crosshair that might not be supported by the defaults/home made etc.

Improvement to idea:

Being able to edit the SVG's code themselves (without breaking them; perhaps only allow saving them as a copy/with new name - if it was edited) is enough to both allow custom styling and any other changes an advanced user would like to make. (Also, the below-mentioned SVG-parse-check should give the go-ahead when saving/before saving)

In addition, perhaps this 'advanced' setting could allow you to simply paste your own SVG.

I assume drag-n-dropping will also work as well with SVGs (when supported), but just sayin' in case you forget - sometimes one does simply not think of things, right?^^:

CrossOver probably will need basic syntax checks on the drag-n-dropped and pasted SVG code, to make sure it's a proper SVG and the code isn't invalid or the paste is missing it's last closing bracket.... for example heh. This check should probably apply to all crosshairs that come natively, at least when they are first added - just in case, right.

Avoid confusion (from users) by showing a warning if the 'upload' shows an SVG code that isn't properly made or pasted (the specific error could also be shown, I think there should be a library (or multiple) to use for these checks and parse-errors, I'm just guessing but since it's JS-based, I'm pretty sure there are plenty of options available).

Extra thought about customization:

Regarding SVG support - in order to actually be able to have most SVG crosshairs be customizable, they will need to have the same IDs for certain parts - so on a crosshair like mine, that would be the 4 lines having 4 different IDs that will always be the same (not the same ID for all, but the same ID for all crosshairs based on which line) no matter what crosshair it is, assuming it has lines or similar parts. I think you get what I mean.

The point is that CrossOver might want to have a "best practice"-FAQ / Wiki on how to make a proper customizable SVG crosshair?

I'm not sure if this would be the best way; but if a cheat-sheet for customization exists, an advanced user might be able to more easily edit an existing crosshair without knowing how to 'style' things themselves, just add/edit IDs, in the right spots...

//my weekly 2 cents lol. Godspeed

I've refactored the app and updated dependencies in prep for v3.0.0, SVG support has been added and will be available in the next version.

I still need to add SVG versions of existing crosshairs and stroke/fill SVG edit options

The [Kenney.nl Crosshair pack](https://www.kenney.nl/assets/crosshair-pack has all the SVGs in one big sprite sheet.

I need someone to split these up into individual SVGs for me to use in the app. If you're good with editing software, I could use some help on this!