| | 1 | | public interface IShortcutsController |
| | 2 | | { |
| | 3 | | event System.Action OnCloseClick; |
| | 4 | |
|
| | 5 | | void Initialize(IShortcutsView publishPopupView); |
| | 6 | | void Dispose(); |
| | 7 | | void SetActive(bool isActive); |
| | 8 | | void CloseButtonClicked(); |
| | 9 | | } |
| | 10 | |
|
| | 11 | | public class ShortcutsController : IShortcutsController |
| | 12 | | { |
| | 13 | | public event System.Action OnCloseClick; |
| | 14 | |
|
| | 15 | | internal IShortcutsView publishPopupView; |
| | 16 | |
|
| | 17 | | public void Initialize(IShortcutsView publishPopupView) |
| | 18 | | { |
| 3 | 19 | | this.publishPopupView = publishPopupView; |
| | 20 | |
|
| 3 | 21 | | publishPopupView.OnCloseButtonClick += CloseButtonClicked; |
| 3 | 22 | | } |
| | 23 | |
|
| 6 | 24 | | public void Dispose() { publishPopupView.OnCloseButtonClick -= CloseButtonClicked; } |
| | 25 | |
|
| 4 | 26 | | public void SetActive(bool isActive) { publishPopupView.SetActive(isActive); } |
| | 27 | |
|
| 2 | 28 | | public void CloseButtonClicked() { OnCloseClick?.Invoke(); } |
| | 29 | | } |