ShopBtnWidget.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using Core.Language;
  2. using Excel2Json;
  3. using Fort23.UTool;
  4. namespace Fort23.Mono
  5. {
  6. [UIBinding(prefab = "ShopBtnWidget")]
  7. public partial class ShopBtnWidget : ItemWidgetBasic
  8. {
  9. public ShopGroupConfig ShopGroupConfig;
  10. public SmallPlacesConfig SmallPlacesConfig;
  11. private void Init()
  12. {
  13. }
  14. public override void AddEvent()
  15. {
  16. }
  17. public override void DelEvent()
  18. {
  19. }
  20. public override void AddButtonEvent()
  21. {
  22. base.AddButtonEvent();
  23. }
  24. public void CustomInit(ShopGroupConfig shopGroupConfig)
  25. {
  26. this.ShopGroupConfig = shopGroupConfig;
  27. Text_Name.text = LanguageManager.Instance.Text(ShopGroupConfig.shopName);
  28. }
  29. public void CustomInit(int smallPlacesId)
  30. {
  31. this.SmallPlacesConfig = ConfigComponent.Instance.Get<SmallPlacesConfig>(smallPlacesId);
  32. Text_Name.text = LanguageManager.Instance.Text(SmallPlacesConfig.placeName);
  33. }
  34. }
  35. }