Add tutorial button to use into the center of the display string instead of the beginning for clarity. Release Build 8472.
This commit is contained in:
		
							parent
							
								
									daa90538ad
								
							
						
					
					
						commit
						18bfa4a26b
					
				| @ -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()){ | ||||
|  | ||||
| @ -584,7 +584,7 @@ std::string InputGroup::GetDisplayName(){ | ||||
| 	return combinationDisplay; | ||||
| } | ||||
| 
 | ||||
| void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,InputType type,vf2d textScale)const{ | ||||
| void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,InputType type,vf2d textScale,const std::string_view preDisplayText)const{ | ||||
| 	std::vector<Input>displayKeys; | ||||
| 
 | ||||
| 	auto OriginalGameIcon=[](std::optional<Input>input)->bool{ | ||||
| @ -627,8 +627,28 @@ void InputGroup::DrawInput(const std::variant<AiL*const,TileTransformedView*cons | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| 	vf2d descriptionTextSize=game->GetTextSizeProp(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<rendererType*const>(renderer)->DrawShadowStringPropDecal(pos+offset,preDisplayText,{255,255,255,alpha},{0,0,0,alpha},textScale); | ||||
| 		#pragma endregion | ||||
| 
 | ||||
| 		if(std::holds_alternative<AiL*const>(renderer)){ | ||||
| 			Render(AiL); | ||||
| 		}else | ||||
| 		if(std::holds_alternative<TileTransformedView*const>(renderer)){ | ||||
| 			Render(TileTransformedView); | ||||
| 		}else  | ||||
| 		if(std::holds_alternative<ViewPort*const>(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<Decal*>(button)){ | ||||
| 			Decal*img=std::get<Decal*>(button); | ||||
|  | ||||
| @ -182,7 +182,7 @@ public: | ||||
| 	//Draws an input display with accompanying text centered at given position.
 | ||||
| 	void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha)const; | ||||
| 	void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,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::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,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::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,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::optional<Input>GetPrimaryKey(InputType type)const; | ||||
| }; | ||||
| 
 | ||||
|  | ||||
| @ -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 "); | ||||
|         } | ||||
|     } | ||||
| }; | ||||
| @ -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 | ||||
|  | ||||
										
											Binary file not shown.
										
									
								
							
										
											Binary file not shown.
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user