| | 1 | | using System; |
| | 2 | | using DCL; |
| | 3 | | using DCL.HelpAndSupportHUD; |
| | 4 | | using DCL.Huds.QuestsPanel; |
| | 5 | | using DCL.Huds.QuestsTracker; |
| | 6 | | using DCL.SettingsPanelHUD; |
| | 7 | | using LoadingHUD; |
| | 8 | | using SignupHUD; |
| | 9 | | using UnityEngine; |
| | 10 | |
|
| | 11 | | public class HUDFactory : IHUDFactory |
| | 12 | | { |
| | 13 | | public virtual IHUD CreateHUD(HUDElementID hudElementId) |
| | 14 | | { |
| 25 | 15 | | IHUD hudElement = null; |
| | 16 | | switch (hudElementId) |
| | 17 | | { |
| | 18 | | case HUDElementID.NONE: |
| | 19 | | break; |
| | 20 | | case HUDElementID.MINIMAP: |
| 1 | 21 | | hudElement = new MinimapHUDController(); |
| 1 | 22 | | break; |
| | 23 | | case HUDElementID.PROFILE_HUD: |
| 1 | 24 | | hudElement = new ProfileHUDController(new UserProfileWebInterfaceBridge()); |
| 1 | 25 | | break; |
| | 26 | | case HUDElementID.NOTIFICATION: |
| 1 | 27 | | hudElement = new NotificationHUDController(); |
| 1 | 28 | | break; |
| | 29 | | case HUDElementID.AVATAR_EDITOR: |
| 1 | 30 | | hudElement = new AvatarEditorHUDController(); |
| 1 | 31 | | break; |
| | 32 | | case HUDElementID.SETTINGS_PANEL: |
| 1 | 33 | | hudElement = new SettingsPanelHUDController(); |
| 1 | 34 | | break; |
| | 35 | | case HUDElementID.EXPRESSIONS: |
| | 36 | | case HUDElementID.EMOTES: |
| 2 | 37 | | hudElement = new EmotesHUDController(); |
| 2 | 38 | | break; |
| | 39 | | case HUDElementID.PLAYER_INFO_CARD: |
| 1 | 40 | | hudElement = new PlayerInfoCardHUDController(FriendsController.i, |
| | 41 | | Resources.Load<StringVariable>("CurrentPlayerInfoCardId"), |
| | 42 | | new UserProfileWebInterfaceBridge(), |
| | 43 | | new WearablesCatalogControllerBridge(), |
| | 44 | | ProfanityFilterSharedInstances.regexFilter, |
| | 45 | | DataStore.i); |
| 1 | 46 | | break; |
| | 47 | | case HUDElementID.AIRDROPPING: |
| 1 | 48 | | hudElement = new AirdroppingHUDController(); |
| 1 | 49 | | break; |
| | 50 | | case HUDElementID.TERMS_OF_SERVICE: |
| 1 | 51 | | hudElement = new TermsOfServiceHUDController(); |
| 1 | 52 | | break; |
| | 53 | | case HUDElementID.WORLD_CHAT_WINDOW: |
| 1 | 54 | | hudElement = new WorldChatWindowHUDController(); |
| 1 | 55 | | break; |
| | 56 | | case HUDElementID.FRIENDS: |
| 1 | 57 | | hudElement = new FriendsHUDController(); |
| 1 | 58 | | break; |
| | 59 | | case HUDElementID.PRIVATE_CHAT_WINDOW: |
| 1 | 60 | | hudElement = new PrivateChatWindowHUDController(); |
| 1 | 61 | | break; |
| | 62 | | case HUDElementID.TASKBAR: |
| 1 | 63 | | hudElement = new TaskbarHUDController(); |
| 1 | 64 | | break; |
| | 65 | | case HUDElementID.OPEN_EXTERNAL_URL_PROMPT: |
| 1 | 66 | | hudElement = new ExternalUrlPromptHUDController(); |
| 1 | 67 | | break; |
| | 68 | | case HUDElementID.NFT_INFO_DIALOG: |
| 1 | 69 | | hudElement = new NFTPromptHUDController(); |
| 1 | 70 | | break; |
| | 71 | | case HUDElementID.TELEPORT_DIALOG: |
| 1 | 72 | | hudElement = new TeleportPromptHUDController(); |
| 1 | 73 | | break; |
| | 74 | | case HUDElementID.CONTROLS_HUD: |
| 1 | 75 | | hudElement = new ControlsHUDController(); |
| 1 | 76 | | break; |
| | 77 | | case HUDElementID.HELP_AND_SUPPORT_HUD: |
| 1 | 78 | | hudElement = new HelpAndSupportHUDController(); |
| 1 | 79 | | break; |
| | 80 | | case HUDElementID.USERS_AROUND_LIST_HUD: |
| 1 | 81 | | hudElement = new UsersAroundListHUDController(); |
| 1 | 82 | | break; |
| | 83 | | case HUDElementID.GRAPHIC_CARD_WARNING: |
| 1 | 84 | | hudElement = new GraphicCardWarningHUDController(); |
| 1 | 85 | | break; |
| | 86 | | case HUDElementID.BUILDER_IN_WORLD_MAIN: |
| | 87 | | break; |
| | 88 | | case HUDElementID.QUESTS_PANEL: |
| 1 | 89 | | hudElement = new QuestsPanelHUDController(); |
| 1 | 90 | | break; |
| | 91 | | case HUDElementID.QUESTS_TRACKER: |
| 1 | 92 | | hudElement = new QuestsTrackerHUDController(); |
| 1 | 93 | | break; |
| | 94 | | case HUDElementID.SIGNUP: |
| 1 | 95 | | hudElement = new SignupHUDController(); |
| 1 | 96 | | break; |
| | 97 | | case HUDElementID.BUILDER_PROJECTS_PANEL: |
| | 98 | | break; |
| | 99 | | case HUDElementID.LOADING: |
| 1 | 100 | | hudElement = new LoadingHUDController(); |
| | 101 | | break; |
| | 102 | | } |
| | 103 | |
|
| 25 | 104 | | return hudElement; |
| | 105 | | } |
| | 106 | |
|
| | 107 | | public void Dispose() |
| | 108 | | { |
| 629 | 109 | | } |
| | 110 | |
|
| | 111 | | public void Initialize() |
| | 112 | | { |
| 629 | 113 | | } |
| | 114 | | } |