Пример #1
0
        public void AddView(VisualElement parent)
        {
            selector = new VisualElement();
            var venueInfo = new VisualElement();

            parent.Add(selector);
            parent.Add(venueInfo);

            ReactiveBinder.Bind(reactiveCurrentVenue, venue =>
            {
                venueInfo.Clear();
                if (venue == null)
                {
                    return;
                }

                var thumbnailView = new DrawThumbnailView();
                venueInfo.Add(new IMGUIContainer(() =>
                {
                    EditorGUILayout.LabelField("説明");
                    EditorGUILayout.HelpBox(venue.Description, MessageType.None);

                    if (venue.ThumbnailUrls.Any())
                    {
                        thumbnailView.OverwriteDownloadUrl(venue.ThumbnailUrls.First(x => x != null));
                    }
                    thumbnailView.DrawUI(false);
                }));
            });

            RefreshVenueSelector();
        }
Пример #2
0
        public EditVenueView(UserInfo userInfo, Core.Editor.Venue.Json.Venue venue, Action venueChangeCallback)
        {
            Assert.IsNotNull(venue);

            this.userInfo = userInfo;
            this.venue    = venue;

            this.venueChangeCallback = venueChangeCallback;

            editVenue         = new EditVenue();
            drawThumbnailView = new DrawThumbnailView();
        }
Пример #3
0
 public SelectVenueView(UploadVenueDataStore dataStore)
 {
     this.dataStore = dataStore;
     this.dataStore.GroupsIsDirty = true;
     drawThumbnailView            = new DrawThumbnailView();
 }
Пример #4
0
 public EditVenueView(UploadVenueDataStore dataStore)
 {
     this.dataStore           = dataStore;
     this.dataStore.EditVenue = new EditVenue();
     drawThumbnailView        = new DrawThumbnailView();
 }