[MousePointerCrosshairs]Added a fixed length option (#27471)

* #19638 Added the option to Mouse Crosshairs to fix the lengths of the crosshairs. Some discussion about design in the issue but currently implemented as a configuration toggle and separate length input.

* Fixed crosshairs fixed lengthed enabled not being read on view model initialization
This commit is contained in:
Epp-code
2023-07-19 07:24:47 -07:00
committed by GitHub
parent e44d63451f
commit 1f44085e41
7 changed files with 149 additions and 17 deletions

View File

@@ -8,6 +8,8 @@ constexpr int INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_RADIUS = 20;
constexpr int INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_THICKNESS = 5;
constexpr int INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_BORDER_SIZE = 1;
constexpr bool INCLUSIVE_MOUSE_DEFAULT_AUTO_HIDE = false;
constexpr bool INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_IS_FIXED_LENGTH_ENABLED = false;
constexpr int INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_FIXED_LENGTH = 1;
struct InclusiveCrosshairsSettings
{
@@ -18,6 +20,8 @@ struct InclusiveCrosshairsSettings
int crosshairsOpacity = INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_OPACITY;
int crosshairsBorderSize = INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_BORDER_SIZE;
bool crosshairsAutoHide = INCLUSIVE_MOUSE_DEFAULT_AUTO_HIDE;
bool crosshairsIsFixedLengthEnabled = INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_IS_FIXED_LENGTH_ENABLED;
int crosshairsFixedLength = INCLUSIVE_MOUSE_DEFAULT_CROSSHAIRS_FIXED_LENGTH;
};
int InclusiveCrosshairsMain(HINSTANCE hinst, InclusiveCrosshairsSettings& settings);