ui 상세 설명란에 요리도구 표시
This commit is contained in:
parent
d3a4f75bca
commit
760325d2bb
@ -77,7 +77,7 @@ public async void Show(ItemViewModel model)
|
|||||||
}
|
}
|
||||||
_labelLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedName(viewItemKey);
|
_labelLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedName(viewItemKey);
|
||||||
_descriptionLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedDescription(viewItemKey);
|
_descriptionLocalizer.StringReference = LocalizationManager.Instance.GetLocalizedDescription(viewItemKey);
|
||||||
_cookwareImage.sprite = _currentItemViewModel.GetCookwareSprite;
|
_cookwareImage.sprite = _currentItemViewModel.GetCookwareIcon;
|
||||||
UpdateTasteHashTags(_currentItemViewModel);
|
UpdateTasteHashTags(_currentItemViewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,27 +46,6 @@ public Sprite ItemSprite
|
|||||||
return DataManager.Instance.GetSprite(Id);
|
return DataManager.Instance.GetSprite(Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Sprite GetCookwareSprite
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
if (ItemType != ItemType.Recipe) return null;
|
|
||||||
|
|
||||||
string cookwareSpriteKey = null;
|
|
||||||
switch (RecipeType)
|
|
||||||
{
|
|
||||||
case RecipeType.FoodRecipe:
|
|
||||||
cookwareSpriteKey = DataManager.Instance.GetDataSo<FoodDataSo>().GetDataById(GetRecipeResultKey).CookwareKey;
|
|
||||||
break;
|
|
||||||
case RecipeType.DrinkRecipe:
|
|
||||||
cookwareSpriteKey = DataManager.Instance.GetDataSo<DrinkDataSo>().GetDataById(GetRecipeResultKey).CookwareKey;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return DataManager.Instance.GetSprite(cookwareSpriteKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetRecipeResultKey
|
public string GetRecipeResultKey
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@ -77,6 +56,27 @@ public string GetRecipeResultKey
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Sprite GetCookwareIcon
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var resultKey = GetRecipeResultKey;
|
||||||
|
if (resultKey == null) return null;
|
||||||
|
|
||||||
|
string cookwareKey = null;
|
||||||
|
if (RecipeType == RecipeType.FoodRecipe)
|
||||||
|
{
|
||||||
|
cookwareKey = DataManager.Instance.GetDataSo<FoodDataSo>().GetDataById(resultKey).CookwareKey;
|
||||||
|
}
|
||||||
|
else if (RecipeType == RecipeType.DrinkRecipe)
|
||||||
|
{
|
||||||
|
cookwareKey = DataManager.Instance.GetDataSo<DrinkDataSo>().GetDataById(resultKey).CookwareKey;
|
||||||
|
}
|
||||||
|
return DataManager.Instance.GetIcon(cookwareKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<TasteData> GetTasteDatas
|
public List<TasteData> GetTasteDatas
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
Loading…
Reference in New Issue
Block a user