diff --git a/.gitignore b/.gitignore index 34065f3cc0..79e6d65238 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ precompiled.h.cpp *.xcuserstate *.xcuserdatad *.xcscmblueprint +.vscode diff --git a/doomsday/apps/plugins/common/include/config.h b/doomsday/apps/plugins/common/include/config.h index 58b73355c9..c044e36764 100644 --- a/doomsday/apps/plugins/common/include/config.h +++ b/doomsday/apps/plugins/common/include/config.h @@ -141,6 +141,7 @@ typedef struct libcommon_config_s { float automapL3[3]; float automapBack[3]; float automapOpacity; + byte automapNeverObscure; float automapLineAlpha; float automapLineWidth; ///< In fixed 320x200 pixels. byte automapRotate; diff --git a/doomsday/apps/plugins/common/src/hu_menu.cpp b/doomsday/apps/plugins/common/src/hu_menu.cpp index 3ceb66a5b9..be68dba88c 100644 --- a/doomsday/apps/plugins/common/src/hu_menu.cpp +++ b/doomsday/apps/plugins/common/src/hu_menu.cpp @@ -648,19 +648,20 @@ void Hu_MenuInitMultiplayerPage() void Hu_MenuInitPlayerSetupPage() { #if __JHERETIC__ || __JHEXEN__ - Vector2i const origin(70, 44); + Vector2i const origin(70, 34); #else Vector2i const origin(70, 54); #endif Page *page = Hu_MenuAddPage(new Page("PlayerSetup", origin, Page::NoScroll, Hu_MenuDrawPlayerSetupPage)); + page->setLeftColumnWidth(.5f); page->setOnActiveCallback(Hu_MenuActivatePlayerSetup); page->setPredefinedFont(MENU_FONT1, FID(GF_FONTA)); page->setPredefinedFont(MENU_FONT2, FID(GF_FONTB)); page->setPreviousPage(Hu_MenuPagePtr("Options")); page->addWidget(new MobjPreviewWidget) - .setFixedOrigin(Vector2i(SCREENWIDTH / 2 - origin.x, 60)) + .setFixedOrigin(Vector2i(SCREENWIDTH / 2 - 40, 60)) .setFlags(Widget::Id0 | Widget::PositionFixed); page->addWidget(new CVarLineEditWidget("net-name")) @@ -670,6 +671,7 @@ void Hu_MenuInitPlayerSetupPage() #if __JHEXEN__ page->addWidget(new LabelWidget("Class")) + .setLeft() .setFlags(Widget::LayoutOffset) .setFixedY(5); @@ -679,12 +681,14 @@ void Hu_MenuInitPlayerSetupPage() << new ListWidgetItem(GET_TXT(TXT_PLAYERCLASS3), PCLASS_MAGE)) .setFlags(Widget::Id2) .setShortcut('c') + .setRight() .setColor(MENU_COLOR3) .setAction(Widget::Modified, Hu_MenuSelectPlayerSetupPlayerClass) .setAction(Widget::FocusGained, Hu_MenuDefaultFocusAction); #endif auto &label = page->addWidget(new LabelWidget("Color")); + label.setLeft(); #ifdef __JHERETIC__ label.setFlags(Widget::LayoutOffset); label.setFixedY(5); @@ -725,6 +729,7 @@ void Hu_MenuInitPlayerSetupPage() .addItems(items) .setFlags(Widget::Id3) .setColor(MENU_COLOR3) + .setRight() .setAction(Widget::Modified, Hu_MenuSelectPlayerColor) .setAction(Widget::FocusGained, Hu_MenuDefaultFocusAction); @@ -1614,6 +1619,13 @@ void Hu_MenuInitAutomapOptionsPage() page->addWidget(tgl); } + page->addWidget(new LabelWidget("Always Update Map")) + .setLeft(); + page->addWidget(new CVarToggleWidget("map-neverobscure")) + .setRight() + .setShortcut('a') + .setHelpInfo("Update map even when background is opaque"); + #if !defined (__JDOOM64__) page->addWidget(new LabelWidget("HUD Display")) .setLeft(); @@ -2436,6 +2448,13 @@ void Hu_MenuDrawPageHelp(String helpText, Vector2i const &origin) { if(helpText.isEmpty()) return; + DGL_MatrixMode(DGL_MODELVIEW); + DGL_PushMatrix(); + + DGL_Translatef(SCREENWIDTH / 2, SCREENHEIGHT, 0); + DGL_Scalef(.666666f, .666666f, 1.f); + DGL_Translatef(-SCREENWIDTH / 2, -SCREENHEIGHT, 0); + DGL_Enable(DGL_TEXTURE_2D); FR_SetFont(FID(GF_FONTA)); FR_SetColorv(cfg.common.menuTextColors[1]); @@ -2444,6 +2463,9 @@ void Hu_MenuDrawPageHelp(String helpText, Vector2i const &origin) FR_DrawTextXY3(helpText.toUtf8().constData(), origin.x, origin.y, ALIGN_BOTTOM, Hu_MenuMergeEffectWithDrawTextFlags(0)); DGL_Disable(DGL_TEXTURE_2D); + + DGL_MatrixMode(DGL_MODELVIEW); + DGL_PopMatrix(); } static void drawOverlayBackground(float darken) diff --git a/doomsday/apps/plugins/common/src/hud/widgets/automapwidget.cpp b/doomsday/apps/plugins/common/src/hud/widgets/automapwidget.cpp index 30c240f379..a004c9828c 100644 --- a/doomsday/apps/plugins/common/src/hud/widgets/automapwidget.cpp +++ b/doomsday/apps/plugins/common/src/hud/widgets/automapwidget.cpp @@ -1994,6 +1994,7 @@ void AutomapWidget::setMapBounds(coord_t lowX, coord_t hiX, coord_t lowY, coord_ void AutomapWidget::consoleRegister() // static { C_VAR_FLOAT("map-opacity", &cfg.common.automapOpacity, 0, 0, 1); + C_VAR_BYTE ("map-neverobscure", &cfg.common.automapNeverObscure, 0, 0, 1); #if __JDOOM__ || __JHERETIC__ || __JDOOM64__ C_VAR_BYTE ("map-babykeys", &cfg.common.automapBabyKeys, 0, 0, 1); #endif diff --git a/doomsday/apps/plugins/common/src/menu/page.cpp b/doomsday/apps/plugins/common/src/menu/page.cpp index 3bad731f36..a0305b4f45 100644 --- a/doomsday/apps/plugins/common/src/menu/page.cpp +++ b/doomsday/apps/plugins/common/src/menu/page.cpp @@ -578,7 +578,7 @@ void Page::draw(float alpha, bool showFocusCursor) drawTitle(d->title); // The page has its own drawer. - if(d->drawer) + if (d->drawer) { FR_PushAttrib(); d->drawer(*this, d->origin); @@ -586,9 +586,9 @@ void Page::draw(float alpha, bool showFocusCursor) } // How about some additional help/information for the focused item? - if(focused && !focused->helpInfo().isEmpty()) + if (focused && !focused->helpInfo().isEmpty()) { - Vector2i helpOrigin(SCREENWIDTH / 2, (SCREENHEIGHT / 2) + ((SCREENHEIGHT / 2 - 5) / cfg.common.menuScale)); + Vector2i helpOrigin(SCREENWIDTH / 2, SCREENHEIGHT - 5 / cfg.common.menuScale); Hu_MenuDrawPageHelp(focused->helpInfo(), helpOrigin); } } diff --git a/doomsday/apps/plugins/common/src/r_common.c b/doomsday/apps/plugins/common/src/r_common.c index dfb80fd5bf..13af97aecb 100644 --- a/doomsday/apps/plugins/common/src/r_common.c +++ b/doomsday/apps/plugins/common/src/r_common.c @@ -325,7 +325,7 @@ void G_DrawViewPort(int port, RectRaw const *portGeometry, if (IS_CLIENT && (!Get(DD_GAME_READY) || !Get(DD_GOTFRAME))) return; - if (Con_GetInteger("rend-vr-mode") == 9) // Oculus Rift mode + if (cfg.common.automapNeverObscure || Con_GetInteger("rend-vr-mode") == 9) // Oculus Rift mode { // Automap will not cover the full view. isAutomapObscuring = false;