diff --git a/src/menu/menu.h b/src/menu/menu.h index a8ec2989b..4ab3d2e10 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -139,7 +139,6 @@ struct FOptionMenuSettings EColorRange mFontColorHighlight; EColorRange mFontColorSelection; int mLinespacing; - int mLabelOffset; }; struct FOptionMenuDescriptor : public FMenuDescriptor diff --git a/src/menu/menudef.cpp b/src/menu/menudef.cpp index 349f08bf3..98b1dc34b 100644 --- a/src/menu/menudef.cpp +++ b/src/menu/menudef.cpp @@ -605,7 +605,7 @@ static void ParseOptionSettings(FScanner &sc) else if (sc.Compare("LabelOffset")) { sc.MustGetNumber(); - OptionSettings.mLabelOffset = sc.Number; + // ignored } else { diff --git a/src/menu/messagebox.cpp b/src/menu/messagebox.cpp index e415f57c8..a97dc7bba 100644 --- a/src/menu/messagebox.cpp +++ b/src/menu/messagebox.cpp @@ -214,7 +214,7 @@ void DMessageBoxMenu::Drawer () { screen->DrawText(ConFont, OptionSettings.mFontColorSelection, (150 - 160) * CleanXfac + screen->GetWidth() / 2, - (y + (fontheight + 1) * messageSelection - 100) * CleanYfac + screen->GetHeight() / 2, + (y + (fontheight + 1) * messageSelection - 100 + fontheight/2 - 5) * CleanYfac + screen->GetHeight() / 2, "\xd", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac, diff --git a/src/menu/optionmenu.cpp b/src/menu/optionmenu.cpp index 6302ffa5b..08489fe23 100644 --- a/src/menu/optionmenu.cpp +++ b/src/menu/optionmenu.cpp @@ -398,8 +398,6 @@ void DOptionMenu::Drawer () } } mDesc->mDrawTop = y; - //int labelofs = OptionSettings.mLabelOffset * CleanXfac_1; - //int cursorspace = 14 * CleanXfac_1; int fontheight = OptionSettings.mLinespacing * CleanYfac_1; y *= CleanYfac_1; @@ -449,11 +447,11 @@ void DOptionMenu::Drawer () if (CanScrollUp) { - M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, ytop + OptionSettings.mLabelOffset, "\x1a"); + M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, ytop, "\x1a"); } if (CanScrollDown) { - M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, y - 8*CleanYfac_1 + OptionSettings.mLabelOffset, "\x1b"); + M_DrawConText(CR_ORANGE, 3 * CleanXfac_1, y - 8*CleanYfac_1, "\x1b"); } Super::Drawer(); } diff --git a/src/menu/optionmenuitems.h b/src/menu/optionmenuitems.h index 461af0478..d57e13d05 100644 --- a/src/menu/optionmenuitems.h +++ b/src/menu/optionmenuitems.h @@ -407,11 +407,11 @@ public: C_NameKeys (description, Key1, Key2); if (description[0]) { - M_DrawConText(CR_WHITE, indent + CURSORSPACE, y-1+OptionSettings.mLabelOffset, description); + M_DrawConText(CR_WHITE, indent + CURSORSPACE, y + (OptionSettings.mLinespacing-8)*CleanYfac_1, description); } else { - screen->DrawText(SmallFont, CR_BLACK, indent + CURSORSPACE, y + OptionSettings.mLabelOffset, "---", + screen->DrawText(SmallFont, CR_BLACK, indent + CURSORSPACE, y + (OptionSettings.mLinespacing-8)*CleanYfac_1, "---", DTA_CleanNoMove_1, true, TAG_DONE); } return indent; @@ -569,12 +569,13 @@ public: // //============================================================================= - void DrawSlider (int x, int y, double min, double max, double cur,int fracdigits, int indent) + void DrawSlider (int x, int y, double min, double max, double cur, int fracdigits, int indent) { char textbuf[16]; double range; int maxlen = 0; int right = x + (12*8 + 4) * CleanXfac_1; + int cy = y + (OptionSettings.mLinespacing-8)*CleanYfac_1; range = max - min; double ccur = clamp(cur, min, max) - min; @@ -589,14 +590,14 @@ public: if (!mSliderShort) { - M_DrawConText(CR_WHITE, x, y, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12"); - M_DrawConText(CR_ORANGE, x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), y, "\x13"); + M_DrawConText(CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12"); + M_DrawConText(CR_ORANGE, x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13"); } else { // On 320x200 we need a shorter slider - M_DrawConText(CR_WHITE, x, y, "\x10\x11\x11\x11\x11\x11\x12"); - M_DrawConText(CR_ORANGE, x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), y, "\x13"); + M_DrawConText(CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12"); + M_DrawConText(CR_ORANGE, x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13"); right -= 5*8*CleanXfac_1; } @@ -613,7 +614,7 @@ public: { drawLabel(indent, y, selected? OptionSettings.mFontColorSelection : OptionSettings.mFontColor); mDrawX = indent + CURSORSPACE; - DrawSlider (mDrawX, y + OptionSettings.mLabelOffset, mMin, mMax, GetValue(), mShowValue, indent); + DrawSlider (mDrawX, y, mMin, mMax, GetValue(), mShowValue, indent); return indent; } @@ -777,8 +778,8 @@ public: if (mCVar != NULL) { int box_x = indent + CURSORSPACE; - int box_y = y + OptionSettings.mLabelOffset * CleanYfac_1 / 2; - screen->Clear (box_x, box_y, box_x + 32*CleanXfac_1, box_y + (SmallFont->GetHeight() - 1) * CleanYfac_1, + int box_y = y + CleanYfac_1; + screen->Clear (box_x, box_y, box_x + 32*CleanXfac_1, box_y + OptionSettings.mLinespacing*CleanYfac_1, -1, (uint32)*mCVar | 0xff000000); } return indent; diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 3ecd4f5f7..380b72de4 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -926,7 +926,6 @@ public: const char *speakerName; int x, y, linesize; int width, fontheight; - int labelofs; player_t *cp = &players[consoleplayer]; @@ -1015,8 +1014,6 @@ public: } y = mYpos; - labelofs = OptionSettings.mLabelOffset; - y -= labelofs; fontheight = OptionSettings.mLinespacing; int response = 0; @@ -1041,7 +1038,7 @@ public: int color = ((DMenu::MenuTime%8) < 4) || DMenu::CurrentMenu != this ? CR_RED:CR_GREY; x = (50 + 3 - 160) * CleanXfac + screen->GetWidth() / 2; - int yy = (y-1+labelofs - 100) * CleanYfac + screen->GetHeight() / 2; + int yy = (y + fontheight/2 - 5 - 100) * CleanYfac + screen->GetHeight() / 2; screen->DrawText (ConFont, color, x, yy, "\xd", DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac,