Metadata-Version: 2.4
Name: csxhair
Version: 2.0.1
Summary: Decode, edit and encode CS2 crosshairs easily.
Author: SyberiaK
License-Expression: MIT
Project-URL: Homepage, https://github.com/SyberiaK/csxhair
Project-URL: Issues, https://github.com/SyberiaK/csxhair/issues
Classifier: Development Status :: 6 - Mature
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: attrs>=23.1.0
Provides-Extra: dev
Requires-Dist: pytest>=9.1.1; extra == "dev"
Dynamic: license-file

# CSXhair

[![PyPI release]][pypi] 
[![Python supported versions]][pypi]
[![License]](./LICENSE)

CSXhair is a simple package for decoding, changing and encoding CS2 crosshairs using game share codes.

> [!WARNING]
> Since CS2's [Rush Hour update](https://www.counter-strike.net/newsentry/711161056325533826) 
> CS:GO and early CS2 crosshair share codes are no longer supported.
> 
> For CS:GO crosshair support, use [version 1.0.1](https://pypi.org/project/csxhair/1.0.1/) of the package.

```python
from csxhair import Crosshair

my_crosshair = Crosshair.decode('CSjNcfcGjo8LLy2pDpCynr5e5efCGW6yXuf7B6aQ7wkWmU')
print(my_crosshair.gap)  #> 2

my_crosshair.length += 5
my_crosshair.recoil = True
print(my_crosshair.encode())  #> "CSpQo2QSOSE2jXKTFHKei7T4mK5fznKeT2ziT8qXK9uN3Z"

my_crosshair.color = "#00FFFF"  # alpha is set to 255
my_crosshair.outline_color = (48, 57, 68, 128)

print(my_crosshair.commands) #> ['cl_crosshair_drawoutline 0', ..., 'cl_ironsight_usecrosshaircolor true', 'cl_ironsight_dot_scale 1.0']
```

*Special thanks to [Aquarius](https://github.com/aquaismissing) for making a rough implementation led to this package.*

[pypi]: https://pypi.org/project/csxhair/
[PyPI Release]: https://img.shields.io/pypi/v/csxhair.svg?label=pypi&color=green
[Python supported versions]: https://img.shields.io/pypi/pyversions/csxhair.svg?label=%20&logo=python&logoColor=white
[License]: https://img.shields.io/pypi/l/csxhair.svg?style=flat&label=license
