diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index d66a763e..ba2a0e14 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -2700,6 +2700,7 @@ bool Steam_Init(){ int main() { + if(PACK_KEY=="INSERT_PACK_KEY_HERE")ERR("ERROR! Starting the game with the default pack ID is not allowed!") #ifndef __EMSCRIPTEN__ if(SteamAPI_RestartAppIfNecessary(2895980U))return false; //Immediately quit if steam is detected and can be started through it. if(Steam_Init()){ diff --git a/Adventures in Lestoria/Key.cpp b/Adventures in Lestoria/Key.cpp index 722f92a9..0e5addb8 100644 --- a/Adventures in Lestoria/Key.cpp +++ b/Adventures in Lestoria/Key.cpp @@ -584,7 +584,7 @@ std::string InputGroup::GetDisplayName(){ return combinationDisplay; } -void InputGroup::DrawInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,InputType type,vf2d textScale)const{ +void InputGroup::DrawInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,InputType type,vf2d textScale,const std::string_view preDisplayText)const{ std::vectordisplayKeys; auto OriginalGameIcon=[](std::optionalinput)->bool{ @@ -627,8 +627,28 @@ void InputGroup::DrawInput(const std::variantGetTextSizeProp(displayText); - vf2d offset=-((buttonImgSize+descriptionTextSize)/2.f); + vf2d preDescriptionTextSize=game->GetTextSizeProp(preDisplayText)*textScale; + vf2d descriptionTextSize=game->GetTextSizeProp(displayText)*textScale; + vf2d offset=-((buttonImgSize+descriptionTextSize)/2.f)-preDescriptionTextSize/2.f; + + #pragma region Render Pre-Display Text + #pragma region Render Macro + #define Render(rendererType) \ + std::get(renderer)->DrawShadowStringPropDecal(pos+offset,preDisplayText,{255,255,255,alpha},{0,0,0,alpha},textScale); + #pragma endregion + + if(std::holds_alternative(renderer)){ + Render(AiL); + }else + if(std::holds_alternative(renderer)){ + Render(TileTransformedView); + }else + if(std::holds_alternative(renderer)){ + Render(ViewPort); + }else ERR("Could not find proper renderer for rendering Inputs!"); + offset.x+=preDescriptionTextSize.x; + #pragma endregion + for(size_t index=0;auto&button:buttonImgs){ if(std::holds_alternative(button)){ Decal*img=std::get(button); diff --git a/Adventures in Lestoria/Key.h b/Adventures in Lestoria/Key.h index 79ae7652..db59e1c8 100644 --- a/Adventures in Lestoria/Key.h +++ b/Adventures in Lestoria/Key.h @@ -182,7 +182,7 @@ public: //Draws an input display with accompanying text centered at given position. void DrawPrimaryInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha)const; void DrawPrimaryInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f})const; - void DrawInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f})const; + void DrawInput(const std::variantrenderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f},const std::string_view preDisplayText="")const; const std::optionalGetPrimaryKey(InputType type)const; }; diff --git a/Adventures in Lestoria/Tutorial.h b/Adventures in Lestoria/Tutorial.h index 3c5728e3..5213fc14 100644 --- a/Adventures in Lestoria/Tutorial.h +++ b/Adventures in Lestoria/Tutorial.h @@ -346,12 +346,12 @@ private: virtual inline void Draw()const override final{ if(Input::UsingGamepad()){ STEAMINPUT( - startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::STEAM); + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"to equip your new gear.",255,InputType::STEAM,{0.85f,1.f},"Open the #FFCF0CCharacter#FFFFFF menu with "); )else{ - startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::CONTROLLER); + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"to equip your new gear.",255,InputType::CONTROLLER,{0.85f,1.f},"Open the #FFCF0CCharacter#FFFFFF menu with "); } }else{ - startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"Open the #FFCF0CCharacter#FFFFFF menu and equip your new gear.",180,InputType::KEY); + startGroup.DrawInput(game,{game->ScreenWidth()/2.f,48.f},"to equip your new gear.",255,InputType::KEY,{0.85f,1.f},"Open the #FFCF0CCharacter#FFFFFF menu with "); } } }; \ No newline at end of file diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 9e128a83..be893a99 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 0 #define VERSION_PATCH 0 -#define VERSION_BUILD 8467 +#define VERSION_BUILD 8472 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/gamepack.pak b/Adventures in Lestoria/assets/gamepack.pak index 7d12d391..79f199fc 100644 Binary files a/Adventures in Lestoria/assets/gamepack.pak and b/Adventures in Lestoria/assets/gamepack.pak differ diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 5e565f58..5a076b3f 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ