Skip to content

Commit

Permalink
All Games: Minimum valid value for "view-cross-width"
Browse files Browse the repository at this point in the history
IssueID #2302
  • Loading branch information
skyjake committed Dec 14, 2018
1 parent 06a366d commit 9766953
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doomsday/apps/plugins/common/include/config.h
Expand Up @@ -122,7 +122,7 @@ typedef struct libcommon_config_s {
float xhairSize;
byte xhairVitality;
float xhairColor[4];
float xhairWeight;
float xhairLineWidth;

/// Reference hue value for the crosshair at 0% health
float xhairLiveRed;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/apps/plugins/common/src/hu_menu.cpp
Expand Up @@ -1279,7 +1279,7 @@ void Hu_MenuInitHUDOptionsPage()
page->addWidget(new LabelWidget("Thickness"))
.setLeft()
.setGroup(3);
page->addWidget(new CVarSliderWidget("view-cross-width", .5f, 5, .25f))
page->addWidget(new CVarSliderWidget("view-cross-width", .5f, 5, .5f))
.setRight()
.setGroup(3);

Expand Down
4 changes: 2 additions & 2 deletions doomsday/apps/plugins/common/src/x_hair.c
Expand Up @@ -41,7 +41,7 @@ void X_Register(void)
C_VAR_FLOAT("view-cross-g", &cfg.common.xhairColor[1], 0, 0, 1);
C_VAR_FLOAT("view-cross-b", &cfg.common.xhairColor[2], 0, 0, 1);
C_VAR_FLOAT("view-cross-a", &cfg.common.xhairColor[3], 0, 0, 1);
C_VAR_FLOAT("view-cross-width", &cfg.common.xhairWeight, 0, 0, 5);
C_VAR_FLOAT("view-cross-width", &cfg.common.xhairLineWidth, 0, .5f, 5);
C_VAR_FLOAT("view-cross-live-r", &cfg.common.xhairLiveRed, 0, 0, 1);
C_VAR_FLOAT("view-cross-live-g", &cfg.common.xhairLiveGreen, 0, 0, 1);
C_VAR_FLOAT("view-cross-live-b", &cfg.common.xhairLiveBlue, 0, 0, 1);
Expand Down Expand Up @@ -157,7 +157,7 @@ void X_Drawer(int pnum)
scale = .125f + MINMAX_OF(0, cfg.common.xhairSize, 1) * .125f * win.size.height * ((float)80/SCREENHEIGHT);

oldLineWidth = DGL_GetFloat(DGL_LINE_WIDTH);
DGL_SetFloat(DGL_LINE_WIDTH, cfg.common.xhairWeight);
DGL_SetFloat(DGL_LINE_WIDTH, cfg.common.xhairLineWidth);

currentColor(player, color);
DGL_Color4fv(color);
Expand Down

0 comments on commit 9766953

Please sign in to comment.