diff --git a/src/d_main.cpp b/src/d_main.cpp index 6cc176a3b..3035d53e9 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -863,7 +863,7 @@ void D_Display () { FTexture *tex; int x; - FString pstring = "By "; + FString pstring = GStrings("TXT_BY"); tex = TexMan.GetTextureByName(gameinfo.PauseSign, true); x = (SCREENWIDTH - tex->GetDisplayWidth() * CleanXfac)/2 + @@ -871,7 +871,7 @@ void D_Display () screen->DrawTexture (tex, x, 4, DTA_CleanNoMove, true, TAG_DONE); if (paused && multiplayer) { - pstring += players[paused - 1].userinfo.GetName(); + pstring << ' ' << players[paused - 1].userinfo.GetName(); screen->DrawText(SmallFont, CR_RED, (screen->GetWidth() - SmallFont->StringWidth(pstring)*CleanXfac) / 2, (tex->GetDisplayHeight() * CleanYfac) + 4, pstring, DTA_CleanNoMove, true, TAG_DONE); diff --git a/src/menu/menu.cpp b/src/menu/menu.cpp index 008f13b55..e6cf53a89 100644 --- a/src/menu/menu.cpp +++ b/src/menu/menu.cpp @@ -56,6 +56,7 @@ #include "scripting/types.h" int DMenu::InMenu; +static ScaleOverrider *CurrentScaleOverrider; // // Todo: Move these elsewhere // @@ -348,7 +349,7 @@ bool DMenu::TranslateKeyboardEvents() // //============================================================================= -void M_StartControlPanel (bool makeSound) +void M_StartControlPanel (bool makeSound, bool scaleoverride) { // intro might call this repeatedly if (CurrentMenu != nullptr) @@ -372,6 +373,8 @@ void M_StartControlPanel (bool makeSound) } BackbuttonTime = 0; BackbuttonAlpha = 0; + if (scaleoverride && !CurrentScaleOverrider) CurrentScaleOverrider = new ScaleOverrider; + else if (!scaleoverride && CurrentScaleOverrider) delete CurrentScaleOverrider; } //============================================================================= @@ -912,6 +915,8 @@ void M_ClearMenus() CurrentMenu = parent; } menuactive = MENU_Off; + if (CurrentScaleOverrider) delete CurrentScaleOverrider; + CurrentScaleOverrider = nullptr; } //============================================================================= diff --git a/src/menu/menu.h b/src/menu/menu.h index 21b10d785..cabf526ac 100644 --- a/src/menu/menu.h +++ b/src/menu/menu.h @@ -347,7 +347,7 @@ void M_PreviousMenu (); void M_ParseMenuDefs(); void M_StartupEpisodeMenu(FGameStartup *gs); void M_StartupSkillMenu(FGameStartup *gs); -void M_StartControlPanel (bool makeSound); +void M_StartControlPanel (bool makeSound, bool scaleoverride = true); void M_SetMenu(FName menu, int param = -1); void M_StartMessage(const char *message, int messagemode, FName action = NAME_None); DMenu *StartPickerMenu(DMenu *parent, const char *name, FColorCVar *cvar); diff --git a/src/p_conversation.cpp b/src/p_conversation.cpp index 6f3bec89b..9dad979eb 100644 --- a/src/p_conversation.cpp +++ b/src/p_conversation.cpp @@ -381,6 +381,7 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang I_SetMusicVolume (dlg_musicvolume); S_Sound (npc, CHAN_VOICE|CHAN_NOPAUSE, CurNode->SpeakerVoice, 1, ATTN_NORM); } + M_StartControlPanel(false, true); // Create the menu. This may be a user-defined class so check if it is good to use. FName cls = CurNode->MenuClassName; @@ -405,7 +406,6 @@ void P_StartConversation (AActor *npc, AActor *pc, bool facetalker, bool saveang } // And open the menu - M_StartControlPanel (false); M_ActivateMenu((DMenu*)cmenu); menuactive = MENU_OnNoPause; } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index cfed6b614..cc89dd2c7 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -861,6 +861,7 @@ OptionMenu "VideoOptions" protected Submenu "$DSPLYMNU_GLOPT", "OpenGLOptions" Submenu "$DSPLYMNU_SWOPT", "SWROptions" + Submenu "$DSPLYMNU_VKOPT", "VKOptions" Submenu "$GLMNU_DYNLIGHT", "GLLightOptions" Submenu "$DSPLYMNU_SCOREBOARD", "ScoreboardOptions" StaticText " " @@ -2657,3 +2658,20 @@ OptionValue "os_isanyof_values" 0, "$OS_ALL" 1, "$OS_ANY" } + +/*======================================= + * + * Vulkan Menu + * + *=======================================*/ + +OptionMenu "vkoptions" +{ + Title "$VK_TITLE" + StaticText "$VK_WARNING" + StaticText "$VK_RESTART" + StaticText "" + Option "$VKMNU_ENABLE", "vid_backend", "OffOn" + TextField "$VKMNU_DEVICE", vk_device + Option "$VKMNU_HDR", "vk_hdr", "OnOff" +} \ No newline at end of file diff --git a/wadsrc/static/zscript/actors/hexen/flechette.zs b/wadsrc/static/zscript/actors/hexen/flechette.zs index 2d01b173c..f21a334ce 100644 --- a/wadsrc/static/zscript/actors/hexen/flechette.zs +++ b/wadsrc/static/zscript/actors/hexen/flechette.zs @@ -436,7 +436,7 @@ class PoisonCloud : Actor Mass 0x7fffffff; +NOBLOCKMAP +NOGRAVITY +DROPOFF +NODAMAGETHRUST - +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG + +DONTSPLASH +FOILINVUL +CANBLAST +BLOODLESSIMPACT +BLOCKEDBYSOLIDACTORS +FORCEZERORADIUSDMG +OLDRADIUSDMG RenderStyle "Translucent"; Alpha 0.6; DeathSound "PoisonShroomDeath"; diff --git a/wadsrc/static/zscript/ui/menu/conversationmenu.zs b/wadsrc/static/zscript/ui/menu/conversationmenu.zs index 1c5043512..76b280578 100644 --- a/wadsrc/static/zscript/ui/menu/conversationmenu.zs +++ b/wadsrc/static/zscript/ui/menu/conversationmenu.zs @@ -82,6 +82,7 @@ class ConversationMenu : Menu PlayerInfo mPlayer; int mSelection; int ConversationPauseTic; + int LineHeight; int SpeechWidth; int ReplyWidth; @@ -107,6 +108,7 @@ class ConversationMenu : Menu ReplyWidth = 320-50-10; SpeechWidth = screen.GetWidth()/CleanXfac - 24*2; + LineHeight = SmallFont.GetHeight(); FormatSpeakerMessage(); return FormatReplies(activereply); @@ -174,8 +176,8 @@ class ConversationMenu : Menu mResponseLines.Push(goodbyestr); // Determine where the top of the reply list should be positioned. - mYpos = MIN (140, 192 - mResponseLines.Size() * OptionMenuSettings.mLinespacing); - i = 44 + mResponseLines.Size() * OptionMenuSettings.mLinespacing; + mYpos = MIN (140, 192 - mResponseLines.Size() * LineHeight); + i = 44 + mResponseLines.Size() * LineHeight; if (mYpos - 100 < i - screen.GetHeight() / CleanYfac / 2) { mYpos = i - screen.GetHeight() / CleanYfac / 2 + 100; @@ -305,7 +307,7 @@ class ConversationMenu : Menu override bool MouseEvent(int type, int x, int y) { int sel = -1; - int fh = OptionMenuSettings.mLinespacing; + int fh = LineHeight; // convert x/y from screen to virtual coordinates, according to CleanX/Yfac use in DrawTexture x = ((x - (screen.GetWidth() / 2)) / CleanXfac) + 160; @@ -382,7 +384,7 @@ class ConversationMenu : Menu virtual void DrawSpeakerText(bool dimbg) { String speakerName; - int linesize = OptionMenuSettings.mLinespacing * CleanYfac; + int linesize = LineHeight * CleanYfac; int cnt = mDialogueLines.Count(); // Who is talking to you? @@ -434,10 +436,10 @@ class ConversationMenu : Menu { // Dim the screen behind the PC's choices. screen.Dim(0, 0.45, (24 - 160) * CleanXfac + screen.GetWidth() / 2, (mYpos - 2 - 100) * CleanYfac + screen.GetHeight() / 2, - 272 * CleanXfac, MIN(mResponseLines.Size() * OptionMenuSettings.mLinespacing + 4, 200 - mYpos) * CleanYfac); + 272 * CleanXfac, MIN(mResponseLines.Size() * LineHeight + 4, 200 - mYpos) * CleanYfac); int y = mYpos; - int fontheight = OptionMenuSettings.mLinespacing; + int fontheight = LineHeight; int response = 0; for (int i = 0; i < mResponseLines.Size(); i++) diff --git a/wadsrc/static/zscript/ui/menu/menu.zs b/wadsrc/static/zscript/ui/menu/menu.zs index 6feee5467..6a6c96a80 100644 --- a/wadsrc/static/zscript/ui/menu/menu.zs +++ b/wadsrc/static/zscript/ui/menu/menu.zs @@ -285,7 +285,7 @@ class Menu : Object native ui version("2.4") static void DrawConText (int color, int x, int y, String str) { - screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 8 * CleanXfac, DTA_CellY, 8 * CleanYfac); + screen.DrawText (ConFont, color, x, y, str, DTA_CellX, 16 * CleanXfac_1, DTA_CellY, 16 * CleanYfac_1); } static int OptionColor(int color) diff --git a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs index 19fb0429d..f9aaec029 100644 --- a/wadsrc/static/zscript/ui/menu/optionmenuitems.zs +++ b/wadsrc/static/zscript/ui/menu/optionmenuitems.zs @@ -744,13 +744,13 @@ class OptionMenuSliderBase : OptionMenuItem if (!mSliderShort) { Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x11\x11\x11\x11\x11\x12"); - Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * CleanXfac_1), cy, "\x13"); + Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 78) / range)) * 2 * CleanXfac_1), cy, "\x13"); } else { // On 320x200 we need a shorter slider Menu.DrawConText(Font.CR_WHITE, x, cy, "\x10\x11\x11\x11\x11\x11\x12"); - Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * CleanXfac_1), cy, "\x13"); + Menu.DrawConText(Font.FindFontColor(gameinfo.mSliderColor), x + int((5 + ((ccur * 38) / range)) * 2 * CleanXfac_1), cy, "\x13"); right -= 5*8*CleanXfac; }