예제 #1
0
void AMineCraftCloneGameMode::ApplyHUDChanges()
{
	/*Remove the previous hud, since we're apply a new one*/
	if (CurrentWidget != nullptr)
	{
		CurrentWidget->RemoveFromParent();
	}

	/*Check the hudstate, and apply the hud corresponding to whatever hud should be open*/
	switch (HUDState)
	{
		case EHUDState::HS_Ingame:
		{
			ApplyHUD(IngameHUDClass, false, false);
		}
		case EHUDState::HS_Inventory:
		{
			ApplyHUD(InventoryHUDClass, true, true);
		}
		case EHUDState::HS_Craft_Menu:
		{
			ApplyHUD(CraftMenuHUDClass, true, true);
		}
		default:
		{
			ApplyHUD(IngameHUDClass, false, false);
		}
	}
}
예제 #2
0
void AMaxGameMode::ApplyHUDChanges()
{
	//remove previous hud since were applying a new one
	if (CurrentWidget != nullptr)
	{
		CurrentWidget->RemoveFromParent();
	}

	//check hudstate, apply hud to whichever should be open
	switch (HUDState)
	{
		case EHUDState::HS_Ingame:
		{
			ApplyHUD(IngameHUDClass, false, false);
		}

		case EHUDState::HS_Item_Inven:
		{
			ApplyHUD(ItemInvenHUDClass, false, false);
		}

		case EHUDState::HS_Spell_Inven:
		{
			ApplyHUD(SpellInvenHUDClass, false, false);
		}

		default:
		{
			ApplyHUD(IngameHUDClass, false, false);
		}
	}

}