branchrust_reboot/main/hackweek_crosshair_customizationcancel
34 Commits over 31 Days - 0.05cph!
Trim input on crosshair import popup
Increase char limit to 50 and change overflow mode
Fix import popup not being centered
Make the code in the export popup selectable
Implemented code review feedback, including
- Swap cancel & action button positions
- Put Crosshair settings above Interaction in the UI settings
- Fix code being uppercased in the text field when exporting
- Various smaller cleanup bits
Clicking anywhere outside the popup closes it
Improve responsiveness of crosshair popup
Integrate crosshair code functionality into the settings menu UI.
Buttons to import/export/reset crosshair with new custom popup dialogs:
https://files.facepunch.com/cipeaX/2025/September/18_21-51-YellowSwallow.mp4
Add import/export/reset buttons under the preview crosshair
Reset button loads default crosshair settings
Fix crosshair being visible in main menu
Fix crosshair rendering below scope overlays
Completely refactor dynamic stuff. Get rid of "mode", split it into 2 new toggle settings, that can be configured independently:
"Dynamic Visibility" - whether or not crosshair gets hidden when aiming/alt-looking/etc
"Dynamic Spacing" - whether spacing changes to indicate accuracy
Hook them up to settings menu & crosshair code packing
Fix crosshair not getting initialized correctly with the settings
Update tooltip phrases, rename static 2 to semi-static
Fix some options not getting darker on hover
Allow spacing to bet set closer to 0 for more customization freedom, like making small crosses
Set opacity to 1 instead of 0.8 when dynamic
Make preview crosshair size more similar to the real crosshair, it was very slightly off before
Fix settings preview crosshair staying visible when switching away from the settings tab, also stop it from updating when it doesn't have to
Fixed reticle in settings preview not getting scaled correctly when not connected to a server
Get rid of IndependentScale, just do it myself
Various cleanup/refactoring/optimization bits
Get rid of allocations, stop settings preview crosshair updating while menu is closed
Add convar to reset crosshair back to default
Fix compile error
Include a version number (4 bits) to make future crosshair code changes easier and allow us to keep compatibility with old codes
Switch to base 62 to ensure only alphanumeric characters are used
Revert accidentally touched file
Make the reticle a prefab since its used in two places now
Improve looks of the outline of the center dot (just use a slightly bigger circle behind it instead of an actual outline)
When in dynamic mode, give the preview crosshair a pulsing animation and block changes to scaling
Fix static mode always visible ignoring client.crosshair
Fix settings preview crosshair updating dynamically
Add tooltip mention that spacing doesn't do anything in dynamic mode
Hook up all the convars so far to the options menu
Switch to colour dropdowns for the colour settings
Set/fix all phrases correctly with the new system, adhering to convention
Move main crosshair enable/disable toggle into the new section
Simplify / rename a few crosshair variables, add one more color option
merge from hackweek_crosshair_customization/settings_editor
Added crosshair codes. Can be generated from the current crosshair settings, and then easily loaded at a later time or shared with other people:
https://files.facepunch.com/cipeaX/2025/August/12_13-59-FrankGrasshopper.mp4
WIP crosshair customization, added the following convars to control the appearance and behaviour of the crosshair:
- mode: 0=static, always visible | 1=static, hidden during ADS | 2=dynamic, adjusts to accuracy, hidden during ADS
- style: 0=full | 1=no dot | 2=only dot | 3=T-shape no dot | 4=T-shape with dot
- color: 0=white | 1=green | 2=blue | 3=red | 4=yellow | 5=magenta | 6=cyan
- dotsize: Size of center dot [0-5]
- spacing: Distance of the outer lines to the center dot [0-3]
- outline: Outline enabled [true/false]
- outlinecolor: 0=black | 1=green | 2=blue | 3=red | 4=yellow | 5=magenta | 6=cyan
Demo: https://files.facepunch.com/cipeaX/2025/August/11_19-02-AttractiveLacewing.mp4